github.com/yuqengo/golangci-lint@v0.0.2/.golangci.reference.yml (about) 1 # This file contains all available configuration options 2 # with their default values (in comments). 3 # 4 # This file is not a configuration example, 5 # it contains the exhaustive configuration with explanations of the options. 6 7 # Options for analysis running. 8 run: 9 # The default concurrency value is the number of available CPU. 10 concurrency: 4 11 12 # Timeout for analysis, e.g. 30s, 5m. 13 # Default: 1m 14 timeout: 5m 15 16 # Exit code when at least one issue was found. 17 # Default: 1 18 issues-exit-code: 2 19 20 # Include test files or not. 21 # Default: true 22 tests: false 23 24 # List of build tags, all linters use it. 25 # Default: []. 26 build-tags: 27 - mytag 28 29 # Which dirs to skip: issues from them won't be reported. 30 # Can use regexp here: `generated.*`, regexp is applied on full path. 31 # Default value is empty list, 32 # but default dirs are skipped independently of this option's value (see skip-dirs-use-default). 33 # "/" will be replaced by current OS file path separator to properly work on Windows. 34 skip-dirs: 35 - src/external_libs 36 - autogenerated_by_my_lib 37 38 # Enables skipping of directories: 39 # - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ 40 # Default: true 41 skip-dirs-use-default: false 42 43 # Which files to skip: they will be analyzed, but issues from them won't be reported. 44 # Default value is empty list, 45 # but there is no need to include all autogenerated files, 46 # we confidently recognize autogenerated files. 47 # If it's not please let us know. 48 # "/" will be replaced by current OS file path separator to properly work on Windows. 49 skip-files: 50 - ".*\\.my\\.go$" 51 - lib/bad.go 52 53 # If set we pass it to "go list -mod={option}". From "go help modules": 54 # If invoked with -mod=readonly, the go command is disallowed from the implicit 55 # automatic updating of go.mod described above. Instead, it fails when any changes 56 # to go.mod are needed. This setting is most useful to check that go.mod does 57 # not need updates, such as in a continuous integration and testing system. 58 # If invoked with -mod=vendor, the go command assumes that the vendor 59 # directory holds the correct copies of dependencies and ignores 60 # the dependency descriptions in go.mod. 61 # 62 # Allowed values: readonly|vendor|mod 63 # By default, it isn't set. 64 modules-download-mode: readonly 65 66 # Allow multiple parallel golangci-lint instances running. 67 # If false (default) - golangci-lint acquires file lock on start. 68 allow-parallel-runners: false 69 70 # Define the Go version limit. 71 # Mainly related to generics support since go1.18. 72 # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.18 73 go: '1.19' 74 75 76 # output configuration options 77 output: 78 # Format: colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions 79 # 80 # Multiple can be specified by separating them by comma, output can be provided 81 # for each of them by separating format name and path by colon symbol. 82 # Output path can be either `stdout`, `stderr` or path to the file to write to. 83 # Example: "checkstyle:report.json,colored-line-number" 84 # 85 # Default: colored-line-number 86 format: json 87 88 # Print lines of code with issue. 89 # Default: true 90 print-issued-lines: false 91 92 # Print linter name in the end of issue text. 93 # Default: true 94 print-linter-name: false 95 96 # Make issues output unique by line. 97 # Default: true 98 uniq-by-line: false 99 100 # Add a prefix to the output file references. 101 # Default is no prefix. 102 path-prefix: "" 103 104 # Sort results by: filepath, line and column. 105 sort-results: false 106 107 108 # All available settings of specific linters. 109 linters-settings: 110 asasalint: 111 # To specify a set of function names to exclude. 112 # The values are merged with the builtin exclusions. 113 # The builtin exclusions can be disabled by setting `use-builtin-exclusions` to `false`. 114 # Default: ["^(fmt|log|logger|t|)\.(Print|Fprint|Sprint|Fatal|Panic|Error|Warn|Warning|Info|Debug|Log)(|f|ln)$"] 115 exclude: 116 - Append 117 - \.Wrapf 118 # To enable/disable the asasalint builtin exclusions of function names. 119 # See the default value of `exclude` to get the builtin exclusions. 120 # Default: true 121 use-builtin-exclusions: false 122 # Ignore *_test.go files. 123 # Default: false 124 ignore-test: true 125 126 bidichk: 127 # The following configurations check for all mentioned invisible unicode runes. 128 # All runes are enabled by default. 129 left-to-right-embedding: false 130 right-to-left-embedding: false 131 pop-directional-formatting: false 132 left-to-right-override: false 133 right-to-left-override: false 134 left-to-right-isolate: false 135 right-to-left-isolate: false 136 first-strong-isolate: false 137 pop-directional-isolate: false 138 139 cyclop: 140 # The maximal code complexity to report. 141 # Default: 10 142 max-complexity: 10 143 # The maximal average package complexity. 144 # If it's higher than 0.0 (float) the check is enabled 145 # Default: 0.0 146 package-average: 0.5 147 # Should ignore tests. 148 # Default: false 149 skip-tests: true 150 151 decorder: 152 # Required order of `type`, `const`, `var` and `func` declarations inside a file. 153 # Default: types before constants before variables before functions. 154 dec-order: 155 - type 156 - const 157 - var 158 - func 159 160 # If true, order of declarations is not checked at all. 161 # Default: true (disabled) 162 disable-dec-order-check: false 163 164 # If true, `init` func can be anywhere in file (does not have to be declared before all other functions). 165 # Default: true (disabled) 166 disable-init-func-first-check: false 167 168 # If true, multiple global `type`, `const` and `var` declarations are allowed. 169 # Default: true (disabled) 170 disable-dec-num-check: false 171 172 depguard: 173 # Kind of list is passed in. 174 # Allowed values: allowlist|denylist 175 # Default: denylist 176 list-type: allowlist 177 178 # Check the list against standard lib. 179 # Default: false 180 include-go-root: true 181 182 # A list of packages for the list type specified. 183 # Can accept both string prefixes and string glob patterns. 184 # Default: [] 185 packages: 186 - github.com/sirupsen/logrus 187 - allow/**/pkg 188 189 # A list of packages for the list type specified. 190 # Specify an error message to output when a denied package is used. 191 # Default: [] 192 packages-with-error-message: 193 - github.com/sirupsen/logrus: 'logging is allowed only by logutils.Log' 194 195 # Specify rules by which the linter ignores certain files for consideration. 196 # Can accept both string prefixes and string glob patterns. 197 # The ! character in front of the rule is a special character 198 # which signals that the linter should negate the rule. 199 # This allows for more precise control, but it is only available for glob patterns. 200 # Default: [] 201 ignore-file-rules: 202 - "ignore/**/*.go" 203 - "!**/*_test.go" 204 205 # Create additional guards that follow the same configuration pattern. 206 # Results from all guards are aggregated together. 207 additional-guards: 208 - list-type: denylist 209 include-go-root: false 210 packages: 211 - github.com/stretchr/testify 212 # Specify rules by which the linter ignores certain files for consideration. 213 ignore-file-rules: 214 - "**/*_test.go" 215 - "**/mock/**/*.go" 216 217 dogsled: 218 # Checks assignments with too many blank identifiers. 219 # Default: 2 220 max-blank-identifiers: 3 221 222 dupl: 223 # Tokens count to trigger issue. 224 # Default: 150 225 threshold: 100 226 227 errcheck: 228 # Report about not checking of errors in type assertions: `a := b.(MyStruct)`. 229 # Such cases aren't reported by default. 230 # Default: false 231 check-type-assertions: true 232 233 # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`. 234 # Such cases aren't reported by default. 235 # Default: false 236 check-blank: true 237 238 # DEPRECATED comma-separated list of pairs of the form pkg:regex 239 # 240 # the regex is used to ignore names within pkg. (default "fmt:.*"). 241 # see https://github.com/kisielk/errcheck#the-deprecated-method for details 242 ignore: fmt:.*,io/ioutil:^Read.* 243 244 # To disable the errcheck built-in exclude list. 245 # See `-excludeonly` option in https://github.com/kisielk/errcheck#excluding-functions for details. 246 # Default: false 247 disable-default-exclusions: true 248 249 # DEPRECATED use exclude-functions instead. 250 # 251 # Path to a file containing a list of functions to exclude from checking. 252 # See https://github.com/kisielk/errcheck#excluding-functions for details. 253 exclude: /path/to/file.txt 254 255 # List of functions to exclude from checking, where each entry is a single function to exclude. 256 # See https://github.com/kisielk/errcheck#excluding-functions for details. 257 exclude-functions: 258 - io/ioutil.ReadFile 259 - io.Copy(*bytes.Buffer) 260 - io.Copy(os.Stdout) 261 262 errchkjson: 263 # With check-error-free-encoding set to true, errchkjson does warn about errors 264 # from json encoding functions that are safe to be ignored, 265 # because they are not possible to happen. 266 # 267 # if check-error-free-encoding is set to true and errcheck linter is enabled, 268 # it is recommended to add the following exceptions to prevent from false positives: 269 # 270 # linters-settings: 271 # errcheck: 272 # exclude-functions: 273 # - encoding/json.Marshal 274 # - encoding/json.MarshalIndent 275 # 276 # Default: false 277 check-error-free-encoding: true 278 279 # Issue on struct encoding that doesn't have exported fields. 280 # Default: false 281 report-no-exported: false 282 283 errorlint: 284 # Check whether fmt.Errorf uses the %w verb for formatting errors. 285 # See the https://github.com/polyfloyd/go-errorlint for caveats. 286 # Default: true 287 errorf: false 288 # Check for plain type assertions and type switches. 289 # Default: true 290 asserts: false 291 # Check for plain error comparisons. 292 # Default: true 293 comparison: false 294 295 exhaustive: 296 # Check switch statements in generated files also. 297 # Default: false 298 check-generated: true 299 # Presence of "default" case in switch statements satisfies exhaustiveness, 300 # even if all enum members are not listed. 301 # Default: false 302 default-signifies-exhaustive: true 303 # Enum members matching the supplied regex do not have to be listed in 304 # switch statements to satisfy exhaustiveness. 305 # Default: "" 306 ignore-enum-members: "Example.+" 307 # Consider enums only in package scopes, not in inner scopes. 308 # Default: false 309 package-scope-only: true 310 311 exhaustivestruct: 312 # Struct Patterns is list of expressions to match struct packages and names. 313 # The struct packages have the form `example.com/package.ExampleStruct`. 314 # The matching patterns can use matching syntax from https://pkg.go.dev/path#Match. 315 # If this list is empty, all structs are tested. 316 # Default: [] 317 struct-patterns: 318 - '*.Test' 319 - 'example.com/package.ExampleStruct' 320 321 exhaustruct: 322 # List of regular expressions to match struct packages and names. 323 # If this list is empty, all structs are tested. 324 # Default: [] 325 include: 326 - '.*\.Test' 327 - 'example\.com/package\.ExampleStruct[\d]{1,2}' 328 # List of regular expressions to exclude struct packages and names from check. 329 # Default: [] 330 exclude: 331 - 'cobra\.Command$' 332 333 forbidigo: 334 # Forbid the following identifiers (list of regexp). 335 # Default: ["^(fmt\\.Print(|f|ln)|print|println)$"] 336 forbid: 337 - ^print.*$ 338 - 'fmt\.Print.*' 339 # Optionally put comments at the end of the regex, surrounded by `(# )?` 340 # Escape any special characters. 341 - 'fmt\.Print.*(# Do not commit print statements\.)?' 342 # Exclude godoc examples from forbidigo checks. 343 # Default: true 344 exclude_godoc_examples: false 345 346 funlen: 347 # Checks the number of lines in a function. 348 # If lower than 0, disable the check. 349 # Default: 60 350 lines: -1 351 # Checks the number of statements in a function. 352 # If lower than 0, disable the check. 353 # Default: 40 354 statements: -1 355 356 gci: 357 # DEPRECATED: use `sections` and `prefix(github.com/org/project)` instead. 358 local-prefixes: github.com/org/project 359 360 # Section configuration to compare against. 361 # Section names are case-insensitive and may contain parameters in (). 362 # The default order of sections is `standard > default > custom > blank > dot`, 363 # If `custom-order` is `true`, it follows the order of `sections` option. 364 # Default: ["standard", "default"] 365 sections: 366 - standard # Standard section: captures all standard packages. 367 - default # Default section: contains all imports that could not be matched to another section type. 368 - prefix(github.com/org/project) # Custom section: groups all imports with the specified Prefix. 369 - blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled. 370 - dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled. 371 372 # Skip generated files. 373 # Default: true 374 skip-generated: false 375 376 # Enable custom order of sections. 377 # If `true`, make the section order the same as the order of `sections`. 378 # Default: false 379 custom-order: true 380 381 gocognit: 382 # Minimal code complexity to report 383 # Default: 30 (but we recommend 10-20) 384 min-complexity: 10 385 386 goconst: 387 # Minimal length of string constant. 388 # Default: 3 389 min-len: 2 390 # Minimum occurrences of constant string count to trigger issue. 391 # Default: 3 392 min-occurrences: 2 393 # Ignore test files. 394 # Default: false 395 ignore-tests: true 396 # Look for existing constants matching the values. 397 # Default: true 398 match-constant: false 399 # Search also for duplicated numbers. 400 # Default: false 401 numbers: true 402 # Minimum value, only works with goconst.numbers 403 # Default: 3 404 min: 2 405 # Maximum value, only works with goconst.numbers 406 # Default: 3 407 max: 2 408 # Ignore when constant is not used as function argument. 409 # Default: true 410 ignore-calls: false 411 412 gocritic: 413 # Which checks should be enabled; can't be combined with 'disabled-checks'. 414 # See https://go-critic.github.io/overview#checks-overview. 415 # To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run`. 416 # By default, list of stable checks is used. 417 enabled-checks: 418 - nestingReduce 419 - unnamedResult 420 - ruleguard 421 - truncateCmp 422 423 # Which checks should be disabled; can't be combined with 'enabled-checks'. 424 # Default: [] 425 disabled-checks: 426 - regexpMust 427 428 # Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks. 429 # See https://github.com/go-critic/go-critic#usage -> section "Tags". 430 # Default: [] 431 enabled-tags: 432 - diagnostic 433 - style 434 - performance 435 - experimental 436 - opinionated 437 disabled-tags: 438 - diagnostic 439 - style 440 - performance 441 - experimental 442 - opinionated 443 444 # Settings passed to gocritic. 445 # The settings key is the name of a supported gocritic checker. 446 # The list of supported checkers can be find in https://go-critic.github.io/overview. 447 settings: 448 # Must be valid enabled check name. 449 captLocal: 450 # Whether to restrict checker to params only. 451 # Default: true 452 paramsOnly: false 453 elseif: 454 # Whether to skip balanced if-else pairs. 455 # Default: true 456 skipBalanced: false 457 hugeParam: 458 # Size in bytes that makes the warning trigger. 459 # Default: 80 460 sizeThreshold: 70 461 nestingReduce: 462 # Min number of statements inside a branch to trigger a warning. 463 # Default: 5 464 bodyWidth: 4 465 rangeExprCopy: 466 # Size in bytes that makes the warning trigger. 467 # Default: 512 468 sizeThreshold: 516 469 # Whether to check test functions 470 # Default: true 471 skipTestFuncs: false 472 rangeValCopy: 473 # Size in bytes that makes the warning trigger. 474 # Default: 128 475 sizeThreshold: 32 476 # Whether to check test functions. 477 # Default: true 478 skipTestFuncs: false 479 ruleguard: 480 # Enable debug to identify which 'Where' condition was rejected. 481 # The value of the parameter is the name of a function in a ruleguard file. 482 # 483 # When a rule is evaluated: 484 # If: 485 # The Match() clause is accepted; and 486 # One of the conditions in the Where() clause is rejected, 487 # Then: 488 # ruleguard prints the specific Where() condition that was rejected. 489 # 490 # The flag is passed to the ruleguard 'debug-group' argument. 491 # Default: "" 492 debug: 'emptyDecl' 493 # Deprecated, use 'failOn' param. 494 # If set to true, identical to failOn='all', otherwise failOn='' 495 failOnError: false 496 # Determines the behavior when an error occurs while parsing ruleguard files. 497 # If flag is not set, log error and skip rule files that contain an error. 498 # If flag is set, the value must be a comma-separated list of error conditions. 499 # - 'all': fail on all errors. 500 # - 'import': ruleguard rule imports a package that cannot be found. 501 # - 'dsl': gorule file does not comply with the ruleguard DSL. 502 # Default: "" 503 failOn: dsl 504 # Comma-separated list of file paths containing ruleguard rules. 505 # If a path is relative, it is relative to the directory where the golangci-lint command is executed. 506 # The special '${configDir}' variable is substituted with the absolute directory containing the golangci config file. 507 # Glob patterns such as 'rules-*.go' may be specified. 508 # Default: "" 509 rules: '${configDir}/ruleguard/rules-*.go,${configDir}/myrule1.go' 510 # Comma-separated list of enabled groups or skip empty to enable everything. 511 # Tags can be defined with # character prefix. 512 # Default: "<all>" 513 enable: "myGroupName,#myTagName" 514 # Comma-separated list of disabled groups or skip empty to enable everything. 515 # Tags can be defined with # character prefix. 516 # Default: "" 517 disable: "myGroupName,#myTagName" 518 tooManyResultsChecker: 519 # Maximum number of results. 520 # Default: 5 521 maxResults: 10 522 truncateCmp: 523 # Whether to skip int/uint/uintptr types. 524 # Default: true 525 skipArchDependent: false 526 underef: 527 # Whether to skip (*x).method() calls where x is a pointer receiver. 528 # Default: true 529 skipRecvDeref: false 530 unnamedResult: 531 # Whether to check exported functions. 532 # Default: false 533 checkExported: true 534 535 gocyclo: 536 # Minimal code complexity to report. 537 # Default: 30 (but we recommend 10-20) 538 min-complexity: 10 539 540 godot: 541 # Comments to be checked: `declarations`, `toplevel`, or `all`. 542 # Default: declarations 543 scope: toplevel 544 # List of regexps for excluding particular comment lines from check. 545 # Default: [] 546 exclude: 547 # Exclude todo and fixme comments. 548 - "^fixme:" 549 - "^todo:" 550 # Check that each sentence ends with a period. 551 # Default: true 552 period: false 553 # Check that each sentence starts with a capital letter. 554 # Default: false 555 capital: true 556 557 godox: 558 # Report any comments starting with keywords, this is useful for TODO or FIXME comments that 559 # might be left in the code accidentally and should be resolved before merging. 560 # Default: ["TODO", "BUG", "FIXME"] 561 keywords: 562 - NOTE 563 - OPTIMIZE # marks code that should be optimized before merging 564 - HACK # marks hack-around that should be removed before merging 565 566 gofmt: 567 # Simplify code: gofmt with `-s` option. 568 # Default: true 569 simplify: false 570 571 gofumpt: 572 # Select the Go version to target. 573 # Default: "1.15" 574 # Deprecated: use the global `run.go` instead. 575 lang-version: "1.17" 576 577 # Module path which contains the source code being formatted. 578 # Default: "" 579 module-path: github.com/org/project 580 581 # Choose whether to use the extra rules. 582 # Default: false 583 extra-rules: true 584 585 goheader: 586 # Supports two types 'const` and `regexp`. 587 # Values can be used recursively. 588 # Default: {} 589 values: 590 const: 591 # Define here const type values in format k:v. 592 # For example: 593 COMPANY: MY COMPANY 594 regexp: 595 # Define here regexp type values. 596 # for example: 597 AUTHOR: .*@mycompany\.com 598 # The template use for checking. 599 # Default: "" 600 template: |- 601 # Put here copyright header template for source code files 602 # For example: 603 # Note: {{ YEAR }} is a builtin value that returns the year relative to the current machine time. 604 # 605 # {{ AUTHOR }} {{ COMPANY }} {{ YEAR }} 606 # SPDX-License-Identifier: Apache-2.0 607 608 # Licensed under the Apache License, Version 2.0 (the "License"); 609 # you may not use this file except in compliance with the License. 610 # You may obtain a copy of the License at: 611 612 # http://www.apache.org/licenses/LICENSE-2.0 613 614 # Unless required by applicable law or agreed to in writing, software 615 # distributed under the License is distributed on an "AS IS" BASIS, 616 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 617 # See the License for the specific language governing permissions and 618 # limitations under the License. 619 # As alternative of directive 'template', you may put the path to file with the template source. 620 # Useful if you need to load the template from a specific file. 621 # Default: "" 622 template-path: /path/to/my/template.tmpl 623 624 goimports: 625 # Put imports beginning with prefix after 3rd-party packages. 626 # It's a comma-separated list of prefixes. 627 # Default: "" 628 local-prefixes: github.com/org/project 629 630 golint: 631 # Minimal confidence for issues. 632 # Default: 0.8 633 min-confidence: 0.7 634 635 gomnd: 636 # List of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description. 637 # Default: ["argument", "case", "condition", "operation", "return", "assign"] 638 checks: 639 - argument 640 - case 641 - condition 642 - operation 643 - return 644 - assign 645 # List of numbers to exclude from analysis. 646 # The numbers should be written as string. 647 # Values always ignored: "1", "1.0", "0" and "0.0" 648 # Default: [] 649 ignored-numbers: 650 - '0666' 651 - '0755' 652 - '42' 653 # List of file patterns to exclude from analysis. 654 # Values always ignored: `.+_test.go` 655 # Default: [] 656 ignored-files: 657 - 'magic1_.*.go' 658 # List of function patterns to exclude from analysis. 659 # Values always ignored: `time.Date` 660 # Default: [] 661 ignored-functions: 662 - 'math.*' 663 - 'http.StatusText' 664 665 gomoddirectives: 666 # Allow local `replace` directives. 667 # Default: false 668 replace-local: false 669 # List of allowed `replace` directives. 670 # Default: [] 671 replace-allow-list: 672 - launchpad.net/gocheck 673 # Allow to not explain why the version has been retracted in the `retract` directives. 674 # Default: false 675 retract-allow-no-explanation: false 676 # Forbid the use of the `exclude` directives. 677 # Default: false 678 exclude-forbidden: false 679 680 gomodguard: 681 allowed: 682 # List of allowed modules. 683 # Default: [] 684 modules: 685 - gopkg.in/yaml.v2 686 # List of allowed module domains. 687 # Default: [] 688 domains: 689 - golang.org 690 blocked: 691 # List of blocked modules. 692 # Default: [] 693 modules: 694 # Blocked module. 695 - github.com/uudashr/go-module: 696 # Recommended modules that should be used instead. (Optional) 697 recommendations: 698 - golang.org/x/mod 699 # Reason why the recommended module should be used. (Optional) 700 reason: "`mod` is the official go.mod parser library." 701 # List of blocked module version constraints. 702 # Default: [] 703 versions: 704 # Blocked module with version constraint. 705 - github.com/mitchellh/go-homedir: 706 # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons. 707 version: "< 1.1.0" 708 # Reason why the version constraint exists. (Optional) 709 reason: "testing if blocked version constraint works." 710 # Set to true to raise lint issues for packages that are loaded from a local path via replace directive. 711 # Default: false 712 local_replace_directives: false 713 714 gosimple: 715 # Select the Go version to target. 716 # Default: 1.13 717 # Deprecated: use the global `run.go` instead. 718 go: "1.15" 719 # https://staticcheck.io/docs/options#checks 720 # Default: ["*"] 721 checks: [ "all" ] 722 723 gosec: 724 # To select a subset of rules to run. 725 # Available rules: https://github.com/securego/gosec#available-rules 726 # Default: [] - means include all rules 727 includes: 728 - G101 729 - G102 730 - G103 731 - G104 732 - G106 733 - G107 734 - G108 735 - G109 736 - G110 737 - G111 738 - G112 739 - G113 740 - G201 741 - G202 742 - G203 743 - G204 744 - G301 745 - G302 746 - G303 747 - G304 748 - G305 749 - G306 750 - G307 751 - G401 752 - G402 753 - G403 754 - G404 755 - G501 756 - G502 757 - G503 758 - G504 759 - G505 760 - G601 761 762 # To specify a set of rules to explicitly exclude. 763 # Available rules: https://github.com/securego/gosec#available-rules 764 # Default: [] 765 excludes: 766 - G101 767 - G102 768 - G103 769 - G104 770 - G106 771 - G107 772 - G108 773 - G109 774 - G110 775 - G111 776 - G112 777 - G113 778 - G201 779 - G202 780 - G203 781 - G204 782 - G301 783 - G302 784 - G303 785 - G304 786 - G305 787 - G306 788 - G307 789 - G401 790 - G402 791 - G403 792 - G404 793 - G501 794 - G502 795 - G503 796 - G504 797 - G505 798 - G601 799 800 # Exclude generated files 801 # Default: false 802 exclude-generated: true 803 804 # Filter out the issues with a lower severity than the given value. 805 # Valid options are: low, medium, high. 806 # Default: low 807 severity: medium 808 809 # Filter out the issues with a lower confidence than the given value. 810 # Valid options are: low, medium, high. 811 # Default: low 812 confidence: medium 813 814 # Concurrency value. 815 # Default: the number of logical CPUs usable by the current process. 816 concurrency: 12 817 818 # To specify the configuration of rules. 819 config: 820 # Globals are applicable to all rules. 821 global: 822 # If true, ignore #nosec in comments (and an alternative as well). 823 # Default: false 824 nosec: true 825 # Add an alternative comment prefix to #nosec (both will work at the same time). 826 # Default: "" 827 "#nosec": "#my-custom-nosec" 828 # Define whether nosec issues are counted as finding or not. 829 # Default: false 830 show-ignored: true 831 # Audit mode enables addition checks that for normal code analysis might be too nosy. 832 # Default: false 833 audit: true 834 G101: 835 # Regexp pattern for variables and constants to find. 836 # Default: "(?i)passwd|pass|password|pwd|secret|token|pw|apiKey|bearer|cred" 837 pattern: "(?i)example" 838 # If true, complain about all cases (even with low entropy). 839 # Default: false 840 ignore_entropy: false 841 # Maximum allowed entropy of the string. 842 # Default: "80.0" 843 entropy_threshold: "80.0" 844 # Maximum allowed value of entropy/string length. 845 # Is taken into account if entropy >= entropy_threshold/2. 846 # Default: "3.0" 847 per_char_threshold: "3.0" 848 # Calculate entropy for first N chars of the string. 849 # Default: "16" 850 truncate: "32" 851 # Additional functions to ignore while checking unhandled errors. 852 # Following functions always ignored: 853 # bytes.Buffer: 854 # - Write 855 # - WriteByte 856 # - WriteRune 857 # - WriteString 858 # fmt: 859 # - Print 860 # - Printf 861 # - Println 862 # - Fprint 863 # - Fprintf 864 # - Fprintln 865 # strings.Builder: 866 # - Write 867 # - WriteByte 868 # - WriteRune 869 # - WriteString 870 # io.PipeWriter: 871 # - CloseWithError 872 # hash.Hash: 873 # - Write 874 # os: 875 # - Unsetenv 876 # Default: {} 877 G104: 878 fmt: 879 - Fscanf 880 G111: 881 # Regexp pattern to find potential directory traversal. 882 # Default: "http\\.Dir\\(\"\\/\"\\)|http\\.Dir\\('\\/'\\)" 883 pattern: "custom\\.Dir\\(\\)" 884 # Maximum allowed permissions mode for os.Mkdir and os.MkdirAll 885 # Default: "0750" 886 G301: "0750" 887 # Maximum allowed permissions mode for os.OpenFile and os.Chmod 888 # Default: "0600" 889 G302: "0600" 890 # Maximum allowed permissions mode for os.WriteFile and ioutil.WriteFile 891 # Default: "0600" 892 G306: "0600" 893 894 govet: 895 # Report about shadowed variables. 896 # Default: false 897 check-shadowing: true 898 899 # Settings per analyzer. 900 settings: 901 # Analyzer name, run `go tool vet help` to see all analyzers. 902 printf: 903 # Comma-separated list of print function names to check (in addition to default, see `go tool vet help printf`). 904 # Default: [] 905 funcs: 906 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof 907 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf 908 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf 909 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf 910 shadow: 911 # Whether to be strict about shadowing; can be noisy. 912 # Default: false 913 strict: true 914 unusedresult: 915 # Comma-separated list of functions whose results must be used 916 # (in addition to defaults context.WithCancel,context.WithDeadline,context.WithTimeout,context.WithValue, 917 # errors.New,fmt.Errorf,fmt.Sprint,fmt.Sprintf,sort.Reverse) 918 # Default [] 919 funcs: 920 - pkg.MyFunc 921 # Comma-separated list of names of methods of type func() string whose results must be used 922 # (in addition to default Error,String) 923 # Default [] 924 stringmethods: 925 - MyMethod 926 927 # Disable all analyzers. 928 # Default: false 929 disable-all: true 930 # Enable analyzers by name (in addition to default). 931 # Run `go tool vet help` to see all analyzers. 932 # Default: [] 933 enable: 934 - asmdecl 935 - assign 936 - atomic 937 - atomicalign 938 - bools 939 - buildtag 940 - cgocall 941 - composites 942 - copylocks 943 - deepequalerrors 944 - errorsas 945 - fieldalignment 946 - findcall 947 - framepointer 948 - httpresponse 949 - ifaceassert 950 - loopclosure 951 - lostcancel 952 - nilfunc 953 - nilness 954 - printf 955 - reflectvaluecompare 956 - shadow 957 - shift 958 - sigchanyzer 959 - sortslice 960 - stdmethods 961 - stringintconv 962 - structtag 963 - testinggoroutine 964 - tests 965 - unmarshal 966 - unreachable 967 - unsafeptr 968 - unusedresult 969 - unusedwrite 970 971 # Enable all analyzers. 972 # Default: false 973 enable-all: true 974 # Disable analyzers by name. 975 # Run `go tool vet help` to see all analyzers. 976 # Default: [] 977 disable: 978 - asmdecl 979 - assign 980 - atomic 981 - atomicalign 982 - bools 983 - buildtag 984 - cgocall 985 - composites 986 - copylocks 987 - deepequalerrors 988 - errorsas 989 - fieldalignment 990 - findcall 991 - framepointer 992 - httpresponse 993 - ifaceassert 994 - loopclosure 995 - lostcancel 996 - nilfunc 997 - nilness 998 - printf 999 - reflectvaluecompare 1000 - shadow 1001 - shift 1002 - sigchanyzer 1003 - sortslice 1004 - stdmethods 1005 - stringintconv 1006 - structtag 1007 - testinggoroutine 1008 - tests 1009 - unmarshal 1010 - unreachable 1011 - unsafeptr 1012 - unusedresult 1013 - unusedwrite 1014 1015 grouper: 1016 # Require the use of a single global 'const' declaration only. 1017 # Default: false 1018 const-require-single-const: true 1019 # Require the use of grouped global 'const' declarations. 1020 # Default: false 1021 const-require-grouping: true 1022 1023 # Require the use of a single 'import' declaration only. 1024 # Default: false 1025 import-require-single-import: true 1026 # Require the use of grouped 'import' declarations. 1027 # Default: false 1028 import-require-grouping: true 1029 1030 # Require the use of a single global 'type' declaration only. 1031 # Default: false 1032 type-require-single-type: true 1033 # Require the use of grouped global 'type' declarations. 1034 # Default: false 1035 type-require-grouping: true 1036 1037 # Require the use of a single global 'var' declaration only. 1038 # Default: false 1039 var-require-single-var: true 1040 # Require the use of grouped global 'var' declarations. 1041 # Default: false 1042 var-require-grouping: true 1043 1044 ifshort: 1045 # Maximum length of variable declaration measured in number of lines, after which linter won't suggest using short syntax. 1046 # Has higher priority than max-decl-chars. 1047 # Default: 1 1048 max-decl-lines: 2 1049 # Maximum length of variable declaration measured in number of characters, after which linter won't suggest using short syntax. 1050 # Default: 30 1051 max-decl-chars: 40 1052 1053 importas: 1054 # Do not allow unaliased imports of aliased packages. 1055 # Default: false 1056 no-unaliased: true 1057 # Do not allow non-required aliases. 1058 # Default: false 1059 no-extra-aliases: true 1060 # List of aliases 1061 # Default: [] 1062 alias: 1063 # Using `servingv1` alias for `knative.dev/serving/pkg/apis/serving/v1` package. 1064 - pkg: knative.dev/serving/pkg/apis/serving/v1 1065 alias: servingv1 1066 # Using `autoscalingv1alpha1` alias for `knative.dev/serving/pkg/apis/autoscaling/v1alpha1` package. 1067 - pkg: knative.dev/serving/pkg/apis/autoscaling/v1alpha1 1068 alias: autoscalingv1alpha1 1069 # You can specify the package path by regular expression, 1070 # and alias by regular expression expansion syntax like below. 1071 # see https://github.com/julz/importas#use-regular-expression for details 1072 - pkg: knative.dev/serving/pkg/apis/(\w+)/(v[\w\d]+) 1073 alias: $1$2 1074 1075 ireturn: 1076 # ireturn allows using `allow` and `reject` settings at the same time. 1077 # Both settings are lists of the keywords and regular expressions matched to interface or package names. 1078 # keywords: 1079 # - `empty` for `interface{}` 1080 # - `error` for errors 1081 # - `stdlib` for standard library 1082 # - `anon` for anonymous interfaces 1083 1084 # By default, it allows using errors, empty interfaces, anonymous interfaces, 1085 # and interfaces provided by the standard library. 1086 allow: 1087 - anon 1088 - error 1089 - empty 1090 - stdlib 1091 # You can specify idiomatic endings for interface 1092 - (or|er)$ 1093 1094 # reject-list of interfaces 1095 reject: 1096 - github.com\/user\/package\/v4\.Type 1097 1098 lll: 1099 # Max line length, lines longer will be reported. 1100 # '\t' is counted as 1 character by default, and can be changed with the tab-width option. 1101 # Default: 120. 1102 line-length: 120 1103 # Tab width in spaces. 1104 # Default: 1 1105 tab-width: 1 1106 1107 maintidx: 1108 # Show functions with maintainability index lower than N. 1109 # A high index indicates better maintainability (it's kind of the opposite of complexity). 1110 # Default: 20 1111 under: 100 1112 1113 makezero: 1114 # Allow only slices initialized with a length of zero. 1115 # Default: false 1116 always: false 1117 1118 maligned: 1119 # Print struct with more effective memory layout or not. 1120 # Default: false 1121 suggest-new: true 1122 1123 misspell: 1124 # Correct spellings using locale preferences for US or UK. 1125 # Setting locale to US will correct the British spelling of 'colour' to 'color'. 1126 # Default is to use a neutral variety of English. 1127 locale: US 1128 # Default: [] 1129 ignore-words: 1130 - someword 1131 1132 nakedret: 1133 # Make an issue if func has more lines of code than this setting, and it has naked returns. 1134 # Default: 30 1135 max-func-lines: 31 1136 1137 nestif: 1138 # Minimal complexity of if statements to report. 1139 # Default: 5 1140 min-complexity: 4 1141 1142 nilnil: 1143 # Checks that there is no simultaneous return of `nil` error and an invalid value. 1144 # Default: ["ptr", "func", "iface", "map", "chan"] 1145 checked-types: 1146 - ptr 1147 - func 1148 - iface 1149 - map 1150 - chan 1151 1152 nlreturn: 1153 # Size of the block (including return statement that is still "OK") 1154 # so no return split required. 1155 # Default: 1 1156 block-size: 2 1157 1158 nolintlint: 1159 # Disable to ensure that all nolint directives actually have an effect. 1160 # Default: false 1161 allow-unused: true 1162 # Disable to ensure that nolint directives don't have a leading space. 1163 # Default: true 1164 allow-leading-space: false 1165 # Exclude following linters from requiring an explanation. 1166 # Default: [] 1167 allow-no-explanation: [ ] 1168 # Enable to require an explanation of nonzero length after each nolint directive. 1169 # Default: false 1170 require-explanation: true 1171 # Enable to require nolint directives to mention the specific linter being suppressed. 1172 # Default: false 1173 require-specific: true 1174 1175 nonamedreturns: 1176 # Report named error if it is assigned inside defer. 1177 # Default: false 1178 report-error-in-defer: true 1179 1180 paralleltest: 1181 # Ignore missing calls to `t.Parallel()` and only report incorrect uses of it. 1182 # Default: false 1183 ignore-missing: true 1184 1185 prealloc: 1186 # IMPORTANT: we don't recommend using this linter before doing performance profiling. 1187 # For most programs usage of prealloc will be a premature optimization. 1188 1189 # Report pre-allocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them. 1190 # Default: true 1191 simple: false 1192 # Report pre-allocation suggestions on range loops. 1193 # Default: true 1194 range-loops: false 1195 # Report pre-allocation suggestions on for loops. 1196 # Default: false 1197 for-loops: true 1198 1199 predeclared: 1200 # Comma-separated list of predeclared identifiers to not report on. 1201 # Default: "" 1202 ignore: "new,int" 1203 # Include method names and field names (i.e., qualified names) in checks. 1204 # Default: false 1205 q: true 1206 1207 promlinter: 1208 # Promlinter cannot infer all metrics name in static analysis. 1209 # Enable strict mode will also include the errors caused by failing to parse the args. 1210 # Default: false 1211 strict: true 1212 # Please refer to https://github.com/yeya24/promlinter#usage for detailed usage. 1213 # Default: [] 1214 disabled-linters: 1215 - Help 1216 - MetricUnits 1217 - Counter 1218 - HistogramSummaryReserved 1219 - MetricTypeInName 1220 - ReservedChars 1221 - CamelCase 1222 - UnitAbbreviations 1223 1224 revive: 1225 # Maximum number of open files at the same time. 1226 # See https://github.com/mgechev/revive#command-line-flags 1227 # Defaults to unlimited. 1228 max-open-files: 2048 1229 1230 # When set to false, ignores files with "GENERATED" header, similar to golint. 1231 # See https://github.com/mgechev/revive#available-rules for details. 1232 # Default: false 1233 ignore-generated-header: true 1234 1235 # Sets the default severity. 1236 # See https://github.com/mgechev/revive#configuration 1237 # Default: warning 1238 severity: error 1239 1240 # Enable all available rules. 1241 # Default: false 1242 enable-all-rules: true 1243 1244 # Sets the default failure confidence. 1245 # This means that linting errors with less than 0.8 confidence will be ignored. 1246 # Default: 0.8 1247 confidence: 0.1 1248 1249 rules: 1250 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#add-constant 1251 - name: add-constant 1252 severity: warning 1253 disabled: false 1254 arguments: 1255 - maxLitCount: "3" 1256 allowStrs: '""' 1257 allowInts: "0,1,2" 1258 allowFloats: "0.0,0.,1.0,1.,2.0,2." 1259 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#atomic 1260 - name: argument-limit 1261 severity: warning 1262 disabled: false 1263 arguments: [4] 1264 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#atomic 1265 - name: atomic 1266 severity: warning 1267 disabled: false 1268 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#banned-characters 1269 - name: banned-characters 1270 severity: warning 1271 disabled: false 1272 arguments: ["Ω","Σ","σ", "7"] 1273 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bare-return 1274 - name: bare-return 1275 severity: warning 1276 disabled: false 1277 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#blank-imports 1278 - name: blank-imports 1279 severity: warning 1280 disabled: false 1281 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr 1282 - name: bool-literal-in-expr 1283 severity: warning 1284 disabled: false 1285 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#call-to-gc 1286 - name: call-to-gc 1287 severity: warning 1288 disabled: false 1289 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cognitive-complexity 1290 - name: cognitive-complexity 1291 severity: warning 1292 disabled: false 1293 arguments: [ 7 ] 1294 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-naming 1295 - name: confusing-naming 1296 severity: warning 1297 disabled: false 1298 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-results 1299 - name: confusing-results 1300 severity: warning 1301 disabled: false 1302 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr 1303 - name: constant-logical-expr 1304 severity: warning 1305 disabled: false 1306 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument 1307 - name: context-as-argument 1308 severity: warning 1309 disabled: false 1310 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type 1311 - name: context-keys-type 1312 severity: warning 1313 disabled: false 1314 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cyclomatic 1315 - name: cyclomatic 1316 severity: warning 1317 disabled: false 1318 arguments: [ 3 ] 1319 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#datarace 1320 - name: datarace 1321 severity: warning 1322 disabled: false 1323 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#deep-exit 1324 - name: deep-exit 1325 severity: warning 1326 disabled: false 1327 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#defer 1328 - name: defer 1329 severity: warning 1330 disabled: false 1331 arguments: 1332 - [ "call-chain", "loop" ] 1333 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#dot-imports 1334 - name: dot-imports 1335 severity: warning 1336 disabled: false 1337 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#duplicated-imports 1338 - name: duplicated-imports 1339 severity: warning 1340 disabled: false 1341 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return 1342 - name: early-return 1343 severity: warning 1344 disabled: false 1345 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block 1346 - name: empty-block 1347 severity: warning 1348 disabled: false 1349 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines 1350 - name: empty-lines 1351 severity: warning 1352 disabled: false 1353 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming 1354 - name: error-naming 1355 severity: warning 1356 disabled: false 1357 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-return 1358 - name: error-return 1359 severity: warning 1360 disabled: false 1361 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-strings 1362 - name: error-strings 1363 severity: warning 1364 disabled: false 1365 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#errorf 1366 - name: errorf 1367 severity: warning 1368 disabled: false 1369 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported 1370 - name: exported 1371 severity: warning 1372 disabled: false 1373 arguments: 1374 - "checkPrivateReceivers" 1375 - "sayRepetitiveInsteadOfStutters" 1376 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#file-header 1377 - name: file-header 1378 severity: warning 1379 disabled: false 1380 arguments: 1381 - This is the text that must appear at the top of source files. 1382 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#flag-parameter 1383 - name: flag-parameter 1384 severity: warning 1385 disabled: false 1386 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-result-limit 1387 - name: function-result-limit 1388 severity: warning 1389 disabled: false 1390 arguments: [ 2 ] 1391 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-length 1392 - name: function-length 1393 severity: warning 1394 disabled: false 1395 arguments: [ 10, 0 ] 1396 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#get-return 1397 - name: get-return 1398 severity: warning 1399 disabled: false 1400 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#identical-branches 1401 - name: identical-branches 1402 severity: warning 1403 disabled: false 1404 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return 1405 - name: if-return 1406 severity: warning 1407 disabled: false 1408 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#increment-decrement 1409 - name: increment-decrement 1410 severity: warning 1411 disabled: false 1412 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#indent-error-flow 1413 - name: indent-error-flow 1414 severity: warning 1415 disabled: false 1416 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#imports-blacklist 1417 - name: imports-blacklist 1418 severity: warning 1419 disabled: false 1420 arguments: 1421 - "crypto/md5" 1422 - "crypto/sha1" 1423 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#import-shadowing 1424 - name: import-shadowing 1425 severity: warning 1426 disabled: false 1427 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#line-length-limit 1428 - name: line-length-limit 1429 severity: warning 1430 disabled: false 1431 arguments: [ 80 ] 1432 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#max-public-structs 1433 - name: max-public-structs 1434 severity: warning 1435 disabled: false 1436 arguments: [ 3 ] 1437 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#modifies-parameter 1438 - name: modifies-parameter 1439 severity: warning 1440 disabled: false 1441 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#modifies-value-receiver 1442 - name: modifies-value-receiver 1443 severity: warning 1444 disabled: false 1445 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#nested-structs 1446 - name: nested-structs 1447 severity: warning 1448 disabled: false 1449 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#optimize-operands-order 1450 - name: optimize-operands-order 1451 severity: warning 1452 disabled: false 1453 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments 1454 - name: package-comments 1455 severity: warning 1456 disabled: false 1457 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range 1458 - name: range 1459 severity: warning 1460 disabled: false 1461 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-in-closure 1462 - name: range-val-in-closure 1463 severity: warning 1464 disabled: false 1465 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-address 1466 - name: range-val-address 1467 severity: warning 1468 disabled: false 1469 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#receiver-naming 1470 - name: receiver-naming 1471 severity: warning 1472 disabled: false 1473 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redefines-builtin-id 1474 - name: redefines-builtin-id 1475 severity: warning 1476 disabled: false 1477 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-of-int 1478 - name: string-of-int 1479 severity: warning 1480 disabled: false 1481 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-format 1482 - name: string-format 1483 severity: warning 1484 disabled: false 1485 arguments: 1486 - - 'core.WriteError[1].Message' 1487 - '/^([^A-Z]|$)/' 1488 - must not start with a capital letter 1489 - - 'fmt.Errorf[0]' 1490 - '/(^|[^\.!?])$/' 1491 - must not end in punctuation 1492 - - panic 1493 - '/^[^\n]*$/' 1494 - must not contain line breaks 1495 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag 1496 - name: struct-tag 1497 severity: warning 1498 disabled: false 1499 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#superfluous-else 1500 - name: superfluous-else 1501 severity: warning 1502 disabled: false 1503 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal 1504 - name: time-equal 1505 severity: warning 1506 disabled: false 1507 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-naming 1508 - name: time-naming 1509 severity: warning 1510 disabled: false 1511 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-naming 1512 - name: var-naming 1513 severity: warning 1514 disabled: false 1515 arguments: 1516 - [ "ID" ] # AllowList 1517 - [ "VM" ] # DenyList 1518 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration 1519 - name: var-declaration 1520 severity: warning 1521 disabled: false 1522 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unconditional-recursion 1523 - name: unconditional-recursion 1524 severity: warning 1525 disabled: false 1526 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-naming 1527 - name: unexported-naming 1528 severity: warning 1529 disabled: false 1530 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return 1531 - name: unexported-return 1532 severity: warning 1533 disabled: false 1534 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error 1535 - name: unhandled-error 1536 severity: warning 1537 disabled: false 1538 arguments: 1539 - "fmt.Printf" 1540 - "myFunction" 1541 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt 1542 - name: unnecessary-stmt 1543 severity: warning 1544 disabled: false 1545 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unreachable-code 1546 - name: unreachable-code 1547 severity: warning 1548 disabled: false 1549 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter 1550 - name: unused-parameter 1551 severity: warning 1552 disabled: false 1553 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-receiver 1554 - name: unused-receiver 1555 severity: warning 1556 disabled: false 1557 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break 1558 - name: useless-break 1559 severity: warning 1560 disabled: false 1561 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value 1562 - name: waitgroup-by-value 1563 severity: warning 1564 disabled: false 1565 1566 rowserrcheck: 1567 # database/sql is always checked 1568 # Default: [] 1569 packages: 1570 - github.com/jmoiron/sqlx 1571 1572 staticcheck: 1573 # Select the Go version to target. 1574 # Default: "1.13" 1575 # Deprecated: use the global `run.go` instead. 1576 go: "1.15" 1577 # https://staticcheck.io/docs/options#checks 1578 # Default: ["*"] 1579 checks: [ "all" ] 1580 1581 stylecheck: 1582 # Select the Go version to target. 1583 # Default: 1.13 1584 # Deprecated: use the global `run.go` instead. 1585 go: "1.15" 1586 # https://staticcheck.io/docs/options#checks 1587 # Default: ["*"] 1588 checks: [ "all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022" ] 1589 # https://staticcheck.io/docs/options#dot_import_whitelist 1590 # Default: ["github.com/mmcloughlin/avo/build", "github.com/mmcloughlin/avo/operand", "github.com/mmcloughlin/avo/reg"] 1591 dot-import-whitelist: 1592 - fmt 1593 # https://staticcheck.io/docs/options#initialisms 1594 # Default: ["ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS", "SIP", "RTP", "AMQP", "DB", "TS"] 1595 initialisms: [ "ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS", "SIP", "RTP", "AMQP", "DB", "TS" ] 1596 # https://staticcheck.io/docs/options#http_status_code_whitelist 1597 # Default: ["200", "400", "404", "500"] 1598 http-status-code-whitelist: [ "200", "400", "404", "500" ] 1599 1600 tagliatelle: 1601 # Check the struck tag name case. 1602 case: 1603 # Use the struct field name to check the name of the struct tag. 1604 # Default: false 1605 use-field-name: true 1606 # `camel` is used for `json` and `yaml` (can be overridden) 1607 # Default: {} 1608 rules: 1609 # Any struct tag type can be used. 1610 # Support string case: `camel`, `pascal`, `kebab`, `snake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower` 1611 json: camel 1612 yaml: camel 1613 xml: camel 1614 bson: camel 1615 avro: snake 1616 mapstructure: kebab 1617 1618 tenv: 1619 # The option `all` will run against whole test files (`_test.go`) regardless of method/function signatures. 1620 # Otherwise, only methods that take `*testing.T`, `*testing.B`, and `testing.TB` as arguments are checked. 1621 # Default: false 1622 all: false 1623 1624 testpackage: 1625 # Regexp pattern to skip files. 1626 # Default: "(export|internal)_test\\.go" 1627 skip-regexp: (export|internal)_test\.go 1628 # List of packages that don't end with _test that tests are allowed to be in. 1629 # Default: "main" 1630 allow-packages: 1631 - example 1632 - main 1633 1634 thelper: 1635 test: 1636 # Check *testing.T is first param (or after context.Context) of helper function. 1637 # Default: true 1638 first: false 1639 # Check *testing.T param has name t. 1640 # Default: true 1641 name: false 1642 # Check t.Helper() begins helper function. 1643 # Default: true 1644 begin: false 1645 benchmark: 1646 # Check *testing.B is first param (or after context.Context) of helper function. 1647 # Default: true 1648 first: false 1649 # Check *testing.B param has name b. 1650 # Default: true 1651 name: false 1652 # Check b.Helper() begins helper function. 1653 # Default: true 1654 begin: false 1655 tb: 1656 # Check *testing.TB is first param (or after context.Context) of helper function. 1657 # Default: true 1658 first: false 1659 # Check *testing.TB param has name tb. 1660 # Default: true 1661 name: false 1662 # Check tb.Helper() begins helper function. 1663 # Default: true 1664 begin: false 1665 fuzz: 1666 # Check *testing.F is first param (or after context.Context) of helper function. 1667 # Default: true 1668 first: false 1669 # Check *testing.F param has name f. 1670 # Default: true 1671 name: false 1672 # Check f.Helper() begins helper function. 1673 # Default: true 1674 begin: false 1675 1676 usestdlibvars: 1677 # Suggest the use of http.MethodXX 1678 # Default: true 1679 http-method: false 1680 # Suggest the use of http.StatusXX 1681 # Default: true 1682 http-status-code: false 1683 # Suggest the use of time.Weekday 1684 # Default: true 1685 time-weekday: true 1686 # Suggest the use of time.Month 1687 # Default: false 1688 time-month: true 1689 # Suggest the use of time.Layout 1690 # Default: false 1691 time-layout: true 1692 # Suggest the use of crypto.Hash 1693 # Default: false 1694 crypto-hash: true 1695 # Suggest the use of rpc.DefaultXXPath 1696 # Default: false 1697 default-rpc-path: true 1698 1699 unparam: 1700 # Inspect exported functions. 1701 # 1702 # Set to true if no external program/library imports your code. 1703 # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors: 1704 # if it's called for subdir of a project it can't find external interfaces. All text editor integrations 1705 # with golangci-lint call it on a directory with the changed file. 1706 # 1707 # Default: false 1708 check-exported: true 1709 1710 varcheck: 1711 # Check usage of exported fields and variables. 1712 # Default: false 1713 exported-fields: true 1714 1715 varnamelen: 1716 # The longest distance, in source lines, that is being considered a "small scope". 1717 # Variables used in at most this many lines will be ignored. 1718 # Default: 5 1719 max-distance: 6 1720 # The minimum length of a variable's name that is considered "long". 1721 # Variable names that are at least this long will be ignored. 1722 # Default: 3 1723 min-name-length: 2 1724 # Check method receivers. 1725 # Default: false 1726 check-receiver: true 1727 # Check named return values. 1728 # Default: false 1729 check-return: true 1730 # Check type parameters. 1731 # Default: false 1732 check-type-param: true 1733 # Ignore "ok" variables that hold the bool return value of a type assertion. 1734 # Default: false 1735 ignore-type-assert-ok: true 1736 # Ignore "ok" variables that hold the bool return value of a map index. 1737 # Default: false 1738 ignore-map-index-ok: true 1739 # Ignore "ok" variables that hold the bool return value of a channel receive. 1740 # Default: false 1741 ignore-chan-recv-ok: true 1742 # Optional list of variable names that should be ignored completely. 1743 # Default: [] 1744 ignore-names: 1745 - err 1746 # Optional list of variable declarations that should be ignored completely. 1747 # Entries must be in one of the following forms (see below for examples): 1748 # - for variables, parameters, named return values, method receivers, or type parameters: 1749 # <name> <type> (<type> can also be a pointer/slice/map/chan/...) 1750 # - for constants: const <name> 1751 # 1752 # Default: [] 1753 ignore-decls: 1754 - c echo.Context 1755 - t testing.T 1756 - f *foo.Bar 1757 - e error 1758 - i int 1759 - const C 1760 - T any 1761 - m map[string]int 1762 1763 whitespace: 1764 # Enforces newlines (or comments) after every multi-line if statement. 1765 # Default: false 1766 multi-if: true 1767 # Enforces newlines (or comments) after every multi-line function signature. 1768 # Default: false 1769 multi-func: true 1770 1771 wrapcheck: 1772 # An array of strings that specify substrings of signatures to ignore. 1773 # If this set, it will override the default set of ignored signatures. 1774 # See https://github.com/tomarrell/wrapcheck#configuration for more information. 1775 # Default: [".Errorf(", "errors.New(", "errors.Unwrap(", ".Wrap(", ".Wrapf(", ".WithMessage(", ".WithMessagef(", ".WithStack("] 1776 ignoreSigs: 1777 - .Errorf( 1778 - errors.New( 1779 - errors.Unwrap( 1780 - .Wrap( 1781 - .Wrapf( 1782 - .WithMessage( 1783 - .WithMessagef( 1784 - .WithStack( 1785 # An array of strings that specify regular expressions of signatures to ignore. 1786 # Default: [] 1787 ignoreSigRegexps: 1788 - \.New.*Error\( 1789 # An array of strings that specify globs of packages to ignore. 1790 # Default: [] 1791 ignorePackageGlobs: 1792 - encoding/* 1793 - github.com/pkg/* 1794 # An array of strings that specify regular expressions of interfaces to ignore. 1795 # Default: [] 1796 ignoreInterfaceRegexps: 1797 - ^(?i)c(?-i)ach(ing|e) 1798 1799 wsl: 1800 # See https://github.com/bombsimon/wsl/blob/master/doc/configuration.md for documentation of available settings. 1801 # These are the defaults for `golangci-lint`. 1802 1803 # Controls if you may cuddle assignments and anything without needing an empty line between them. 1804 # Default: false 1805 allow-assign-and-anything: false 1806 1807 # Controls if you may cuddle assignments and calls without needing an empty line between them. 1808 # Default: true 1809 allow-assign-and-call: true 1810 1811 # Controls if you're allowed to cuddle multiple declarations. 1812 # This is false by default to encourage you to group them in one var block. 1813 # One major benefit with this is that if the variables are assigned the assignments will be tabulated. 1814 # Default: false 1815 allow-cuddle-declarations: false 1816 1817 # Controls if you may cuddle assignments even if they span over multiple lines. 1818 # Default: true 1819 allow-multiline-assign: true 1820 1821 # This option allows whitespace after each comment group that begins a block. 1822 # Default: false 1823 allow-separated-leading-comment: false 1824 1825 # Controls if blocks can end with comments. 1826 # This is not encouraged sine it's usually code smell but might be useful do improve understanding or learning purposes. 1827 # To be allowed there must be no whitespace between the comment and the last statement or the comment and the closing brace. 1828 # Default: false 1829 allow-trailing-comment: false 1830 1831 # Can be set to force trailing newlines at the end of case blocks to improve readability. 1832 # If the number of lines (including comments) in a case block exceeds this number 1833 # a linter error will be yielded if the case does not end with a newline. 1834 # Default: 0 1835 force-case-trailing-whitespace: 0 1836 1837 # Enforces that an `if` statement checking an error variable is cuddled 1838 # with the line that assigned that error variable. 1839 # Default: false 1840 force-err-cuddling: false 1841 1842 # Enforces that an assignment which is actually a short declaration (using `:=`) 1843 # is only allowed to cuddle with other short declarations, and not plain assignments, blocks, etc. 1844 # This rule helps make declarations stand out by themselves, much the same as grouping var statement. 1845 # Default: false 1846 force-short-decl-cuddling: false 1847 1848 # Controls if the checks for slice append should be "strict" 1849 # in the sense that it will only allow these assignments to be cuddled with variables being appended. 1850 # Default: true 1851 strict-append: true 1852 1853 # The custom section can be used to define linter plugins to be loaded at runtime. 1854 # See README documentation for more info. 1855 custom: 1856 # Each custom linter should have a unique name. 1857 example: 1858 # The path to the plugin *.so. Can be absolute or local. 1859 # Required for each custom linter. 1860 path: /path/to/example.so 1861 # The description of the linter. 1862 # Optional. 1863 description: This is an example usage of a plugin linter. 1864 # Intended to point to the repo location of the linter. 1865 # Optional. 1866 original-url: github.com/golangci/example-linter 1867 1868 1869 linters: 1870 # Disable all linters. 1871 # Default: false 1872 disable-all: true 1873 # Enable specific linter 1874 # https://golangci-lint.run/usage/linters/#enabled-by-default-linters 1875 enable: 1876 - asasalint 1877 - asciicheck 1878 - bidichk 1879 - bodyclose 1880 - containedctx 1881 - contextcheck 1882 - cyclop 1883 - deadcode 1884 - decorder 1885 - depguard 1886 - dogsled 1887 - dupl 1888 - durationcheck 1889 - errcheck 1890 - errchkjson 1891 - errname 1892 - errorlint 1893 - execinquery 1894 - exhaustive 1895 - exhaustivestruct 1896 - exhaustruct 1897 - exportloopref 1898 - forbidigo 1899 - forcetypeassert 1900 - funlen 1901 - gci 1902 - gochecknoglobals 1903 - gochecknoinits 1904 - gocognit 1905 - goconst 1906 - gocritic 1907 - gocyclo 1908 - godot 1909 - godox 1910 - goerr113 1911 - gofmt 1912 - gofumpt 1913 - goheader 1914 - goimports 1915 - golint 1916 - gomnd 1917 - gomoddirectives 1918 - gomodguard 1919 - goprintffuncname 1920 - gosec 1921 - gosimple 1922 - govet 1923 - grouper 1924 - ifshort 1925 - importas 1926 - ineffassign 1927 - interfacer 1928 - ireturn 1929 - lll 1930 - maintidx 1931 - makezero 1932 - maligned 1933 - misspell 1934 - nakedret 1935 - nestif 1936 - nilerr 1937 - nilnil 1938 - nlreturn 1939 - noctx 1940 - nolintlint 1941 - nonamedreturns 1942 - nosnakecase 1943 - nosprintfhostport 1944 - paralleltest 1945 - prealloc 1946 - predeclared 1947 - promlinter 1948 - revive 1949 - rowserrcheck 1950 - scopelint 1951 - sqlclosecheck 1952 - staticcheck 1953 - structcheck 1954 - stylecheck 1955 - tagliatelle 1956 - tenv 1957 - testpackage 1958 - thelper 1959 - tparallel 1960 - typecheck 1961 - unconvert 1962 - unparam 1963 - unused 1964 - usestdlibvars 1965 - varcheck 1966 - varnamelen 1967 - wastedassign 1968 - whitespace 1969 - wrapcheck 1970 - wsl 1971 1972 # Enable all available linters. 1973 # Default: false 1974 enable-all: true 1975 # Disable specific linter 1976 # https://golangci-lint.run/usage/linters/#disabled-by-default-linters--e--enable 1977 disable: 1978 - asasalint 1979 - asciicheck 1980 - bidichk 1981 - bodyclose 1982 - containedctx 1983 - contextcheck 1984 - cyclop 1985 - deadcode 1986 - decorder 1987 - depguard 1988 - dogsled 1989 - dupl 1990 - durationcheck 1991 - errcheck 1992 - errchkjson 1993 - errname 1994 - errorlint 1995 - execinquery 1996 - exhaustive 1997 - exhaustivestruct 1998 - exhaustruct 1999 - exportloopref 2000 - forbidigo 2001 - forcetypeassert 2002 - funlen 2003 - gci 2004 - gochecknoglobals 2005 - gochecknoinits 2006 - gocognit 2007 - goconst 2008 - gocritic 2009 - gocyclo 2010 - godot 2011 - godox 2012 - goerr113 2013 - gofmt 2014 - gofumpt 2015 - goheader 2016 - goimports 2017 - golint 2018 - gomnd 2019 - gomoddirectives 2020 - gomodguard 2021 - goprintffuncname 2022 - gosec 2023 - gosimple 2024 - govet 2025 - grouper 2026 - ifshort 2027 - importas 2028 - ineffassign 2029 - interfacer 2030 - ireturn 2031 - lll 2032 - maintidx 2033 - makezero 2034 - maligned 2035 - misspell 2036 - nakedret 2037 - nestif 2038 - nilerr 2039 - nilnil 2040 - nlreturn 2041 - noctx 2042 - nolintlint 2043 - nonamedreturns 2044 - nosnakecase 2045 - nosprintfhostport 2046 - paralleltest 2047 - prealloc 2048 - predeclared 2049 - promlinter 2050 - revive 2051 - rowserrcheck 2052 - scopelint 2053 - sqlclosecheck 2054 - staticcheck 2055 - structcheck 2056 - stylecheck 2057 - tagliatelle 2058 - tenv 2059 - testpackage 2060 - thelper 2061 - tparallel 2062 - typecheck 2063 - unconvert 2064 - unparam 2065 - unused 2066 - usestdlibvars 2067 - varcheck 2068 - varnamelen 2069 - wastedassign 2070 - whitespace 2071 - wrapcheck 2072 - wsl 2073 2074 # Enable presets. 2075 # https://golangci-lint.run/usage/linters 2076 presets: 2077 - bugs 2078 - comment 2079 - complexity 2080 - error 2081 - format 2082 - import 2083 - metalinter 2084 - module 2085 - performance 2086 - sql 2087 - style 2088 - test 2089 - unused 2090 2091 # Run only fast linters from enabled linters set (first run won't be fast) 2092 # Default: false 2093 fast: true 2094 2095 2096 issues: 2097 # List of regexps of issue texts to exclude. 2098 # 2099 # But independently of this option we use default exclude patterns, 2100 # it can be disabled by `exclude-use-default: false`. 2101 # To list all excluded by default patterns execute `golangci-lint run --help` 2102 # 2103 # Default: [] 2104 exclude: 2105 - abcdef 2106 2107 # Excluding configuration per-path, per-linter, per-text and per-source 2108 exclude-rules: 2109 # Exclude some linters from running on tests files. 2110 - path: _test\.go 2111 linters: 2112 - gocyclo 2113 - errcheck 2114 - dupl 2115 - gosec 2116 2117 # Exclude known linters from partially hard-vendored code, 2118 # which is impossible to exclude via `nolint` comments. 2119 - path: internal/hmac/ 2120 text: "weak cryptographic primitive" 2121 linters: 2122 - gosec 2123 2124 # Exclude some `staticcheck` messages. 2125 - linters: 2126 - staticcheck 2127 text: "SA9003:" 2128 2129 # Exclude `lll` issues for long lines with `go:generate`. 2130 - linters: 2131 - lll 2132 source: "^//go:generate " 2133 2134 # Independently of option `exclude` we use default exclude patterns, 2135 # it can be disabled by this option. 2136 # To list all excluded by default patterns execute `golangci-lint run --help`. 2137 # Default: true. 2138 exclude-use-default: false 2139 2140 # If set to true exclude and exclude-rules regular expressions become case-sensitive. 2141 # Default: false 2142 exclude-case-sensitive: false 2143 2144 # The list of ids of default excludes to include or disable. 2145 # Default: [] 2146 include: 2147 - EXC0002 # disable excluding of issues about comments from golint. 2148 2149 # Maximum issues count per one linter. 2150 # Set to 0 to disable. 2151 # Default: 50 2152 max-issues-per-linter: 0 2153 2154 # Maximum count of issues with the same text. 2155 # Set to 0 to disable. 2156 # Default: 3 2157 max-same-issues: 0 2158 2159 # Show only new issues: if there are unstaged changes or untracked files, 2160 # only those changes are analyzed, else only changes in HEAD~ are analyzed. 2161 # It's a super-useful option for integration of golangci-lint into existing large codebase. 2162 # It's not practical to fix all existing issues at the moment of integration: 2163 # much better don't allow issues in new code. 2164 # 2165 # Default: false. 2166 new: true 2167 2168 # Show only new issues created after git revision `REV`. 2169 new-from-rev: HEAD 2170 2171 # Show only new issues created in git patch with set file path. 2172 new-from-patch: path/to/patch/file 2173 2174 # Fix found issues (if it's supported by the linter). 2175 fix: true 2176 2177 2178 severity: 2179 # Set the default severity for issues. 2180 # 2181 # If severity rules are defined and the issues do not match or no severity is provided to the rule 2182 # this will be the default severity applied. 2183 # Severities should match the supported severity names of the selected out format. 2184 # - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity 2185 # - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity 2186 # - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message 2187 # 2188 # Default value is an empty string. 2189 default-severity: error 2190 2191 # If set to true `severity-rules` regular expressions become case-sensitive. 2192 # Default: false 2193 case-sensitive: true 2194 2195 # When a list of severity rules are provided, severity information will be added to lint issues. 2196 # Severity rules have the same filtering capability as exclude rules 2197 # except you are allowed to specify one matcher per severity rule. 2198 # Only affects out formats that support setting severity information. 2199 # 2200 # Default: [] 2201 rules: 2202 - linters: 2203 - dupl 2204 severity: info