mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-15 15:16:30 +00:00
chore: add more TODOs
This commit is contained in:
parent
b3da57fb34
commit
e5a31d123f
4 changed files with 18 additions and 7 deletions
8
.github/workflows/codeql.yaml
vendored
8
.github/workflows/codeql.yaml
vendored
|
|
@ -2,10 +2,14 @@ name: "Code Scanning - Action"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
# The branches below must be a subset of the branches above
|
||||||
branches: [ master ]
|
branches:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 17 * * 5'
|
- cron: '0 17 * * 5'
|
||||||
|
|
||||||
|
|
|
||||||
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
|
|
@ -1,9 +1,13 @@
|
||||||
name: "build-and-test"
|
name: "build-and-test"
|
||||||
on: # rebuild any PRs and main branch changes
|
on: # rebuild any PRs and main branch changes
|
||||||
pull_request:
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- main
|
||||||
- "releases/*"
|
- "releases/*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -53,8 +57,8 @@ jobs:
|
||||||
version:
|
version:
|
||||||
- ""
|
- ""
|
||||||
- "latest"
|
- "latest"
|
||||||
- "v1.60"
|
- "v1.60" # TODO(ldez): it should be updated for v2.
|
||||||
- "v1.60.1"
|
- "v1.60.1" # TODO(ldez): it should be updated for v2.
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
@ -82,8 +86,8 @@ jobs:
|
||||||
version:
|
version:
|
||||||
- ""
|
- ""
|
||||||
- "latest"
|
- "latest"
|
||||||
- "v1.60.1"
|
- "v1.60.1" # TODO(ldez): it should be updated for v2.
|
||||||
- "adbdfdb288e939a175182b7a12b7555215ce98b2"
|
- "adbdfdb288e939a175182b7a12b7555215ce98b2" # TODO(ldez): it should be updated for v2.
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
|
||||||
|
|
@ -91,12 +91,14 @@ export async function goInstall(versionConfig: VersionConfig): Promise<string> {
|
||||||
|
|
||||||
const options: ExecOptions = { env: { ...process.env, CGO_ENABLED: "1" } }
|
const options: ExecOptions = { env: { ...process.env, CGO_ENABLED: "1" } }
|
||||||
|
|
||||||
|
// TODO(ldez): it should be updated for v2.
|
||||||
const exres = await execShellCommand(
|
const exres = await execShellCommand(
|
||||||
`go install github.com/golangci/golangci-lint/cmd/golangci-lint@${versionConfig.TargetVersion}`,
|
`go install github.com/golangci/golangci-lint/cmd/golangci-lint@${versionConfig.TargetVersion}`,
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
printOutput(exres)
|
printOutput(exres)
|
||||||
|
|
||||||
|
// TODO(ldez): it should be updated for v2.
|
||||||
const res = await execShellCommand(
|
const res = await execShellCommand(
|
||||||
`go install -n github.com/golangci/golangci-lint/cmd/golangci-lint@${versionConfig.TargetVersion}`,
|
`go install -n github.com/golangci/golangci-lint/cmd/golangci-lint@${versionConfig.TargetVersion}`,
|
||||||
options
|
options
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,8 @@ export async function findLintVersion(mode: InstallMode): Promise<VersionConfig>
|
||||||
|
|
||||||
if (mode == InstallMode.GoInstall) {
|
if (mode == InstallMode.GoInstall) {
|
||||||
const v: string = core.getInput(`version`)
|
const v: string = core.getInput(`version`)
|
||||||
// TODO(ldez): latest should be replaced with an explicit version (ex: v1.64.0)
|
// TODO(ldez): latest should be replaced with an explicit version (ex: v1.64.0).
|
||||||
|
// TODO(ldez): AssetURL should be updated for v2.
|
||||||
return { TargetVersion: v ? v : "latest", AssetURL: "github.com/golangci/golangci-lint" }
|
return { TargetVersion: v ? v : "latest", AssetURL: "github.com/golangci/golangci-lint" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue