Skip to content

Commit

Permalink
dev: Fix golangci-lint reporting issues in ignored files in VS Code (#…
Browse files Browse the repository at this point in the history
…1296)

Signed-off-by: Anders Eknert <anders@styra.com>
  • Loading branch information
anderseknert authored Dec 12, 2024
1 parent bc46bd6 commit 668950a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,12 @@ linters-settings:
issues:
exclude-dirs:
- internal/lsp/opa
exclude-files:
# For whatever reason, the exclude-dirs setting isn't honored when
# golangci-lint is targeting one of these files *specifically* rather
# than whole whole workspace / directory. This happens when opening up
# one of these files in VS Code, which will have the linter complain
# loudly. Hopefully this workaround can be removed in the future.
- oracle.go
- scanner.go
- tokens.go
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"opa.roots": [
"${workspaceFolder}/bundle"
],
"opa.strictMode": true
"opa.strictMode": true,
"go.lintTool": "golangci-lint"
}

0 comments on commit 668950a

Please sign in to comment.