mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-17 07:58:27 +00:00
review: format and regenerate
This commit is contained in:
parent
8d9a4ff3ee
commit
f1a5bd1222
3 changed files with 13 additions and 13 deletions
6
dist/post_run/index.js
vendored
6
dist/post_run/index.js
vendored
|
|
@ -66581,12 +66581,12 @@ function runLint(lintPath, patchPath) {
|
||||||
.filter((arg) => arg.startsWith(`-`))
|
.filter((arg) => arg.startsWith(`-`))
|
||||||
.map((arg) => arg.replace(/^-+/, ``))
|
.map((arg) => arg.replace(/^-+/, ``))
|
||||||
.map((arg) => arg.split(/=(.*)/, 2))
|
.map((arg) => arg.split(/=(.*)/, 2))
|
||||||
.map(([key, value]) => [key, value !== null && value !== void 0 ? value : '']);
|
.map(([key, value]) => [key, value !== null && value !== void 0 ? value : ""]);
|
||||||
const userArgsMap = new Map(userArgsList);
|
const userArgsMap = new Map(userArgsList);
|
||||||
const userArgNames = new Set(userArgsList.map(([key, value]) => key));
|
const userArgNames = new Set(userArgsList.map(([key, value]) => key));
|
||||||
const formats = userArgsMap.get('out-format');
|
const formats = userArgsMap.get("out-format");
|
||||||
if (formats) {
|
if (formats) {
|
||||||
if (formats.includes('github-actions')) {
|
if (formats.includes("github-actions")) {
|
||||||
addedArgs.push(`--out-format=${formats}`);
|
addedArgs.push(`--out-format=${formats}`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
6
dist/run/index.js
vendored
6
dist/run/index.js
vendored
|
|
@ -66581,12 +66581,12 @@ function runLint(lintPath, patchPath) {
|
||||||
.filter((arg) => arg.startsWith(`-`))
|
.filter((arg) => arg.startsWith(`-`))
|
||||||
.map((arg) => arg.replace(/^-+/, ``))
|
.map((arg) => arg.replace(/^-+/, ``))
|
||||||
.map((arg) => arg.split(/=(.*)/, 2))
|
.map((arg) => arg.split(/=(.*)/, 2))
|
||||||
.map(([key, value]) => [key, value !== null && value !== void 0 ? value : '']);
|
.map(([key, value]) => [key, value !== null && value !== void 0 ? value : ""]);
|
||||||
const userArgsMap = new Map(userArgsList);
|
const userArgsMap = new Map(userArgsList);
|
||||||
const userArgNames = new Set(userArgsList.map(([key, value]) => key));
|
const userArgNames = new Set(userArgsList.map(([key, value]) => key));
|
||||||
const formats = userArgsMap.get('out-format');
|
const formats = userArgsMap.get("out-format");
|
||||||
if (formats) {
|
if (formats) {
|
||||||
if (formats.includes('github-actions')) {
|
if (formats.includes("github-actions")) {
|
||||||
addedArgs.push(`--out-format=${formats}`);
|
addedArgs.push(`--out-format=${formats}`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
10
src/run.ts
10
src/run.ts
|
|
@ -125,15 +125,15 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
|
||||||
.filter((arg) => arg.startsWith(`-`))
|
.filter((arg) => arg.startsWith(`-`))
|
||||||
.map((arg) => arg.replace(/^-+/, ``))
|
.map((arg) => arg.replace(/^-+/, ``))
|
||||||
.map((arg) => arg.split(/=(.*)/, 2))
|
.map((arg) => arg.split(/=(.*)/, 2))
|
||||||
.map<[string, string]>(([key, value]) => [key, value ?? ''])
|
.map<[string, string]>(([key, value]) => [key, value ?? ""])
|
||||||
|
|
||||||
const userArgsMap = new Map<string, string>(userArgsList)
|
const userArgsMap = new Map<string, string>(userArgsList)
|
||||||
const userArgNames = new Set<string>(userArgsList.map(([key, value]) => key));
|
const userArgNames = new Set<string>(userArgsList.map(([key, value]) => key))
|
||||||
|
|
||||||
const formats = userArgsMap.get('out-format')
|
const formats = userArgsMap.get("out-format")
|
||||||
if (formats) {
|
if (formats) {
|
||||||
if (formats.includes('github-actions')) {
|
if (formats.includes("github-actions")) {
|
||||||
addedArgs.push(`--out-format=${formats}`);
|
addedArgs.push(`--out-format=${formats}`)
|
||||||
} else {
|
} else {
|
||||||
addedArgs.push(`--out-format=github-actions,${formats}`)
|
addedArgs.push(`--out-format=github-actions,${formats}`)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue