mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-20 01:14:38 +00:00
Increase default timeout: 1m -> 5m (#297)
This commit is contained in:
parent
43c645b597
commit
58781090d5
1 changed files with 5 additions and 0 deletions
|
|
@ -109,6 +109,8 @@ const printOutput = (res: ExecRes): void => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const defaultTimeout = `5m`
|
||||||
|
|
||||||
async function runLint(lintPath: string, patchPath: string): Promise<void> {
|
async function runLint(lintPath: string, patchPath: string): Promise<void> {
|
||||||
const debug = core.getInput(`debug`)
|
const debug = core.getInput(`debug`)
|
||||||
if (debug.split(`,`).includes(`cache`)) {
|
if (debug.split(`,`).includes(`cache`)) {
|
||||||
|
|
@ -131,6 +133,9 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
|
||||||
throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`)
|
throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`)
|
||||||
}
|
}
|
||||||
addedArgs.push(`--out-format=github-actions`)
|
addedArgs.push(`--out-format=github-actions`)
|
||||||
|
if (!userArgNames.has(`timeout`)) {
|
||||||
|
addedArgs.push(`--timeout=${defaultTimeout}`)
|
||||||
|
}
|
||||||
|
|
||||||
if (patchPath) {
|
if (patchPath) {
|
||||||
if (userArgNames.has(`new`) || userArgNames.has(`new-from-rev`) || userArgNames.has(`new-from-patch`)) {
|
if (userArgNames.has(`new`) || userArgNames.has(`new-from-rev`) || userArgNames.has(`new-from-patch`)) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue