GitXplorerGitXplorer
t

golangci-lint-emacs

public
4 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
f93fb4775c5fa021c56e82a09a2b1ee36e7a6700

Correctly capture compiler error when we fail to satisfy interface

ttheckman committed 5 years ago
Verified
c3db1915a37c73c88da0cf8142cc1781c7fb365b

Use os.DevNull instead of /dev/null

ttheckman committed 5 years ago
Verified
856285108df2d73530b479671e73dd6efdcc51c3

Merge branch 'remove_exec_use_golangci-lint_packages'

ttheckman committed 5 years ago
Verified
beb97eb434dd81ca873e32ba15bc6f8ca6e19052

Remove dead code

ttheckman committed 5 years ago
Verified
8adb25ad02a2ff4fce3b02745a6e636a76713883

Update to golangci-lint v1.27.0

ttheckman committed 5 years ago
Verified
8968b765326df92e16a4b0582846a8fe86a622f2

Import golangci-lint and use directly, only use go test as prelinter

ttheckman committed 5 years ago

README

The README file for this repository.

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

make build

Install in ~/bin/

make install

Easy Mode (build + install)

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:...)