https://github.com/weijiangan/flycheck-golangci-lint
Flycheck checker for golangci-lint
https://github.com/weijiangan/flycheck-golangci-lint
Last synced: 3 months ago
JSON representation
Flycheck checker for golangci-lint
- Host: GitHub
- URL: https://github.com/weijiangan/flycheck-golangci-lint
- Owner: weijiangan
- License: gpl-3.0
- Created: 2018-05-27T08:25:37.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-02-11T19:10:41.000Z (4 months ago)
- Last Synced: 2025-02-11T20:24:50.981Z (4 months ago)
- Language: Emacs Lisp
- Size: 20.5 KB
- Stars: 48
- Watchers: 2
- Forks: 22
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flycheck-golangci-lint
Flycheck checker for golangci-lint# Install
## MELPA
```
M-x package-install flycheck-golangci-lint
```## Manual
```
M-x package-install-file
```# Usage
Add the following lines to your config
```lisp
(eval-after-load 'flycheck
'(add-hook 'flycheck-mode-hook #'flycheck-golangci-lint-setup))
```If you have `use-package` installed
```lisp
(use-package flycheck-golangci-lint
:ensure t
:hook (go-mode . flycheck-golangci-lint-setup))
```# Available options
`--config` (default: `nil`)
```lisp
(setq flycheck-golangci-lint-config "path/to/config")
````--deadline` (default: `1m`)
```lisp
(setq flycheck-golangci-lint-deadline "1m")
````--tests` (default: `nil`)
```lisp
(setq flycheck-golangci-lint-tests t)
````--fast` (default: `nil`)
```lisp
(setq flycheck-golangci-lint-fast t)
````--enable-all` (default: `nil`)
```lisp
(setq flycheck-golangci-lint-enable-all t)
````--disable-all` (default: `nil`)
```lisp
(setq flycheck-golangci-lint-disable-all t)
````--enable=` (default: `nil`)
```lisp
(setq flycheck-golangci-lint-enable-linters '("lll" "structcheck"))
````--disable=` (default: `nil`)
```lisp
(setq flycheck-golangci-lint-disable-linters '("unused" "staticcheck" "misspell"))
```# GO Modules
Make sure you have set GO111MODULE, if it's not the default in your Go version.
```
(setenv "GO111MODULE" "on")
```# Contribute
Pull requests are welcomed :)