Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add staticcheck to Go pre-commit hooks
[The Go's `lint` tool got deprecated](https://github.com/golang/lint) some time ago. It can be replaced by the `staticcheck` tool, which offers similar functionalities. In the `keep-network/keep-core` project we've previously added a GH Action job that runs the `staticcheck` tool as part of the CI. We want now to also add it to the Go pre-commit hooks, so that developers could be informed about the problems in their code before they push it to the remote repository. In a separate PR we've adding a new custom hook to the `keep-network/pre-commit-golang` repository. In this PR we're changing the config to use that new custom hook. We're also removing deprecated `lint` hook from the config. Apart from modifyng the `.pre-commit-config.yaml` we're also updating the `macos-setup.sh` script - so that it would be in line with the modified config. To adjust the pre-commit hooks on local machine to the new configuration users should: 1. Install the `staticcheck` tool: ``` go install honnef.co/go/tools/cmd/staticcheck@latest ``` 2. Apply the pre-commit hooks config: ``` pre-commit install --install-hooks ```
- Loading branch information