Skip to content

Commit c7c1219

Browse files
committed
chore: simplify
1 parent 0a35821 commit c7c1219

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

dist/post_run/index.js

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/run/index.js

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/plugins.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ export async function install(binPath: string): Promise<string> {
3434
rootDir = process.cwd()
3535
}
3636

37-
const configFile = [".custom-gcl.yml", ".custom-gcl.yaml", ".custom-gcl.json"]
38-
.map((v) => path.join(rootDir, v))
37+
const configFile = ["yml", "yaml", "json"]
38+
.map((ext) => `.custom-gcl.${ext}`)
39+
.map((filename) => path.join(rootDir, filename))
3940
.find((filePath) => fs.existsSync(filePath))
4041

4142
if (!configFile || configFile === "") {
@@ -53,7 +54,7 @@ export async function install(binPath: string): Promise<string> {
5354
const v: string = core.getInput(`version`)
5455
if (v !== "" && config.version !== v) {
5556
core.warning(
56-
`The golangci-lint version (${config.version}) defined inside in ${configFile} does not match the version defined in the action (${v})`
57+
`The golangci-lint version (${config.version}) defined inside ${configFile} does not match the version defined in the action (${v})`
5758
)
5859
}
5960

0 commit comments

Comments
 (0)