Skip to content

Commit

Permalink
Use golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
LeSuisse committed Jun 18, 2023
1 parent 50ada74 commit df6eff3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,5 @@ jobs:
- uses: cachix/install-nix-action@4b933aa7ebcc94a6174cf1364864e957b4910265 # tag=v21
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Go fmt
run: nix develop --command sh -c 'diff -u <(echo -n) <(gofmt -d -s *.go ./)'
- name: Go vet
run: nix develop --command go vet ./...
- name: golangci-lint
run: nix develop --command golangci-lint run
22 changes: 22 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
linters:
disable-all: true
enable:
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
- gosec
- stylecheck
- goimports
- gofmt
- tparallel
- prealloc
- misspell
- unconvert
- unparam
- whitespace
- errcheck
- promlinter
- errorlint
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
pkgs.cosign
pkgs.goreleaser
pkgs.syft
pkgs.golangci-lint
];
};
}
Expand Down

0 comments on commit df6eff3

Please sign in to comment.