-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add some custom linters to golangci-lint (#3)
Automate a lot of recurring errors.
- Loading branch information
Showing
4 changed files
with
29 additions
and
1 deletion.
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 @@ | ||
linters: | ||
enable: | ||
- errname | ||
- errorlint | ||
- exhaustive | ||
- exhaustruct | ||
- gocheckcompilerdirectives | ||
- gochecknoglobals | ||
- goconst | ||
- goerr113 | ||
- gosec | ||
- godot | ||
- misspell | ||
- stylecheck | ||
- tagliatelle | ||
- unparam | ||
- revive |
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
.PHONE: lint | ||
lint: ## Lint the code with golangci-lint | ||
docker run --rm -v $$(pwd):/app -w /app golangci/golangci-lint golangci-lint run -v | ||
|
||
.PHONY: changelog | ||
changelog: ## Generates a changelog with the template under ./changelog/config.yaml. | ||
go run github.com/aaronfriel/[email protected] create | ||
|
4 changes: 4 additions & 0 deletions
4
...nding/20230724--feat-developer-experience-tests--add-custom-linters-to-golangci-lint.yaml
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,4 @@ | ||
changes: | ||
- type: patch | ||
scope: feat/developer experience,tests | ||
description: Add custom linters to 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
package main | ||
|
||
import "fmt" | ||
import ( | ||
"fmt" | ||
) | ||
|
||
func main() { | ||
fmt.Println("Hello, welcome to go-template!") | ||
|
||
} |