Skip to content

Commit

Permalink
Run revive using golang-lint-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
phillebaba committed May 15, 2024
1 parent 6b820c9 commit b01b363
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
3 changes: 0 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ We use [pre-commit](https://pre-commit.com/) to manage our pre-commit hooks. Thi
# install hooks
pre-commit install

# install goimports
go install golang.org/x/tools/cmd/goimports@latest

# install golang-ci-lint
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
```
Expand Down
10 changes: 9 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
timeout: 5m
timeout: 3m
linters:
disable-all: true
enable:
Expand All @@ -12,6 +12,14 @@ linters:
- goimports
- nolintlint
linters-settings:
govet:
enable-all: true
disable:
- shadow
- fieldalignment
- unusedwrite
nolintlint:
require-specific: true
goheader:
template: |-
SPDX-License-Identifier: Apache-2.0
Expand Down
19 changes: 7 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,16 @@ repos:
language: script
- id: goimports
name: goimports
entry: goimports
files: .go$
args:
- -l
- -w
language: system
entry: golangci-lint run --enable-only goimports --fix
types: [go]
language: golang
pass_filenames: true
- id: lint
name: golangci-lint go lint
entry: golangci-lint
args:
- "run"
files: .go$
language: system
pass_filenames: true
entry: golangci-lint run
types: [go]
language: golang
pass_filenames: false
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.14.0
hooks:
Expand Down

0 comments on commit b01b363

Please sign in to comment.