Skip to content

Commit ef73743

Browse files
authored
Merge pull request #318 from ziggie1984/master
linter: add 80 column restriction
2 parents c932ae4 + 84f2978 commit ef73743

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.golangci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ linters-settings:
1515
gosec:
1616
excludes:
1717
- G115 # Integer overflow conversion.
18+
lll:
19+
# Max line length, lines longer will be reported.
20+
line-length: 80
21+
# Tab width in spaces.
22+
tab-width: 8
1823

1924
linters:
2025
enable-all: true
2126
disable:
2227
# Global variables are used in many places throughout the code base.
2328
- gochecknoglobals
2429

25-
# Some lines are over 80 characters on purpose and we don't want to make them
26-
# even longer by marking them as 'nolint'.
27-
- lll
28-
2930
# We want to allow short variable names.
3031
- varnamelen
3132

@@ -90,6 +91,9 @@ linters:
9091
- revive
9192

9293
issues:
94+
# Only show newly introduced problems.
95+
new-from-rev: c932ae495eeedc20f58a521d0b3e08889348b06c
96+
9397
exclude-rules:
9498
# Exclude gosec from running for tests so that tests with weak randomness
9599
# (math/rand) will pass the linter.

tools/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ RUN cd /tmp \
1111
&& mkdir -p /tmp/build/.modcache \
1212
&& cd /tmp/tools \
1313
&& go install -trimpath -tags=tools github.com/golangci/golangci-lint/cmd/golangci-lint \
14-
&& chmod -R 777 /tmp/build/
14+
&& chmod -R 777 /tmp/build/ \
15+
&& git config --global --add safe.directory /build
16+
1517

1618
WORKDIR /build

0 commit comments

Comments
 (0)