Skip to content

Commit 5421447

Browse files
committedFeb 26, 2022
chore(std): add project standrardize config files
1 parent ce6dcd5 commit 5421447

6 files changed

+103
-0
lines changed
 

‎.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,10 @@
1313

1414
# Dependency directories (remove the comment below to include it)
1515
# vendor/
16+
17+
config.toml
18+
main
19+
examples
20+
*.swp
21+
gym
22+
.DS_Store

‎.golangci.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
linters-settings:
2+
errcheck:
3+
check-type-assertions: true
4+
goconst:
5+
min-len: 2
6+
min-occurrences: 3
7+
gocritic:
8+
enabled-tags:
9+
- diagnostic
10+
- experimental
11+
- opinionated
12+
- performance
13+
- style
14+
govet:
15+
check-shadowing: true
16+
nolintlint:
17+
require-explanation: true
18+
require-specific: true
19+
gosec:
20+
excludes:
21+
- G404
22+
23+
linters:
24+
disable-all: true
25+
enable:
26+
- bodyclose
27+
- deadcode
28+
- depguard
29+
- dogsled
30+
- dupl
31+
- errcheck
32+
- exportloopref
33+
- exhaustive
34+
- goconst
35+
- gocritic
36+
- gofmt
37+
- goimports
38+
- gomnd
39+
- gocyclo
40+
- gosec
41+
- gosimple
42+
- govet
43+
- ineffassign
44+
- misspell
45+
- nolintlint
46+
- nakedret
47+
- prealloc
48+
- predeclared
49+
- revive
50+
- staticcheck
51+
- structcheck
52+
- stylecheck
53+
- thelper
54+
- tparallel
55+
- typecheck
56+
- unconvert
57+
- unparam
58+
- varcheck
59+
- whitespace
60+
61+
run:
62+
issues-exit-code: 1

‎.markdownlint.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"comments": {
3+
"markdownlint-cli": "https://github.com/igorshubovych/markdownlint-cli",
4+
"vscode-markdownlint": "https://github.com/DavidAnson/vscode-markdownlint"
5+
}
6+
}

‎.pre-commit-config.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
repos:
2+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
3+
rev: v4.1.0
4+
hooks:
5+
- id: commitlint
6+
stages: [commit-msg]
7+
additional_dependencies: ["@commitlint/config-conventional"]
8+
9+
- repo: https://github.com/golangci/golangci-lint
10+
rev: v1.41.1 # the current latest version
11+
hooks:
12+
- id: golangci-lint
13+
14+
- repo: local
15+
hooks:
16+
- id: markdownlint
17+
name: markdownlint
18+
files: \.md$
19+
entry: markdownlint
20+
language: node
21+
stages: [commit]

‎Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
check:
2+
go vet ./... && markdownlint '**/*.md' && golangci-lint run && go test ./... -count=1
3+
4+
test:
5+
go test ./... -count=1

‎commitlint.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// https://commitlint.js.org/#/guides-local-setup
2+
module.exports = { extends: ['@commitlint/config-conventional'] }

0 commit comments

Comments
 (0)
Please sign in to comment.