github.com/koneal2013/storymetadatagenerator@v0.0.0-20230222212341-b170f254daa5/.golangci.yaml (about)

     1  # Options for analysis running.
     2  run:
     3    # The default concurrency value is the number of available CPU.
     4    concurrency: 4
     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: 2
    11    # Include test files or not.
    12    # Default: true
    13    tests: true
    14    # List of build tags, all linters use it.
    15    # Default: [].
    16    build-tags:
    17    # Which dirs to skip: issues from them won't be reported.
    18    # Can use regexp here: `generated.*`, regexp is applied on full path.
    19    # Default value is empty list,
    20    # but default dirs are skipped independently of this option's value (see skip-dirs-use-default).
    21    # "/" will be replaced by current OS file path separator to properly work on Windows.
    22    skip-dirs:
    23      - src/external_libs
    24      - autogenerated_by_my_lib
    25    # Enables skipping of directories:
    26    # - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
    27    # Default: true
    28    skip-dirs-use-default: false
    29    # Which files to skip: they will be analyzed, but issues from them won't be reported.
    30    # Default value is empty list,
    31    # but there is no need to include all autogenerated files,
    32    # we confidently recognize autogenerated files.
    33    # If it's not please let us know.
    34    # "/" will be replaced by current OS file path separator to properly work on Windows.
    35    skip-files:
    36    # If set we pass it to "go list -mod={option}". From "go help modules":
    37    # If invoked with -mod=readonly, the go command is disallowed from the implicit
    38    # automatic updating of go.mod described above. Instead, it fails when any changes
    39    # to go.mod are needed. This setting is most useful to check that go.mod does
    40    # not need updates, such as in a continuous integration and testing system.
    41    # If invoked with -mod=vendor, the go command assumes that the vendor
    42    # directory holds the correct copies of dependencies and ignores
    43    # the dependency descriptions in go.mod.
    44    #
    45    # Allowed values: readonly|vendor|mod
    46    # By default, it isn't set.
    47    modules-download-mode: readonly
    48    # Allow multiple parallel golangci-lint instances running.
    49    # If false (default) - golangci-lint acquires file lock on start.
    50    allow-parallel-runners: false
    51    # Define the Go version limit.
    52    # Mainly related to generics support since go1.18.
    53    # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.18
    54    go: '1.20'
    55  
    56  # output configuration options
    57  output:
    58    # Format: colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
    59    #
    60    # Multiple can be specified by separating them by comma, output can be provided
    61    # for each of them by separating format name and path by colon symbol.
    62    # Output path can be either `stdout`, `stderr` or path to the file to write to.
    63    # Example: "checkstyle:report.xml,json:stdout,colored-line-number"
    64    #
    65    # Default: colored-line-number
    66    format:
    67    # Print lines of code with issue.
    68    # Default: true
    69    print-issued-lines: true
    70    # Print linter name in the end of issue text.
    71    # Default: true
    72    print-linter-name: true
    73    # Make issues output unique by line.
    74    # Default: true
    75    uniq-by-line: false
    76    # Add a prefix to the output file references.
    77    # Default is no prefix.
    78    path-prefix: ""
    79    # Sort results by: filepath, line and column.
    80    sort-results: true
    81  
    82  linters:
    83    # Disable all linters.
    84    # Default: false
    85    disable-all: false
    86    # Enable specific linter
    87    # https://golangci-lint.run/usage/linters/#enabled-by-default
    88  
    89    # Enable all available linters.
    90    # Default: false
    91    enable-all: true
    92    # Disable specific linter
    93    # https://golangci-lint.run/usage/linters/#disabled-by-default
    94    disable:
    95      - ifshort
    96      - scopelint
    97      - nosnakecase
    98    # Enable presets.
    99    # https://golangci-lint.run/usage/linters
   100    presets:
   101    # Run only fast linters from enabled linters set (first run won't be fast)
   102    # Default: false
   103    fast: true
   104  
   105  severity:
   106    # Set the default severity for issues.
   107    #
   108    # If severity rules are defined and the issues do not match or no severity is provided to the rule
   109    # this will be the default severity applied.
   110    # Severities should match the supported severity names of the selected out format.
   111    # - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity
   112    # - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#SeverityLevel
   113    # - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
   114    #
   115    # Default value is an empty string.
   116    default-severity: warning
   117    # If set to true `severity-rules` regular expressions become case-sensitive.
   118    # Default: false
   119    case-sensitive: true
   120    # When a list of severity rules are provided, severity information will be added to lint issues.
   121    # Severity rules have the same filtering capability as exclude rules
   122    # except you are allowed to specify one matcher per severity rule.
   123    # Only affects out formats that support setting severity information.
   124    #
   125    # Default: []
   126    rules:
   127      - linters:
   128          - dupl
   129        severity: info