Skip to content

Commit

Permalink
tools: Disable auto-fixing linter issues by default (#429)
Browse files Browse the repository at this point in the history
* RELATED ISSUES(S):
Resolves #428 

* DESCRIPTION:
- Changes `make lint` to be a read-only lint operation.
- Adds a `make lint:fix` rule to do auto-fixing using linters.
  • Loading branch information
shahzadlone authored May 11, 2022
1 parent e39deb1 commit 896602a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ validate\:circleci:
lint:
golangci-lint run --config tools/configs/golangci.yaml

.PHONY: lint\:fix
lint\:fix:
golangci-lint run --config tools/configs/golangci.yaml --fix

.PHONY: lint\:todo
lint\:todo:
rg "nolint" -g '!{Makefile}'
Expand Down
10 changes: 2 additions & 8 deletions tools/configs/golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,8 @@ issues:
# of integration: much better don't allow issues in new code.
new: false

# Show only new issues created after git revision `REV`
# new-from-rev: REV

# Show only new issues created in git patch with set file path.
# new-from-patch: path/to/patch/file

# Fix found issues (if it's supported by the linter)
fix: true
# Don't auto-fix found issues by default (even if it's supported by the linter).
fix: false


#==================================================================[ All Settings Of Specific Linters We Have Enabled]
Expand Down

0 comments on commit 896602a

Please sign in to comment.