diff --git a/.golangci.yml b/.golangci.yml index 4fd7b93f1b1..fc9f9e0fda0 100755 --- a/.golangci.yml +++ b/.golangci.yml @@ -66,9 +66,19 @@ linters: - wastedassign # wastedassign finds wasted assignment statements. - gomodguard # check for blocked dependencies - prealloc # Finds slice declarations that could potentially be pre-allocated + - depguard # all available settings of specific linters linters-settings: + depguard: + rules: + apache-licensed-code: + list-mode: lax + files: + - '!**/x-pack/**/*.go' + deny: + - pkg: github.com/elastic/beats/v7/x-pack + desc: Apache 2.0 licensed code cannot depend on Elastic licensed code (x-pack/). errcheck: # report about not checking of errors in type assertions: `a := b.(MyStruct)`; check-type-assertions: false