golangci: enable linter lll for long line check

Enables "line too long" check for new code.
This commit is contained in:
yyforyongyu 2022-10-20 16:47:06 +08:00
parent 8c66353e4c
commit 3e593be053
No known key found for this signature in database
GPG key ID: 9BCD95C4FF296868

View file

@ -47,16 +47,18 @@ linters-settings:
go: "1.18" go: "1.18"
checks: ["-SA1019"] checks: ["-SA1019"]
lll:
# Max line length, lines longer will be reported.
line-length: 80
# Tab width in spaces.
tab-width: 8
linters: linters:
enable-all: true enable-all: true
disable: disable:
# Global variables are used in many places throughout the code base. # Global variables are used in many places throughout the code base.
- gochecknoglobals - gochecknoglobals
# Some lines are over 80 characters on purpose and we don't want to make them
# even longer by marking them as 'nolint'.
- lll
# We want to allow short variable names. # We want to allow short variable names.
- varnamelen - varnamelen
@ -124,7 +126,7 @@ linters:
issues: issues:
# Only show newly introduced problems. # Only show newly introduced problems.
new-from-rev: 01f696afce2f9c0d4ed854edefa3846891d01d8a new-from-rev: 8c66353e4c02329abdacb5a8df29998035ec2e24
exclude-rules: exclude-rules:
# Exclude gosec from running for tests so that tests with weak randomness # Exclude gosec from running for tests so that tests with weak randomness