https://github.com/theckman/golangci-lint-emacs
A wrapper around golangci-lint so it works better with Emacs + flycheck
https://github.com/theckman/golangci-lint-emacs
Last synced: 3 months ago
JSON representation
A wrapper around golangci-lint so it works better with Emacs + flycheck
- Host: GitHub
- URL: https://github.com/theckman/golangci-lint-emacs
- Owner: theckman
- License: unlicense
- Created: 2020-04-24T00:16:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-20T19:53:04.000Z (about 5 years ago)
- Last Synced: 2025-01-24T15:12:51.552Z (4 months ago)
- Language: Go
- Size: 3.69 MB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# golangci-lint-emacs
This is a wrapper around `golangci-lint` to resolve some issues I had while
trying to use `flycheck-golangci-lint` with `lsp`. Specifically, as best I could
tell, the way the different checkers were executed resulted in loss of important
information.In particular, I'd either get linting errors in my editor or compilation
failures. I could not find a configuration that permitted both. By writing this
wrapper around `golangci-lint`, I can invoke `go build` and format the syntax
errors to look like linter failures. This tricks my editor in to displaying
those failures too, and so I've gotten back compilation errors and kept linting
failures.## License
The source code in the repo is released in to the Public Domain, so you can use
it however you want. This issue was driving me fucking insane, and so I hope it
can be helpful for someone else.If you do make any changes you'd find useful, I encourage you to raise a PR.
## Building / Installing
### Build
```shell
make build
```### Install in ~/bin/
```shell
make install
```### Easy Mode (build + install)
```shell
make
```## Notes
This project was built for use on my personal systems, and may not be suitable
for use on yours. The following assumptions are present:* `GOPATH` environment variable is set where Emacs is running
* `$HOME/bin/golangci-lint` is where this wrapper should be installed
* `$GOPATH/bin/golangci-lint` is where the real `golangci-lint` is installed
* `$HOME/bin` is on the `PATH` before `$GOPATH/bin` (e.g., `$HOME/bin:$GOPATH/bin:/usr/local/bin:...`)