-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added revive linters Signed-off-by: Corbin Phelps <[email protected]> * Applied linter fixes Signed-off-by: Corbin Phelps <[email protected]> * Added documentation to run commands before PR submittal Signed-off-by: Corbin Phelps <[email protected]> * Removed .golangci.yml Signed-off-by: Corbin Phelps <[email protected]> * Address PR comments Signed-off-by: Corbin Phelps <[email protected]>
- Loading branch information
Corbin Phelps
authored
Feb 18, 2022
1 parent
ba7350d
commit 8733932
Showing
45 changed files
with
165 additions
and
850 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Lint | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v2 | ||
- name: Run Revive Action by pulling pre-built image | ||
uses: docker://morphy/revive-action:v2 | ||
with: | ||
config: revive/config.toml |
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
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 |
---|---|---|
|
@@ -14,13 +14,13 @@ FIELDALIGNMENT_DIRS := ./... | |
TOOLS_MOD_DIR := ./internal/tools | ||
.PHONY: install-tools | ||
install-tools: | ||
cd $(TOOLS_MOD_DIR) && go install github.com/golangci/golangci-lint/cmd/golangci-lint | ||
cd $(TOOLS_MOD_DIR) && go install github.com/vektra/mockery/cmd/mockery | ||
cd $(TOOLS_MOD_DIR) && go install github.com/uw-labs/lichen | ||
cd $(TOOLS_MOD_DIR) && go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment | ||
cd $(TOOLS_MOD_DIR) && go install github.com/observiq/amazon-log-agent-benchmark-tool/cmd/logbench | ||
cd $(TOOLS_MOD_DIR) && go install github.com/goreleaser/goreleaser | ||
cd $(TOOLS_MOD_DIR) && go install github.com/securego/gosec/v2/cmd/[email protected] | ||
cd $(TOOLS_MOD_DIR) && go install github.com/mgechev/revive | ||
|
||
.PHONY: scan-license | ||
scan-license: build-all | ||
|
@@ -61,10 +61,6 @@ listmod: | |
(echo "$${dir}"); \ | ||
done | ||
|
||
.PHONY: lint | ||
lint: | ||
$$GOPATH/bin/golangci-lint run --timeout 2m0s --allow-parallel-runners ./... | ||
|
||
.PHONY: fieldalignment | ||
fieldalignment: | ||
fieldalignment $(FIELDALIGNMENT_DIRS) | ||
|
@@ -146,6 +142,10 @@ build-windows-amd64: | |
release-test: install-tools | ||
goreleaser release --rm-dist --skip-publish --skip-announce --skip-validate | ||
|
||
.PHONY: lint | ||
lint: | ||
revive -config revive/config.toml -formatter friendly ./... | ||
|
||
.PHONY: for-all | ||
for-all: | ||
@set -e; for dir in $(ALL_MODULES); do \ | ||
|
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
Oops, something went wrong.