Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass current directory golangci-lint when specifying a configfile #79

Open
FalcoSuessgott opened this issue Nov 24, 2021 · 1 comment
Open

Comments

@FalcoSuessgott
Copy link

  # golang pre commits
  - repo: https://github.com/dnephin/pre-commit-golang
    rev: v0.4.0
    hooks:
        - id: go-fmt
        - id: go-vet
        - id: go-lint
        - id: go-imports
        - id: no-go-testing
        - id: golangci-lint
          args: ["-vc .golang-ci.yml"]

results in

ERRO Can't read config: can't read viper config: open .golang-ci.yml: no such file or directory

is there anyway I can prepend $PWD to golangci lint pre commit hook?

@FalcoSuessgott
Copy link
Author

Okay even with the fullpath its failing:

ERRO Can't read config: can't read viper config: open /home/..../.golang-ci.yml: no such file or directory

is there anything im doing wrong rofl?

my config:

linters-settings:
  lll:
    line-length: 130
linters:
  enable-all: true
  disable:
    - testpackage
    - forbidigo
    - paralleltest
    - errcheck
    - exhaustivestruct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant