git-chglog/.golangci.yml
renovate[bot] 65fd9c7cb6
fix(deps): update all non-major dependencies (#269)
* fix(deps): update all non-major dependencies

* chore: bump go to v1.24

Signed-off-by: Manuel Vogel <8409778+mavogel@users.noreply.github.com>

* fix: build and lint

Signed-off-by: Manuel Vogel <8409778+mavogel@users.noreply.github.com>

* fix: goreleaser

Signed-off-by: Manuel Vogel <8409778+mavogel@users.noreply.github.com>

* fix: goveralls

Signed-off-by: Manuel Vogel <8409778+mavogel@users.noreply.github.com>

* fix: remove deprecatad linter

Signed-off-by: Manuel Vogel <8409778+mavogel@users.noreply.github.com>

* fix: goveralls latest version install

Signed-off-by: Manuel Vogel <8409778+mavogel@users.noreply.github.com>

* fix: linter

Signed-off-by: Manuel Vogel <8409778+mavogel@users.noreply.github.com>

* fix: bump ci linter to v1.64.7

Signed-off-by: Manuel Vogel <8409778+mavogel@users.noreply.github.com>

* fix: bump ci linter to v1.64.7 and fix issues

Signed-off-by: Manuel Vogel <8409778+mavogel@users.noreply.github.com>

* fix: remove version from linter yaml

Signed-off-by: Manuel Vogel <8409778+mavogel@users.noreply.github.com>

---------

Signed-off-by: Manuel Vogel <8409778+mavogel@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Manuel Vogel <8409778+mavogel@users.noreply.github.com>
2025-03-26 17:06:17 +01:00

103 lines
3 KiB
YAML

# https://golangci-lint.run/usage/configuration/
run:
timeout: 10m
tests: true
linters-settings:
gofmt:
# simplify code: gofmt with `-s` option, true by default
simplify: true
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/git-chglog/git-chglog
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 10
dupl:
# tokens count to trigger issue, 150 by default
threshold: 100
goconst:
# minimal length of string constant, 3 by default
min-len: 3
# minimal occurrences count to trigger, 3 by default
min-occurrences: 5
lll:
# tab width in spaces. Default to 1.
tab-width: 1
unparam:
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
nakedret:
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
max-func-lines: 30
prealloc:
# XXX: we don't recommend using this linter before doing performance profiling.
# For most programs usage of prealloc will be a premature optimization.
# Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.
# True by default.
simple: true
range-loops: true # Report preallocation suggestions on range loops, true by default
for-loops: false # Report preallocation suggestions on for loops, false by default
misspell:
locale: US
linters:
enable:
- gosimple
- staticcheck
- unused
- gocyclo
- goconst
- goimports
- gofmt # We enable this as well as goimports for its simplify mode.
- prealloc
- unconvert
- misspell
- nakedret
- dupl
#- depguard TODO fix later
presets:
- bugs
- unused
fast: false
issues:
# Excluding configuration per-path and per-linter
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test(ing)?\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- unparam
- testifylint
- depguard
# Show only new issues: if there are unstaged changes or untracked files,
# only those changes are analyzed, else only changes in HEAD~ are analyzed.
# It's a super-useful option for integration of golangci-lint into existing
# large codebase. It's not practical to fix all existing issues at the moment
# of integration: much better don't allow issues in new code.
# Default is false.
new: false
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0