-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: run revive using golang-lint-ci (#2499)
## Description This replaces revive with golang-ci-lint, and instead runs revive through the aforementioned tool. Additionally it replaces the header check script with the goheader linter. The benefit of this change is that we can enable more linters along with revive in the future. ## Related Issue Part of #2503 ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [x] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/.github/CONTRIBUTING.md#developer-workflow) followed --------- Co-authored-by: Austin Abro <[email protected]> Co-authored-by: razzle <[email protected]>
- Loading branch information
1 parent
53465d7
commit 04d9e0e
Showing
8 changed files
with
77 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
run: | ||
timeout: 5m | ||
linters: | ||
disable-all: true | ||
enable: | ||
- gosimple | ||
- govet | ||
- staticcheck | ||
- unused | ||
- revive | ||
- goheader | ||
- goimports | ||
- nolintlint | ||
linters-settings: | ||
govet: | ||
enable-all: true | ||
disable: | ||
- shadow | ||
- fieldalignment | ||
- unusedwrite | ||
nolintlint: | ||
require-specific: true | ||
goheader: | ||
template: |- | ||
SPDX-License-Identifier: Apache-2.0 | ||
SPDX-FileCopyrightText: 2021-Present The Zarf Authors | ||
revive: | ||
rules: | ||
- name: blank-imports | ||
- name: context-as-argument | ||
- name: context-keys-type | ||
- name: dot-imports | ||
- name: error-return | ||
- name: error-strings | ||
- name: error-naming | ||
- name: exported | ||
- name: if-return | ||
- name: increment-decrement | ||
- name: var-naming | ||
- name: var-declaration | ||
- name: package-comments | ||
- name: range | ||
- name: receiver-naming | ||
- name: time-naming | ||
- name: unexported-return | ||
- name: indent-error-flow | ||
- name: errorf | ||
- name: empty-block | ||
- name: superfluous-else | ||
- name: unused-parameter | ||
- name: unreachable-code | ||
- name: redefines-builtin-id | ||
issues: | ||
# Revive rules that are disabled by default. | ||
include: | ||
- EXC0012 | ||
- EXC0013 | ||
- EXC0014 | ||
- EXC0015 | ||
# Exclude linting code copied from Helm. | ||
exclude-dirs: | ||
- "src/cmd/tools/helm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters