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 @@ -67716,15 +67716,17 @@ function runLint(lintPath, patchPath) {
67716
67716
printOutput(res);
67717
67717
}
67718
67718
const userArgs = core.getInput(`args`);
67719
+ const allowExtraOutFormatArgs = core.getInput(`allow-extra-out-format-args`);
67719
67720
const addedArgs = [];
67720
67721
const userArgNames = new Set(userArgs
67721
67722
.trim()
67722
67723
.split(/\s+/)
67723
67724
.map((arg) => arg.split(`=`)[0])
67724
67725
.filter((arg) => arg.startsWith(`-`))
67725
67726
.map((arg) => arg.replace(/^-+/, ``)));
67726
- if (userArgNames.has(`out-format`)) {
67727
- throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`);
67727
+ if (userArgNames.has(`out-format`) && !allowExtraOutFormatArgs) {
67728
+ throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a
67729
+ future version (set 'allow-extra-out-format-args' input to true to override)`);
67728
67730
}
67729
67731
addedArgs.push(`--out-format=github-actions`);
67730
67732
if (patchPath) {
Original file line number Diff line number Diff line change @@ -67716,15 +67716,17 @@ function runLint(lintPath, patchPath) {
67716
67716
printOutput(res);
67717
67717
}
67718
67718
const userArgs = core.getInput(`args`);
67719
+ const allowExtraOutFormatArgs = core.getInput(`allow-extra-out-format-args`);
67719
67720
const addedArgs = [];
67720
67721
const userArgNames = new Set(userArgs
67721
67722
.trim()
67722
67723
.split(/\s+/)
67723
67724
.map((arg) => arg.split(`=`)[0])
67724
67725
.filter((arg) => arg.startsWith(`-`))
67725
67726
.map((arg) => arg.replace(/^-+/, ``)));
67726
- if (userArgNames.has(`out-format`)) {
67727
- throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`);
67727
+ if (userArgNames.has(`out-format`) && !allowExtraOutFormatArgs) {
67728
+ throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a
67729
+ future version (set 'allow-extra-out-format-args' input to true to override)`);
67728
67730
}
67729
67731
addedArgs.push(`--out-format=github-actions`);
67730
67732
if (patchPath) {
You can’t perform that action at this time.
0 commit comments