|
| 1 | +# Visit https://golangci-lint.run/ for usage documentation |
| 2 | +# and information on other useful linters |
| 3 | +issues: |
| 4 | + max-per-linter: 0 |
| 5 | + max-same-issues: 0 |
| 6 | + |
| 7 | +linters: |
| 8 | + enable: |
| 9 | + - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers [fast: true, auto-fix: false] |
| 10 | + - bidichk # Checks for dangerous unicode character sequences [fast: true, auto-fix: false] |
| 11 | + - decorder # check declaration order and count of types, constants, variables and functions [fast: true, auto-fix: false] |
| 12 | + - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()) [fast: true, auto-fix: false] |
| 13 | + - durationcheck # check for two durations multiplied together [fast: false, auto-fix: false] |
| 14 | + - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases [fast: false, auto-fix: false] |
| 15 | + - errchkjson # Checks types passed to the json encoding functions. Reports unsupported types and optionally reports occasions, where the check for the returned error can be omitted. [fast: false, auto-fix: false] |
| 16 | + - errname # Checks that sentinel errors are prefixed with the `Err` and error types are suffixed with the `Error`. [fast: false, auto-fix: false] |
| 17 | + - execinquery # execinquery is a linter about query string checker in Query function which reads your Go src files and warning it finds [fast: false, auto-fix: false] |
| 18 | + - exportloopref # checks for pointers to enclosing loop variables [fast: false, auto-fix: false] |
| 19 | + - forbidigo # Forbids identifiers [fast: true, auto-fix: false] |
| 20 | + - gci # Gci controls golang package import order and makes it always deterministic. [fast: true, auto-fix: false] |
| 21 | + - goconst # Finds repeated strings that could be replaced by a constant [fast: true, auto-fix: false] |
| 22 | + - gocritic # Provides diagnostics that check for bugs, performance and style issues. [fast: false, auto-fix: false] |
| 23 | + - gocyclo # Computes and checks the cyclomatic complexity of functions [fast: true, auto-fix: false] |
| 24 | + - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true, auto-fix: true] |
| 25 | + - goheader # Checks is file header matches to pattern [fast: true, auto-fix: false] |
| 26 | + - gofumpt # Gofumpt checks whether code was gofumpt-ed. [fast: true, auto-fix: true] |
| 27 | + - gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod. [fast: true, auto-fix: false] |
| 28 | + - gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations. [fast: true, auto-fix: false] |
| 29 | + - goprintffuncname # Checks that printf-like functions are named with `f` at the end [fast: true, auto-fix: false] |
| 30 | + - gosec #(gas): Inspects source code for security problems [fast: false, auto-fix: false] |
| 31 | + - gosimple #(megacheck): Linter for Go source code that specializes in simplifying a code [fast: false, auto-fix: false] |
| 32 | + - govet #(vet, vetshadow): Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string [fast: false, auto-fix: false] |
| 33 | + - grouper # An analyzer to analyze expression groups. [fast: true, auto-fix: false] |
| 34 | + - ifshort # Checks that your code uses short syntax for if-statements whenever possible [fast: true, auto-fix: false] |
| 35 | + - importas # Enforces consistent import aliases [fast: false, auto-fix: false] |
| 36 | + - ineffassign # Detects when assignments to existing variables are not used [fast: true, auto-fix: false] |
| 37 | + - makezero # Finds slice declarations with non-zero initial length [fast: false, auto-fix: false] |
| 38 | + - misspell # Finds commonly misspelled English words in comments [fast: true, auto-fix: true] |
| 39 | + - nilerr # Finds the code that returns nil even if it checks that the error is not nil. [fast: false, auto-fix: false] |
| 40 | + - noctx # noctx finds sending http request without context.Context [fast: false, auto-fix: false] |
| 41 | + - nolintlint # Reports ill-formed or insufficient nolint directives [fast: true, auto-fix: false] |
| 42 | + - nosprintfhostport # Checks for misuse of Sprintf to construct a host with port in a URL. [fast: true, auto-fix: false] |
| 43 | + - predeclared # find code that shadows one of Go's predeclared identifiers [fast: true, auto-fix: false] |
| 44 | + - promlinter # Check Prometheus metrics naming via promlint [fast: true, auto-fix: false] |
| 45 | + - revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint. [fast: false, auto-fix: false] |
| 46 | + - rowserrcheck # checks whether Err of rows is checked successfully [fast: false, auto-fix: false] |
| 47 | + - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed. [fast: false, auto-fix: false] |
| 48 | + - stylecheck # Stylecheck is a replacement for golint [fast: false, auto-fix: false] |
| 49 | + - tagliatelle # Checks the struct tags. [fast: true, auto-fix: false] |
| 50 | + - tenv # tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17 [fast: false, auto-fix: false] |
| 51 | + - tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes [fast: false, auto-fix: false] |
| 52 | + - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code [fast: false, auto-fix: false] |
| 53 | + - unconvert # Remove unnecessary type conversions [fast: false, auto-fix: false] |
| 54 | + - wastedassign # wastedassign finds wasted assignment statements. [fast: false, auto-fix: false] |
| 55 | + - whitespace # Tool for detection of leading and trailing whitespace [fast: true, auto-fix: true] |
| 56 | + - 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. [fast: false, auto-fix: false] |
| 57 | + - nilnil # Checks that there is no simultaneous return of `nil` error and an invalid value. [fast: false, auto-fix: false] |
| 58 | + - godot # Check if comments end in a period [fast: true, auto-fix: true] |
| 59 | + - unused #(megacheck): Checks Go code for unused constants, variables, functions and types [fast: false, auto-fix: false] |
| 60 | + - unparam # reports unused function parameters |
| 61 | + - staticcheck #(megacheck): Staticcheck is a go vet on steroids, applying a ton of static analysis checks [fast: false, auto-fix: false] |
| 62 | + - bodyclose # checks whether HTTP response body is closed successfully |
| 63 | + |
| 64 | + disable: |
| 65 | + - dupl # Tool for code clone detection [fast: true, auto-fix: false] |
| 66 | + - varcheck # Finds unused global variables and constants [fast: false, auto-fix: false] |
| 67 | + - deadcode # Finds unused code [fast: false, auto-fix: false] |
| 68 | + - structcheck # Finds unused struct fields [fast: false, auto-fix: false] |
| 69 | + - nakedret # Finds naked returns in functions greater than a specified function length [fast: true, auto-fix: false] |
| 70 | + - depguard # Go linter that checks if package imports are in a list of acceptable packages [fast: true, auto-fix: false] |
| 71 | + - goimports # In addition to fixing imports, goimports also formats your code in the same style as gofmt. [fast: true, auto-fix: true] |
| 72 | + - containedctx # containedctx is a linter that detects struct contained context.Context field [fast: true, auto-fix: false] |
| 73 | + - thelper # thelper detects golang test helpers without t.Helper() call and checks the consistency of test helpers [fast: false, auto-fix: false] |
| 74 | + - cyclop # checks function and package cyclomatic complexity [fast: false, auto-fix: false] |
| 75 | + - exhaustive # check exhaustiveness of enum switch statements [fast: false, auto-fix: false] |
| 76 | + - funlen # Tool for detection of long functions [fast: true, auto-fix: false] |
| 77 | + - gochecknoglobals # check that no global variables exist [fast: true, auto-fix: false] |
| 78 | + - gochecknoinits # Checks that no init functions are present in Go code [fast: true, auto-fix: false] |
| 79 | + - gocognit # Computes and checks the cognitive complexity of functions [fast: true, auto-fix: false] |
| 80 | + - godox # Tool for detection of FIXME, TODO and other comment keywords [fast: true, auto-fix: false] |
| 81 | + - goerr113 # Golang linter to check the errors handling expressions [fast: false, auto-fix: false] |
| 82 | + - gomnd # An analyzer to detect magic numbers. [fast: true, auto-fix: false] |
| 83 | + - lll # Reports long lines [fast: true, auto-fix: false] |
| 84 | + - maintidx # maintidx measures the maintainability index of each function. [fast: true, auto-fix: false] |
| 85 | + - nestif # Reports deeply nested if statements [fast: true, auto-fix: false] |
| 86 | + - nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity [fast: true, auto-fix: false] |
| 87 | + - varnamelen # checks that the length of a variable's name matches its scope [fast: false, auto-fix: false] |
| 88 | + - wrapcheck # Checks that errors returned from external packages are wrapped [fast: false, auto-fix: false] |
| 89 | + - wsl # Whitespace Linter - Forces you to use empty lines! [fast: true, auto-fix: false] |
| 90 | + |
| 91 | +linters-settings: |
| 92 | + goimports: |
| 93 | + local-prefixes: github.com/FrangipaneTeam/tf-doc-extractor |
| 94 | + |
| 95 | + gci: |
| 96 | + # Section configuration to compare against. |
| 97 | + # Section names are case-insensitive and may contain parameters in (). |
| 98 | + # The default order of sections is `standard > default > custom > blank > dot`, |
| 99 | + # If `custom-order` is `true`, it follows the order of `sections` option. |
| 100 | + # Default: ["standard", "default"] |
| 101 | + sections: |
| 102 | + - standard # Standard section: captures all standard packages. |
| 103 | + - default # Default section: contains all imports that could not be matched to another section type. |
| 104 | + - prefix(github.com/FrangipaneTeam) |
| 105 | + - prefix(github.com/FrangipaneTeam/tf-doc-extractor) |
| 106 | + - blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled. |
| 107 | + - dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled. |
| 108 | + skip-generated: true |
| 109 | + custom-order: true |
| 110 | + |
| 111 | + gofumpt: |
| 112 | + # Module path which contains the source code being formatted. |
| 113 | + # Default: "" |
| 114 | + module-path: github.com/FrangipaneTeam/tf-doc-extractor |
| 115 | + # Choose whether to use the extra rules. |
| 116 | + # Default: false |
| 117 | + extra-rules: true |
| 118 | + |
| 119 | + revive: |
| 120 | + revive: |
| 121 | + ignore-generated-header: true |
| 122 | + severity: error |
| 123 | + rules: |
| 124 | + - name: exported |
| 125 | + severity: warning |
| 126 | + disabled: false |
| 127 | + - name: indent-error-flow |
| 128 | + severity: warning |
| 129 | + disabled: false |
| 130 | + - name: var-naming |
| 131 | + severity: warning |
| 132 | + disabled: false |
| 133 | + arguments: |
| 134 | + # List Bypass rules |
| 135 | + - [] |
| 136 | + # List force rules |
| 137 | + - [ |
| 138 | + # Default rules |
| 139 | + "ACL", |
| 140 | + "API", |
| 141 | + "ASCII", |
| 142 | + "CPU", |
| 143 | + "CSS", |
| 144 | + "DNS", |
| 145 | + "EOF", |
| 146 | + "GUID", |
| 147 | + "HTML", |
| 148 | + "HTTP", |
| 149 | + "HTTPS", |
| 150 | + "ID", |
| 151 | + "IP", |
| 152 | + "JSON", |
| 153 | + "LHS", |
| 154 | + "QPS", |
| 155 | + "RAM", |
| 156 | + "RHS", |
| 157 | + "RPC", |
| 158 | + "SLA", |
| 159 | + "SMTP", |
| 160 | + "SQL", |
| 161 | + "SSH", |
| 162 | + "TCP", |
| 163 | + "TLS", |
| 164 | + "TTL", |
| 165 | + "UDP", |
| 166 | + "UI", |
| 167 | + "UID", |
| 168 | + "UUID", |
| 169 | + "URI", |
| 170 | + "URL", |
| 171 | + "UTF8", |
| 172 | + "VM", |
| 173 | + "XML", |
| 174 | + "XMPP", |
| 175 | + "XSRF", |
| 176 | + "XSS", |
| 177 | + # Custom rules |
| 178 | + ] |
0 commit comments