-
Notifications
You must be signed in to change notification settings - Fork 442
Advanced #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Advanced #27
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,27 @@ | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| name: Go Linter | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||
| fail-fast: false | ||||||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||||||
| go: ['1.23','1.22'] | ||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||
| - name: Setup Go | ||||||||||||||||||||||||||
| uses: actions/checkout@v6 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| go-version: ${{ matrix.go }} | ||||||||||||||||||||||||||
| go-version-file: 'go.mod' | ||||||||||||||||||||||||||
| cache-dependency-path: go.sum | ||||||||||||||||||||||||||
|
Comment on lines
+14
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win Wrong action used for Go setup. Step is named "Setup Go" and passes 🛠️ Proposed fix - name: Setup Go
- uses: actions/checkout@v6
+ uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
go-version-file: 'go.mod'
cache-dependency-path: go.sumNote this step also needs a preceding 📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.12)[error] 14-14: "steps" job is sequence node but mapping node is expected (syntax-check) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Run go Formatter | ||||||||||||||||||||||||||
| run: go fmt | ||||||||||||||||||||||||||
| working-directory: backend | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Run go vet | ||||||||||||||||||||||||||
| run: go vet | ||||||||||||||||||||||||||
| working-directory: backend | ||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
Broken job structure — workflow won't parse.
runs-on,strategy, andstepsneed to be nested under a single job id (e.g.lint:), not treated as separate jobs. As flagged by actionlint, each is currently missing its ownruns-on/steps, andfail-fast/matrixare invalid keys directly underjobs.🛠️ Proposed fix
Remaining step lines under
steps:will also need to be re-indented one level deeper to nest correctly under the job.📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.12)
[error] 8-8: "runs-on" section is missing in job "runs-on"
(syntax-check)
[error] 8-8: "steps" section is missing in job "runs-on"
(syntax-check)
[error] 8-8: "runs-on" job is scalar node but mapping node is expected
(syntax-check)
[error] 9-9: "runs-on" section is missing in job "strategy"
(syntax-check)
[error] 9-9: "steps" section is missing in job "strategy"
(syntax-check)
[error] 10-10: unexpected key "fail-fast" for "job" section. expected one of "concurrency", "container", "continue-on-error", "defaults", "env", "environment", "if", "name", "needs", "outputs", "permissions", "runs-on", "secrets", "services", "snapshot", "steps", "strategy", "timeout-minutes", "uses", "with"
(syntax-check)
[error] 11-11: unexpected key "matrix" for "job" section. expected one of "concurrency", "container", "continue-on-error", "defaults", "env", "environment", "if", "name", "needs", "outputs", "permissions", "runs-on", "secrets", "services", "snapshot", "steps", "strategy", "timeout-minutes", "uses", "with"
(syntax-check)
[error] 13-13: "runs-on" section is missing in job "steps"
(syntax-check)
[error] 13-13: "steps" section is missing in job "steps"
(syntax-check)
🤖 Prompt for AI Agents
Source: Linters/SAST tools