Skip to content

Commit

Permalink
Merge pull request #868 from lightninglabs/lll-linter
Browse files Browse the repository at this point in the history
Add lll linter to golangci-lint configuration
  • Loading branch information
guggero authored Apr 8, 2024
2 parents c723abd + 73e5439 commit 74e186f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: CI
on:
push:
branches:
- "main"
- 'main'
pull_request:
branches:
- "*"
- '*'
merge_group:
branches:
- "main"
- 'main'

defaults:
run:
Expand Down Expand Up @@ -110,13 +110,13 @@ jobs:
- name: Build default image
uses: docker/build-push-action@v4
with:
tags: "default-taproot-assets"
tags: 'default-taproot-assets'

- name: Build dev image
uses: docker/build-push-action@v4
with:
file: dev.Dockerfile
tags: "dev-taproot-assets"
tags: 'dev-taproot-assets'

########################
# cross compilation
Expand All @@ -143,6 +143,8 @@ jobs:
steps:
- name: git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup go environment
uses: ./.github/actions/setup-go
Expand Down
21 changes: 14 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
run:
# timeout for analysis
deadline: 4m
timeout: 4m

linters-settings:
errorlint:
Expand All @@ -26,13 +26,18 @@ linters-settings:
exhaustive:
default-signifies-exhaustive: true
gocritic:
enabled-checks:
- singleCaseSwitch
- ifElseChain
- assignOp
- unlambda
enabled-checks:
- singleCaseSwitch
- ifElseChain
- assignOp
- unlambda
staticcheck:
checks: ["-SA1019"]
checks: ['-SA1019']
lll:
# Max line length, lines longer will be reported.
line-length: 80
# Tab width in spaces.
tab-width: 8

linters:
enable:
Expand All @@ -46,6 +51,7 @@ linters:
- unconvert
- nilerr
- exhaustive
- lll

issues:
exclude-rules:
Expand All @@ -66,3 +72,4 @@ issues:
- unused
- deadcode
- varcheck
new-from-rev: c723abd3c9db8a6a2f3f1eaa85ce5aefb52c8170

0 comments on commit 74e186f

Please sign in to comment.