-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add GO lang linter to GH workflow and pre-commit hook * fix .golangci.yaml * go lang ci lint workflow * remove comments from golang-ci.yml
- Loading branch information
1 parent
b706560
commit aef471c
Showing
4 changed files
with
51 additions
and
0 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,17 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
pull_request: | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
golangci: | ||
name: GO lang CI linter | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 # https://github.com/marketplace/actions/run-golangci-lint | ||
with: | ||
version: v1.43 |
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,11 @@ | ||
linters: | ||
enable: | ||
- megacheck | ||
- gofmt | ||
- govet | ||
- revive # replacement for golint | ||
|
||
linters-settings: | ||
gofmt: | ||
# simplify code: gofmt with `-s` option, true by default | ||
simplify: true |
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,12 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer | ||
|
||
- repo: https://github.com/golangci/golangci-lint | ||
rev: v1.43.0 | ||
hooks: | ||
- id: golangci-lint |
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