Skip to content

Commit b91c194

Browse files
authored
dev: run all commands on the CI (#4526)
1 parent e6f90f6 commit b91c194

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/pr.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,44 @@ jobs:
130130
env:
131131
# needed for github-action-config.json generation
132132
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
133+
134+
# Note: the command `run` is tested by the previous steps (`make test`).
135+
commands:
136+
needs: golangci-lint
137+
runs-on: ubuntu-latest
138+
steps:
139+
- uses: actions/checkout@v4
140+
- name: Install Go
141+
uses: actions/setup-go@v5
142+
with:
143+
# https://github.com/actions/setup-go#supported-version-syntax
144+
# ex:
145+
# - 1.18beta1 -> 1.18.0-beta.1
146+
# - 1.18rc1 -> 1.18.0-rc.1
147+
go-version: ${{ env.GO_VERSION }}
148+
- name: Build golangci-lint
149+
run: make build
150+
151+
- run: ./golangci-lint
152+
153+
- run: ./golangci-lint cache
154+
- run: ./golangci-lint cache status
155+
- run: ./golangci-lint cache clean
156+
157+
- run: ./golangci-lint completion
158+
- run: ./golangci-lint completion bash
159+
- run: ./golangci-lint completion bash --no-descriptions
160+
- run: ./golangci-lint completion zsh
161+
- run: ./golangci-lint completion zsh --no-descriptions
162+
- run: ./golangci-lint completion fish
163+
- run: ./golangci-lint completion fish --no-descriptions
164+
- run: ./golangci-lint completion powershell
165+
- run: ./golangci-lint completion powershell --no-descriptions
166+
167+
- run: ./golangci-lint config
168+
- run: ./golangci-lint config path
169+
170+
- run: ./golangci-lint help
171+
- run: ./golangci-lint help linters
172+
- run: ./golangci-lint linters
173+
- run: ./golangci-lint version

pkg/config/loader.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,11 @@ func (l *Loader) handleDeprecation() {
304304
}
305305

306306
func (l *Loader) handleEnableOnlyOption() error {
307+
lookup := l.fs.Lookup("enable-only")
308+
if lookup == nil {
309+
return nil
310+
}
311+
307312
only, err := l.fs.GetStringSlice("enable-only")
308313
if err != nil {
309314
return err

0 commit comments

Comments
 (0)