Skip to content

Commit e1e97c1

Browse files
committed
feat: add the default rules
It's important to start from a valid base. revive linters are often a trap for people because of the way the default linters are working Fixes #3
1 parent 1b014c3 commit e1e97c1

File tree

3 files changed

+31
-6
lines changed

3 files changed

+31
-6
lines changed

.yamllint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ rules:
99
# the node "on:" present in each GitHub Actions workflow file
1010
ignore: |
1111
.github/
12+
13+
line-length:
14+
max: 200
15+
allow-non-breakable-words: true
16+
allow-non-breakable-inline-mappings: false

01-defaults/.golangci.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
22
linters:
3-
# These linters are enabled by default
4-
# They can be disable by moving them to the 'disable' key
3+
# some linters are enabled by default
4+
# https://golangci-lint.run/usage/linters/
5+
#
6+
# enable some extra linters
57
enable:
68
# Errcheck is a program for checking for unchecked errors in Go code.
79
- errcheck
10+
811
# Linter for Go source code that specializes in simplifying code.
912
- gosimple
13+
1014
# Vet examines Go source code and reports suspicious constructs.
1115
- govet
16+
1217
# Detects when assignments to existing variables are not used.
1318
- ineffassign
19+
1420
# It's a set of rules from staticcheck. See https://staticcheck.io/
1521
- staticcheck
16-
disable:
17-
# empty by default
18-
# but you can any linter here, even the default ones

01-defaults/README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,26 @@ These are the currently available linter that are enabled in the current last `g
44

55
See [.golangci.yaml](.golangci.yaml)
66

7+
## Enabled linters
8+
9+
### errcheck
10+
Errcheck is a program for checking for unchecked errors in Go code.
11+
12+
### gosimple
13+
Linter for Go source code that specializes in simplifying code.
14+
15+
### govet
16+
Vet examines Go source code and reports suspicious constructs.
17+
18+
### ineffassign
19+
Detects when assignments to existing variables are not used.
20+
21+
### staticcheck
22+
It's a set of rules from staticcheck. See https://staticcheck.io/
23+
724
## Changelog
825

9-
- 2024-06-26 - golangci-lint:1.59.1
26+
- 2024-06-28 - golangci-lint:1.59.1
1027

1128
initial version
1229

0 commit comments

Comments
 (0)