Skip to content

How to pass options to specific linters? or how to exclude multiple rules for one linter? #475

Closed
@lnshi

Description

@lnshi
  1. How to pass options to specific linter? I did like below, unfortunately it doesn't work:
linters-settings:
  gosec:
    settings:
      exclude: "G401", "G501"
  1. How to exclude multiple rules for one linter, I did like below, unfortunately it doesn't work:
issues:
  exclude-rules:
    - linters:
      - gosec
      text:
        - "G501: Blacklisted import `crypto/md5`: weak cryptographic primitive"
        - "G401: "

A bit confused by the configuration way: one text with linters array, should not that one linter with text array make more sense?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: configRelated to .golangci.yml and/or cli optionsenhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions