Skip to content

Run custom linter without changing the source code of golangci-lint #473

Closed
@HaraldNordgren

Description

@HaraldNordgren

For our project, we are using gometalinter with a config to allow running our own linter called "go-corp-linter" like this:

.gometalinter.json:

{
  "Deadline": "2m",
  "Vendor": true,
  "Test": true,

  "Enable": [
    "deadcode",
    "errcheck",
    "goconst",
    "golint",
    "gotype",
    "gotypex",
    "ineffassign",
    "interfacer",
    "nakedret",
    "staticcheck",
    "structcheck",
    "unconvert",

    "go-corp-linter"
  ],

  "linters": {
    "go-corp-linter": "go-corp-linter:PATH:LINE:COL:MESSAGE"
  },

  "exclude": [
    ".+_mock(_test)?\\.go:"
  ]
}

We run the linter through gometalinter --config=scripts/.gometalinter.json ./...

I would like the same option with golangci-lint without having to clone the repo and change the source code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvementlinter: customAbout custom/private linters

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions