Skip to content

Commit

Permalink
rebase poc_bats
Browse files Browse the repository at this point in the history
  • Loading branch information
rachit77 committed Sep 16, 2024
2 parents 773cf34 + 0e0172c commit 14c57f2
Show file tree
Hide file tree
Showing 81 changed files with 2,318 additions and 1,399 deletions.
Binary file added .github/assets/cdk-logo-name.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions .github/assets/cdk-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
version: v1.61
86 changes: 41 additions & 45 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,71 +3,65 @@
run:
timeout: 3m
tests: true
# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true
skip-dirs:
- tests
- aggregator/db/migrations

service:
golangci-lint-version: 1.59.1
golangci-lint-version: 1.61.0

linters:
disable-all: true
enable:
- whitespace # Tool for detection of leading and trailing whitespace
# - wsl # Forces you to use empty lines
- wastedassign # Finds wasted assignment statements
- unconvert # Unnecessary type conversions
- tparallel # Detects inappropriate usage of t.Parallel() method in your Go test codes
- thelper # Detects golang test helpers without t.Helper() call and checks the consistency of test helpers
- stylecheck # Stylecheck is a replacement for golint
- prealloc # Finds slice declarations that could potentially be pre-allocated
- predeclared # Finds code that shadows one of Go's predeclared identifiers
- nolintlint # Ill-formed or insufficient nolint directives
# - nlreturn # Checks for a new line before return and branch statements to increase code clarity
- misspell # Misspelled English words in comments
- makezero # Finds slice declarations with non-zero initial length
- lll # Long lines
- importas # Enforces consistent import aliases
- gosec # Security problems
- gofmt # Whether the code was gofmt-ed
- goimports # Unused imports
- goconst # Repeated strings that could be replaced by a constant
- forcetypeassert # Finds forced type assertions
- dogsled # Checks assignments with too many blank identifiers (e.g. x, , , _, := f())
- dupl # Code clone detection
- errname # Checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13
- gocritic # gocritic is a Go source code linter that maintains checks that are not in other linters
- errcheck # Errcheck is a go lint rule for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
# - godox # Godox is a linter for TODOs and FIXMEs left in the code
- gci # Gci is a linter for checking the consistency of the code with the go code style guide
- gomnd # Gomnd is a linter for magic numbers
# - revive
- unparam # Unparam is a linter for unused function parameters
- whitespace # Tool for detection of leading and trailing whitespace
# - wsl # Forces you to use empty lines
- wastedassign # Finds wasted assignment statements
- unconvert # Unnecessary type conversions
- tparallel # Detects inappropriate usage of t.Parallel() method in your Go test codes
- thelper # Detects golang test helpers without t.Helper() call and checks the consistency of test helpers
- stylecheck # Stylecheck is a replacement for golint
- prealloc # Finds slice declarations that could potentially be pre-allocated
- predeclared # Finds code that shadows one of Go's predeclared identifiers
- nolintlint # Ill-formed or insufficient nolint directives
# - nlreturn # Checks for a new line before return and branch statements to increase code clarity
- misspell # Misspelled English words in comments
- makezero # Finds slice declarations with non-zero initial length
- lll # Long lines
- importas # Enforces consistent import aliases
- gosec # Security problems
- gofmt # Whether the code was gofmt-ed
- goimports # Unused imports
- goconst # Repeated strings that could be replaced by a constant
- forcetypeassert # Finds forced type assertions
- dogsled # Checks assignments with too many blank identifiers (e.g. x, , , _, := f())
- dupl # Code clone detection
- errname # Checks that sentinel errors are prefixed with Err and error types are suffixed with Error
- errorlint # Error wrapping introduced in Go 1.13
- gocritic # gocritic is a Go source code linter that maintains checks that are not in other linters
- errcheck # Errcheck is a go lint rule for checking for unchecked errors
# - godox # Linter for TODOs and FIXMEs left in the code
- gci # Gci checks the consistency of the code with the Go code style guide
- mnd # mnd is a linter for magic numbers
# - revive
- unparam # Unused function parameters

linters-settings:
gofmt:
simplify: true
gocritic:
enabled-checks:
- ruleguard
# settings:
# ruleguard:
# rules: "./gorules/rules.go"
revive:
rules:
- name: exported
arguments:
- disableStutteringCheck
- name: exported
arguments:
- disableStutteringCheck
goconst:
min-len: 3
min-occurrences: 3
gosec:
excludes:
- G115 # Potential integer overflow when converting between integer types

issues:
# new-from-rev: origin/develop # report only new issues with reference to develop branch
whole-files: true
exclude-rules:
- path: '(_test\.go|^test/.*)'
Expand All @@ -78,9 +72,11 @@ issues:
- path: 'etherman/contracts/contracts_(banana|elderberry)\.go'
linters:
- dupl
exclude-dirs:
- tests
- aggregator/db/migrations
include:
- EXC0012 # Exported (.+) should have comment( \(or a comment on this block\))? or be unexported
- EXC0013 # Package comment should be of the form "(.+)...
- EXC0014 # Comment on exported (.+) should be of the form "(.+)..."
- EXC0015 # Should have a package comment

Loading

0 comments on commit 14c57f2

Please sign in to comment.