Skip to content

Commit

Permalink
chore: add more TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Feb 4, 2025
1 parent b3da57f commit e5a31d1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: "Code Scanning - Action"

on:
push:
branches: [ master ]
branches:
- master
- main
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches:
- master
- main
schedule:
- cron: '0 17 * * 5'

Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: "build-and-test"
on: # rebuild any PRs and main branch changes
pull_request:
branches:
- master
- main
push:
branches:
- master
- main
- "releases/*"

jobs:
Expand Down Expand Up @@ -53,8 +57,8 @@ jobs:
version:
- ""
- "latest"
- "v1.60"
- "v1.60.1"
- "v1.60" # TODO(ldez): it should be updated for v2.
- "v1.60.1" # TODO(ldez): it should be updated for v2.
runs-on: ${{ matrix.os }}
permissions:
contents: read
Expand Down Expand Up @@ -82,8 +86,8 @@ jobs:
version:
- ""
- "latest"
- "v1.60.1"
- "adbdfdb288e939a175182b7a12b7555215ce98b2"
- "v1.60.1" # TODO(ldez): it should be updated for v2.
- "adbdfdb288e939a175182b7a12b7555215ce98b2" # TODO(ldez): it should be updated for v2.
runs-on: ${{ matrix.os }}
permissions:
contents: read
Expand Down
2 changes: 2 additions & 0 deletions src/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,14 @@ export async function goInstall(versionConfig: VersionConfig): Promise<string> {

const options: ExecOptions = { env: { ...process.env, CGO_ENABLED: "1" } }

// TODO(ldez): it should be updated for v2.
const exres = await execShellCommand(
`go install github.com/golangci/golangci-lint/cmd/golangci-lint@${versionConfig.TargetVersion}`,
options
)
printOutput(exres)

// TODO(ldez): it should be updated for v2.
const res = await execShellCommand(
`go install -n github.com/golangci/golangci-lint/cmd/golangci-lint@${versionConfig.TargetVersion}`,
options
Expand Down
3 changes: 2 additions & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ export async function findLintVersion(mode: InstallMode): Promise<VersionConfig>

if (mode == InstallMode.GoInstall) {
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" }
}

Expand Down

0 comments on commit e5a31d1

Please sign in to comment.