mirror of
https://github.com/lightninglabs/loop
synced 2024-11-09 19:10:47 +00:00
only lint new issues, add linting to travis run
This commit is contained in:
parent
36838cf7f4
commit
a0a03b4972
43
.golangci.yml
Normal file
43
.golangci.yml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
run:
|
||||||
|
# timeout for analysis
|
||||||
|
deadline: 4m
|
||||||
|
|
||||||
|
# Linting uses a lot of memory. Keep it under control by only running a single
|
||||||
|
# worker.
|
||||||
|
concurrency: 1
|
||||||
|
|
||||||
|
linters-settings:
|
||||||
|
gofmt:
|
||||||
|
# simplify code: gofmt with `-s` option, true by default
|
||||||
|
simplify: true
|
||||||
|
|
||||||
|
linters:
|
||||||
|
enable-all: true
|
||||||
|
disable:
|
||||||
|
# Global variables are used in many places throughout the code base.
|
||||||
|
- 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 don't care (enough) about misaligned structs to lint that.
|
||||||
|
- maligned
|
||||||
|
|
||||||
|
# We have long functions, especially in tests. Moving or renaming those would
|
||||||
|
# trigger funlen problems that we may not want to solve at that time.
|
||||||
|
- funlen
|
||||||
|
|
||||||
|
# Disable for now as we haven't yet tuned the sensitivity to our codebase
|
||||||
|
# yet. Enabling by default for example, would also force new contributors to
|
||||||
|
# potentially extensively refactor code, when they want to smaller change to
|
||||||
|
# land.
|
||||||
|
- gocyclo
|
||||||
|
|
||||||
|
# Instances of table driven tests that don't pre-allocate shouldn't trigger
|
||||||
|
# the linter.
|
||||||
|
- prealloc
|
||||||
|
|
||||||
|
issues:
|
||||||
|
# Only show newly introduced problems.
|
||||||
|
new-from-rev: 36838cf7f464cf73b0201798063b2caffeae4250
|
@ -18,7 +18,7 @@ sudo: required
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- export GO111MODULE=on
|
- export GO111MODULE=on
|
||||||
- make unit
|
- make lint unit
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- echo "Uploading to termbin.com..." && find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"
|
- echo "Uploading to termbin.com..." && find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"
|
||||||
|
Loading…
Reference in New Issue
Block a user