istio.io/istio@v0.0.0-20240520182934-d79c90f27776/common/config/.golangci-format.yml (about)

     1  # WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY
     2  #
     3  # The original version of this file is located in the https://github.com/istio/common-files repo.
     4  # If you're looking at this file in a different repo and want to make a change, please go to the
     5  # common-files repo, make the change there and check it in. Then come back to this repo and run
     6  # "make update-common".
     7  
     8  run:
     9    # Timeout for analysis, e.g. 30s, 5m.
    10    # Default: 1m
    11    timeout: 20m
    12    build-tags:
    13    - integ
    14    - integfuzz
    15  linters:
    16    disable-all: true
    17    enable:
    18    - goimports
    19    - gofumpt
    20    - gci
    21    fast: false
    22  linters-settings:
    23    gci:
    24      sections:
    25        - standard # Captures all standard packages if they do not match another section.
    26        - default # Contains all imports that could not be matched to another section type.
    27        - prefix(istio.io/) # Groups all imports with the specified Prefix.
    28    goimports:
    29      # put imports beginning with prefix after 3rd-party packages;
    30      # it's a comma-separated list of prefixes
    31      local-prefixes: istio.io/
    32  issues:
    33    # Which dirs to exclude: issues from them won't be reported.
    34    # Can use regexp here: `generated.*`, regexp is applied on full path,
    35    # including the path prefix if one is set.
    36    # Default dirs are skipped independently of this option's value (see exclude-dirs-use-default).
    37    # "/" will be replaced by current OS file path separator to properly work on Windows.
    38    # Default: []
    39    exclude-dirs:
    40      - genfiles$
    41      - vendor$
    42    # Which files to exclude: they will be analyzed, but issues from them won't be reported.
    43    # There is no need to include all autogenerated files,
    44    # we confidently recognize autogenerated files.
    45    # If it's not, please let us know.
    46    # "/" will be replaced by current OS file path separator to properly work on Windows.
    47    # Default: []
    48    exclude-files:
    49      - ".*\\.pb\\.go"
    50      - ".*\\.gen\\.go"
    51    # Maximum issues count per one linter.
    52    # Set to 0 to disable.
    53    # Default: 50
    54    max-issues-per-linter: 0
    55    # Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
    56    max-same-issues: 0