github.com/wfusion/gofusion@v1.1.14/.golangci.yml (about) 1 # Options for analysis running 2 run: 3 # The default concurrency value is the number of available CPU. 4 concurrency: 8 5 # Timeout for analysis, e.g. 30s, 5m. 6 # Default: 1m 7 timeout: 5m 8 # Exit code when at least one issue was found. 9 # Default: 1 10 issues-exit-code: 1 11 # Include test files or not. 12 # Default: true 13 tests: false 14 # List of build tags, all linters use it. 15 # Default: []. 16 build-tags: [] 17 18 # Which dirs to skip: issues from them won't be reported. 19 # Can use regexp here: `generated.*`, regexp is applied on full path, 20 # including the path prefix if one is set. 21 # Default value is empty list, 22 # but default dirs are skipped independently of this option's value (see skip-dirs-use-default). 23 # "/" will be replaced by current OS file path separator to properly work on Windows. 24 skip-dirs: 25 - assets 26 - test 27 - scripts 28 - doc 29 - cmd 30 - bin 31 32 # Enables skipping of directories: 33 # - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ 34 # Default: true 35 skip-dirs-use-default: true 36 37 # Which files to skip: they will be analyzed, but issues from them won't be reported. 38 # Default value is empty list, 39 # but there is no need to include all autogenerated files, 40 # we confidently recognize autogenerated files. 41 # If it's not please let us know. 42 # "/" will be replaced by current OS file path separator to properly work on Windows. 43 skip-files: 44 - test/test.go 45 46 # If set we pass it to "go list -mod={option}". From "go help modules": 47 # If invoked with -mod=readonly, the go command is disallowed from the implicit 48 # automatic updating of go.mod described above. Instead, it fails when any changes 49 # to go.mod are needed. This setting is most useful to check that go.mod does 50 # not need updates, such as in a continuous integration and testing system. 51 # If invoked with -mod=vendor, the go command assumes that the vendor 52 # directory holds the correct copies of dependencies and ignores 53 # the dependency descriptions in go.mod. 54 # 55 # Allowed values: readonly|vendor|mod 56 # By default, it isn't set. 57 # modules-download-mode: readonly 58 59 # Allow multiple parallel golangci-lint instances running. 60 # If false (default) - golangci-lint acquires file lock on start. 61 allow-parallel-runners: false 62 63 # Define the Go version limit. 64 # Mainly related to generics support since go1.18. 65 # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.18 66 # go: '1.18' 67 68 # output configuration options 69 output: 70 # Format: colored-line-number|line-number|json|colored-tab|tab|checkstyle|code-climate|junit-xml|github-actions|teamcity 71 # 72 # Multiple can be specified by separating them by comma, output can be provided 73 # for each of them by separating format name and path by colon symbol. 74 # Output path can be either `stdout`, `stderr` or path to the file to write to. 75 # Example: "checkstyle:report.xml,json:stdout,colored-line-number" 76 # 77 # Default: colored-line-number 78 format: colored-line-number 79 # Print lines of code with issue. 80 # Default: true 81 print-issued-lines: true 82 # Print linter name in the end of issue text. 83 # Default: true 84 print-linter-name: true 85 # Make issues output unique by line. 86 # Default: true 87 uniq-by-line: true 88 # Add a prefix to the output file references. 89 # Default is no prefix. 90 path-prefix: "" 91 # Sort results by: filepath, line and column. 92 sort-results: true 93 94 # linters configuration options 95 linters: 96 # Run only fast linters from enabled linters set (first run won't be fast) 97 # Default: false 98 fast: true 99 # Disable all linters. 100 # Default: false 101 disable-all: true 102 # Enable specific linter 103 # https://golangci-lint.run/usage/linters/#enabled-by-default-linters 104 enable: 105 # default plugins are errcheck, gosimple, govet, ineffassign, staticcheck, unused 106 - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases. 107 - gosimple # Linter for Go source code that specializes in simplifying code. 108 #- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string. 109 #- ineffassign # Detects when assignments to existing variables are not used. 110 #- staticcheck # It's a set of rules from staticcheck. It's not the same thing as the staticcheck binary. 111 - unused # Checks Go code for unused constants, variables, functions and types. 112 # custom plugins 113 - revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint. 114 - nolintlint # Reports ill-formed or insufficient nolint directives. 115 116 # linters-settings configuration options 117 linters-settings: 118 errcheck: 119 # Report about not checking of errors in type assertions: `a := b.(MyStruct)`. 120 # Such cases aren't reported by default. 121 # Default: false 122 check-type-assertions: false 123 # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`. 124 # Such cases aren't reported by default. 125 # Default: false 126 check-blank: false 127 # To disable the errcheck built-in exclude list. 128 # See `-excludeonly` option in https://github.com/kisielk/errcheck#excluding-functions for details. 129 # Default: false 130 disable-default-exclusions: false 131 # List of functions to exclude from checking, where each entry is a single function to exclude. 132 # See https://github.com/kisielk/errcheck#excluding-functions for details. 133 exclude-functions: [] 134 135 gosimple: 136 # See checks in https://staticcheck.io/docs/configuration/options/#checks 137 # Default: ["*"] 138 checks: [ "*" ] 139 140 # go-lint 141 revive: 142 # Maximum number of open files at the same time. 143 # See https://github.com/mgechev/revive#command-line-flags 144 # Defaults to unlimited. 145 # max-open-files: 2048 146 147 # When set to false, ignores files with "GENERATED" header, similar to golint. 148 # See https://github.com/mgechev/revive#available-rules for details. 149 # Default: false 150 ignore-generated-header: false 151 # Sets the default severity. 152 # See https://github.com/mgechev/revive#configuration 153 # Default: warning 154 severity: warning 155 # Enable all available rules. 156 # Default: false 157 enable-all-rules: false 158 # Sets the default failure confidence. 159 # This means that linting errors with less than 0.8 confidence will be ignored. 160 # Default: 0.8 161 confidence: 0.8 162 # config by GUI - https://linksaas.pro/download 163 rules: 164 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#add-constant 165 # Description: Suggests using constant for magic numbers and string literals. 166 # Configuration: 167 # - maxLitCount : (string) maximum number of instances of a string literal that are tolerated before warn. 168 # - allowStr: (string) comma-separated list of allowed string literals 169 # - allowInts: (string) comma-separated list of allowed integers 170 # - allowFloats: (string) comma-separated list of allowed floats 171 # - ignoreFuncs: (string) comma-separated list of function names regexp patterns to exclude 172 - name: add-constant 173 severity: warning 174 disabled: true 175 arguments: 176 - maxLitCount: "3" 177 allowStrs: '""' 178 allowInts: "0,1,2,10,32,64,1024" 179 allowFloats: "0.0,0.,1.0,1.,2.0,2." 180 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#argument-limit 181 # Description: Warns when a function receives more parameters than the maximum set by the rule's configuration. Enforcing a maximum number of parameters helps to keep the code readable and maintainable. 182 # Configuration: (int) the maximum number of parameters allowed per function. 183 - name: argument-limit 184 severity: warning 185 disabled: false 186 arguments: [ 10 ] 187 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#atomic 188 # Description: Check for commonly mistaken usages of the sync/atomic package 189 # Configuration: N/A 190 - name: atomic 191 severity: warning 192 disabled: false 193 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#banned-characters 194 # Description: Checks given banned characters in identifiers(func, var, const). Comments are not checked. 195 # Configuration: This rule requires a slice of strings, the characters to ban. 196 - name: banned-characters 197 severity: warning 198 disabled: true 199 arguments: [ "Ω", "Σ", "σ" ] 200 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bare-return 201 - name: bare-return 202 severity: warning 203 disabled: true 204 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#blank-imports 205 - name: blank-imports 206 severity: warning 207 disabled: true 208 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr 209 - name: bool-literal-in-expr 210 severity: warning 211 disabled: true 212 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#call-to-gc 213 - name: call-to-gc 214 severity: warning 215 disabled: true 216 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cognitive-complexity 217 - name: cognitive-complexity 218 severity: warning 219 disabled: true 220 arguments: [ 15 ] 221 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#comment-spacings 222 # Description: Spots comments of the form: 223 # `//This is a malformed comment: no space between // and the start of the sentence` 224 # Configuration: ([]string) list of exceptions. For example, to accept comments of the form 225 # `//mypragma: activate something` 226 - name: comment-spacings 227 severity: warning 228 disabled: false 229 arguments: [] 230 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-naming 231 # Description: Methods or fields of struct that have names different only by capitalization could be confusing. 232 # Configuration: N/A 233 - name: confusing-naming 234 severity: warning 235 disabled: true 236 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-results 237 - name: confusing-results 238 severity: warning 239 disabled: true 240 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr 241 - name: constant-logical-expr 242 severity: warning 243 disabled: true 244 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument 245 - name: context-as-argument 246 severity: warning 247 disabled: true 248 arguments: 249 - allowTypesBefore: "*testing.T,*github.com/user/repo/testing.Harness" 250 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type 251 - name: context-keys-type 252 severity: warning 253 disabled: true 254 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cyclomatic 255 - name: cyclomatic 256 severity: warning 257 disabled: true 258 arguments: [ 15 ] 259 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#datarace 260 - name: datarace 261 severity: warning 262 disabled: true 263 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#deep-exit 264 - name: deep-exit 265 severity: warning 266 disabled: true 267 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#defer 268 # Description: This rule warns on some common mistakes when using defer statement. It currently alerts on the following situations: 269 # Configuration: by default all warnings are enabled, but it is possible selectively enable them through configuration. 270 # call-chain, loop, method-call, recover, immediate-recover, return 271 - name: defer 272 severity: warning 273 disabled: false 274 arguments: 275 - [ "call-chain", "loop", "method-call", "recover", "immediate-recover", "return" ] 276 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#dot-imports 277 - name: dot-imports 278 severity: warning 279 disabled: true 280 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#duplicated-imports 281 - name: duplicated-imports 282 severity: warning 283 disabled: true 284 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return 285 - name: early-return 286 severity: warning 287 disabled: true 288 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block 289 # Description: Empty blocks make code less readable and could be a symptom of a bug or unfinished refactoring. 290 # Configuration: N/A 291 - name: empty-block 292 severity: warning 293 disabled: false 294 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines 295 # Description: Sometimes gofmt is not enough to enforce a common formatting of a code-base; this rule warns when there are heading or trailing newlines in code blocks. 296 # Configuration: N/A 297 - name: empty-lines 298 severity: warning 299 disabled: false 300 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming 301 - name: error-naming 302 severity: warning 303 disabled: true 304 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-return 305 - name: error-return 306 severity: warning 307 disabled: true 308 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-strings 309 - name: error-strings 310 severity: warning 311 disabled: true 312 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#errorf 313 - name: errorf 314 severity: warning 315 disabled: true 316 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported 317 # Description: Exported function and methods should have comments. This warns on undocumented exported functions and methods. 318 # Configuration: ([]string) rule flags. Please notice that without configuration, the default behavior of the rule is that of its golint counterpart. Available flags are: 319 # - checkPrivateReceivers enables checking public methods of private types 320 # - disableStutteringCheck disables checking for method names that stutter with the package name (i.e. avoid failure messages of the form type name will be used as x.XY by other packages, and that stutters; consider calling this Y) 321 # - sayRepetitiveInsteadOfStutters replaces the use of the term stutters by repetitive in failure messages 322 - name: exported 323 severity: warning 324 disabled: false 325 arguments: 326 - "checkPrivateReceivers" 327 - "sayRepetitiveInsteadOfStutters" 328 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#file-header 329 - name: file-header 330 severity: warning 331 disabled: true 332 arguments: 333 - This is the text that must appear at the top of source files. 334 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#flag-parameter 335 - name: flag-parameter 336 severity: warning 337 disabled: true 338 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-result-limit 339 - name: function-result-limit 340 severity: warning 341 disabled: true 342 arguments: [ 2 ] 343 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-length 344 # Description: Functions too long (with many statements and/or lines) can be hard to understand. 345 # Configuration: (int,int) the maximum allowed statements and lines. Must be non-negative integers. Set to 0 to disable the check 346 - name: function-length 347 severity: warning 348 disabled: false 349 arguments: [ 80, 0 ] 350 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#get-return 351 - name: get-return 352 severity: warning 353 disabled: true 354 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#identical-branches 355 # Description: an if-then-else conditional with identical implementations in both branches is an error. 356 # Configuration: N/A 357 - name: identical-branches 358 severity: warning 359 disabled: false 360 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return 361 - name: if-return 362 severity: warning 363 disabled: true 364 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#increment-decrement 365 - name: increment-decrement 366 severity: warning 367 disabled: true 368 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#indent-error-flow 369 - name: indent-error-flow 370 severity: warning 371 disabled: true 372 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#imports-blacklist 373 - name: imports-blacklist 374 severity: warning 375 disabled: true 376 arguments: 377 - "crypto/md5" 378 - "crypto/sha1" 379 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#import-shadowing 380 - name: import-shadowing 381 severity: warning 382 disabled: true 383 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#line-length-limit 384 # Description: Warns in the presence of code lines longer than a configured maximum. 385 # Configuration: (int) maximum line length in characters. 386 - name: line-length-limit 387 severity: warning 388 disabled: false 389 arguments: [ 120 ] 390 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#max-public-structs 391 - name: max-public-structs 392 severity: warning 393 disabled: true 394 arguments: [ 3 ] 395 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#modifies-parameter 396 - name: modifies-parameter 397 severity: warning 398 disabled: true 399 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#modifies-value-receiver 400 - name: modifies-value-receiver 401 severity: warning 402 disabled: true 403 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#nested-structs 404 - name: nested-structs 405 severity: warning 406 disabled: true 407 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#optimize-operands-order 408 - name: optimize-operands-order 409 severity: warning 410 disabled: true 411 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments 412 - name: package-comments 413 severity: warning 414 disabled: true 415 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range 416 - name: range 417 severity: warning 418 disabled: true 419 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-in-closure 420 # Description: Range variables in a loop are reused at each iteration; therefore a goroutine created in a loop will point to the range variable with from the upper scope. This way, the goroutine could use the variable with an undesired value. This rule warns when a range value (or index) is used inside a closure 421 # Configuration: N/A 422 - name: range-val-in-closure 423 severity: warning 424 disabled: false 425 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-address 426 - name: range-val-address 427 severity: warning 428 disabled: true 429 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#receiver-naming 430 - name: receiver-naming 431 severity: warning 432 disabled: true 433 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redefines-builtin-id 434 # Description: Constant names like false, true, nil, function names like append, make, and basic type names like bool, and byte are not reserved words of the language; therefore the can be redefined. Even if possible, redefining these built in names can lead to bugs very difficult to detect. 435 # Configuration: N/A 436 - name: redefines-builtin-id 437 severity: warning 438 disabled: false 439 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-of-int 440 - name: string-of-int 441 severity: warning 442 disabled: true 443 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-format 444 - name: string-format 445 severity: warning 446 disabled: true 447 arguments: 448 - - 'core.WriteError[1].Message' 449 - '/^([^A-Z]|$)/' 450 - must not start with a capital letter 451 - - 'fmt.Errorf[0]' 452 - '/(^|[^\.!?])$/' 453 - must not end in punctuation 454 - - panic 455 - '/^[^\n]*$/' 456 - must not contain line breaks 457 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag 458 - name: struct-tag 459 arguments: 460 - "json,inline" 461 - "bson,outline,gnu" 462 severity: warning 463 disabled: true 464 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#superfluous-else 465 # Description: To improve the readability of code, it is recommended to reduce the indentation as much as possible. This rule highlights redundant else-blocks that can be eliminated from the code. 466 # Configuration: ([]string) rule flags. Available flags are: 467 # - preserveScope: do not suggest refactorings that would increase variable scope 468 - name: superfluous-else 469 severity: warning 470 disabled: false 471 arguments: 472 - preserveScope 473 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal 474 # Description: This rule warns when using == and != for equality check time.Time and suggest to time.time.Equal method, for about information follow this link: https://pkg.go.dev/time#Time 475 # Configuration: N/A 476 - name: time-equal 477 severity: warning 478 disabled: false 479 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-naming 480 - name: time-naming 481 severity: warning 482 disabled: true 483 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-naming 484 # Description: This rule warns when initialism, variable or package naming conventions are not followed. 485 # Configuration: This rule accepts two slices of strings and one optional slice with single map with named parameters. (it's due to TOML hasn't "slice of any" and we keep backward compatibility with previous config version) First slice is a whitelist and second one is a blacklist of initialisms. In map, you can add "upperCaseConst=true" parameter to allow UPPER_CASE for const By default, the rule behaves exactly as the alternative in golint but optionally, you can relax it (see https://github.com/golang/lint/issues/89) 486 - name: var-naming 487 severity: warning 488 disabled: false 489 arguments: 490 # whitelist 491 - - ID 492 - JSON 493 - CPU 494 - GPU 495 - MEM 496 - HTTP 497 - URL 498 - VM 499 - GoStack 500 # blacklist 501 - [] 502 # optional 503 - - { upperCaseConst=true } 504 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration 505 # Description: This rule proposes simplifications of variable declarations. 506 # Configuration: N/A 507 - name: var-declaration 508 severity: warning 509 disabled: false 510 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unconditional-recursion 511 - name: unconditional-recursion 512 severity: warning 513 disabled: true 514 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-naming 515 - name: unexported-naming 516 severity: warning 517 disabled: true 518 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return 519 - name: unexported-return 520 severity: warning 521 disabled: true 522 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error 523 - name: unhandled-error 524 severity: warning 525 disabled: false 526 arguments: 527 - "fmt.Fprint" 528 - "fmt.Fprintf" 529 - "fmt.Fprintln" 530 - "fmt.Print" 531 - "fmt.Printf" 532 - "fmt.Println" 533 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt 534 - name: unnecessary-stmt 535 severity: warning 536 disabled: true 537 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unreachable-code 538 # Description: This rule spots and proposes to remove unreachable code. 539 # Configuration: N/A 540 - name: unreachable-code 541 severity: warning 542 disabled: false 543 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter 544 - name: unused-parameter 545 severity: warning 546 disabled: true 547 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-receiver 548 - name: unused-receiver 549 severity: warning 550 disabled: true 551 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break 552 - name: useless-break 553 severity: warning 554 disabled: true 555 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value 556 - name: waitgroup-by-value 557 severity: warning 558 disabled: true 559 560 nolintlint: 561 # Disable to ensure that all nolint directives actually have an effect. 562 # Default: false 563 allow-unused: false 564 # Exclude following linters from requiring an explanation. 565 # Default: [] 566 allow-no-explanation: [] 567 # Enable to require an explanation of nonzero length after each nolint directive. 568 # Default: false 569 require-explanation: true 570 # Enable to require nolint directives to mention the specific linter being suppressed. 571 # Default: false 572 require-specific: true 573 574 # issues configuration options 575 issues: 576 # List of regexps of issue texts to exclude. 577 # 578 # But independently of this option we use default exclude patterns, 579 # it can be disabled by `exclude-use-default: false`. 580 # To list all excluded by default patterns execute `golangci-lint run --help` 581 # 582 # Default: https://golangci-lint.run/usage/false-positives/#default-exclusions 583 exclude: [] 584 # Excluding configuration per-path, per-linter, per-text and per-source 585 exclude-rules: 586 # Exclude some linters from running on tests files. 587 - path: _test\.go 588 linters: 589 - errcheck 590 - revive 591 # Run some linter only for test files by excluding its issues for everything else. 592 - path-except: _test\.go 593 linters: 594 - forbidigo 595 # Exclude known linters from partially hard-vendored code, 596 # which is impossible to exclude via `nolint` comments. 597 # `/` will be replaced by current OS file path separator to properly work on Windows. 598 - path: internal/hmac/ 599 text: "weak cryptographic primitive" 600 linters: 601 - gosec 602 # Exclude some `revive` messages about json. 603 #- linters: 604 # - revive 605 # text: "var-naming: (const|func|type) .*Json.* should be .*JSON.*" 606 # Exclude `revive` issues for long lines with `go:generate`. 607 - linters: 608 - revive 609 source: "^//go:(generate|linkname) " 610 #- linters: 611 # - revive 612 # source: "^func UUID_() string$" 613 # Independently of option `exclude` we use default exclude patterns, 614 # it can be disabled by this option. 615 # To list all excluded by default patterns execute `golangci-lint run --help`. 616 # Default: true. 617 exclude-use-default: true 618 # If set to true exclude and exclude-rules regular expressions become case-sensitive. 619 # Default: false 620 exclude-case-sensitive: false 621 # The list of ids of default excludes to include or disable. 622 # https://golangci-lint.run/usage/false-positives/#default-exclusions 623 # Default: [] 624 include: [] 625 #- EXC0001 626 #- EXC0002 627 #- EXC0003 628 #- EXC0004 629 #- EXC0005 630 #- EXC0006 631 #- EXC0007 632 #- EXC0008 633 #- EXC0009 634 #- EXC0010 635 #- EXC0011 636 #- EXC0012 637 #- EXC0013 638 #- EXC0014 639 #- EXC0015 640 # Maximum issues count per one linter. 641 # Set to 0 to disable. 642 # Default: 50 643 max-issues-per-linter: 50 644 # Maximum count of issues with the same text. 645 # Set to 0 to disable. 646 # Default: 3 647 max-same-issues: 3 648 # Show only new issues: if there are unstaged changes or untracked files, 649 # only those changes are analyzed, else only changes in HEAD~ are analyzed. 650 # It's a super-useful option for integration of golangci-lint into existing large codebase. 651 # It's not practical to fix all existing issues at the moment of integration: 652 # much better don't allow issues in new code. 653 # 654 # Default: false. 655 new: false 656 # Show only new issues created after git revision `REV`. 657 # new-from-rev: HEAD 658 # Show only new issues created in git patch with set file path. 659 # new-from-patch: path/to/patch/file 660 # Fix found issues (if it's supported by the linter). 661 fix: true 662 663 # severity configuration options 664 severity: 665 # Set the default severity for issues. 666 # 667 # If severity rules are defined and the issues do not match or no severity is provided to the rule 668 # this will be the default severity applied. 669 # Severities should match the supported severity names of the selected out format. 670 # - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity 671 # - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#SeverityLevel 672 # - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message 673 # - TeamCity: https://www.jetbrains.com/help/teamcity/service-messages.html#Inspection+Instance 674 # 675 # Default value is an empty string. 676 default-severity: "" 677 # If set to true `severity-rules` regular expressions become case-sensitive. 678 # Default: false 679 case-sensitive: false 680 # When a list of severity rules are provided, severity information will be added to lint issues. 681 # Severity rules have the same filtering capability as exclude rules 682 # except you are allowed to specify one matcher per severity rule. 683 # Only affects out formats that support setting severity information. 684 # 685 # Default: [] 686 rules: []