File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -66574,15 +66574,17 @@ function runLint(lintPath, patchPath) {
66574
66574
printOutput(res);
66575
66575
}
66576
66576
const userArgs = core.getInput(`args`);
66577
+ const allowExtraOutFormatArgs = core.getInput(`allow-extra-out-format-args`);
66577
66578
const addedArgs = [];
66578
66579
const userArgNames = new Set(userArgs
66579
66580
.trim()
66580
66581
.split(/\s+/)
66581
66582
.map((arg) => arg.split(`=`)[0])
66582
66583
.filter((arg) => arg.startsWith(`-`))
66583
66584
.map((arg) => arg.replace(/^-+/, ``)));
66584
- if (userArgNames.has(`out-format`)) {
66585
- throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`);
66585
+ if (userArgNames.has(`out-format`) && !allowExtraOutFormatArgs) {
66586
+ throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a
66587
+ future version (set 'allow-extra-out-format-args' input to true to override)`);
66586
66588
}
66587
66589
addedArgs.push(`--out-format=github-actions`);
66588
66590
if (patchPath) {
Original file line number Diff line number Diff line change @@ -66574,15 +66574,17 @@ function runLint(lintPath, patchPath) {
66574
66574
printOutput(res);
66575
66575
}
66576
66576
const userArgs = core.getInput(`args`);
66577
+ const allowExtraOutFormatArgs = core.getInput(`allow-extra-out-format-args`);
66577
66578
const addedArgs = [];
66578
66579
const userArgNames = new Set(userArgs
66579
66580
.trim()
66580
66581
.split(/\s+/)
66581
66582
.map((arg) => arg.split(`=`)[0])
66582
66583
.filter((arg) => arg.startsWith(`-`))
66583
66584
.map((arg) => arg.replace(/^-+/, ``)));
66584
- if (userArgNames.has(`out-format`)) {
66585
- throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`);
66585
+ if (userArgNames.has(`out-format`) && !allowExtraOutFormatArgs) {
66586
+ throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a
66587
+ future version (set 'allow-extra-out-format-args' input to true to override)`);
66586
66588
}
66587
66589
addedArgs.push(`--out-format=github-actions`);
66588
66590
if (patchPath) {
You can’t perform that action at this time.
0 commit comments