This is the contenct of my .pre-commit-config.yaml file,
repos:
- repo: local
hooks:
- id: static-checks-pramod
name: Static Analysis
description: This hook does static analysis
entry: staticcheck -tests=false ./...
language: golang
types: [text]
on running the hooks locally for all the files locally im getting below error,
pramodchoudhari@Pramods-MacBook-Pro-2 my-repo % pre-commit run --all-files
Static Analysis..........................................................Failed
- hook id: static-checks-pramod
- exit code: 1
-: named files must be .go files: ./...
-: named files must be .go files: ./...
-: named files must be .go files: ./...
-: named files must be .go files: ./...
-: named files must be .go files: ./...
-: named files must be .go files: ./...
-: named files must be .go files: ./...
-: named files must be .go files: ./...
but if i run staticcheck command locally, it work fine as below,
pramodchoudhari@Pramods-MacBook-Pro-2 my-repo % staticcheck -tests=false ./...
pramodchoudhari@Pramods-MacBook-Pro-2 my-repo %
I'm not sure what i'm doing wrong in pre-commit-config.
PS: I'm using this linter for doing static analysis of my repo