Skip to content

Is golangci-lint detecting my auto-generated files? Is there a FAQ or docs? #2233

Answered by ldez
frederikhors asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

you can use skip-dirs or skip-files.

https://golangci-lint.run/usage/configuration/#config-file

run:

  # which dirs to skip: issues from them won't be reported;
  # can use regexp here: generated.*, regexp is applied on full path;
  # default value is empty list, but default dirs are skipped independently
  # from this option's value (see skip-dirs-use-default).
  # "/" will be replaced by current OS file path separator to properly work
  # on Windows.
  skip-dirs:
    - src/external_libs
    - autogenerated_by_my_lib

  # default is true. Enables skipping of directories:
  #   vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
  skip-dirs-use-default: true

  # which …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@frederikhors
Comment options

@SVilgelm
Comment options

Answer selected by frederikhors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants