https://github.com/stevenacoffman/lintlolwut
Find which Go files golangci-lint is complaining about.
https://github.com/stevenacoffman/lintlolwut
go golangci-lint linter wrapper
Last synced: about 1 year ago
JSON representation
Find which Go files golangci-lint is complaining about.
- Host: GitHub
- URL: https://github.com/stevenacoffman/lintlolwut
- Owner: StevenACoffman
- License: mit
- Created: 2020-02-16T00:56:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-24T20:42:46.000Z (over 6 years ago)
- Last Synced: 2025-03-18T05:40:26.664Z (about 1 year ago)
- Topics: go, golangci-lint, linter, wrapper
- Language: Go
- Size: 49.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# lintlolwut
Find which Go file golangci-lint is complaining about.
## uh.. no really, what is this?
At work I use `golangci-lint run` to perform static analysis on my Go code. Often the feedback is quite actionable and useful.
Sometimes, however, the feedback is kind of frustratingly obscure. If I am linting hundreds of files, if I get something like this message:
```
Can't run linter goanalysis_metalinter: ST1012: failed prerequisites: config@command-line-arguments"
```
I am left to wonder, what file is it even complaining about?
This little wrapper automates a tedious process I was performing manually. It will find all the go files in the current directory, optionally match only a subset of them, and run `golangci-lint run` on each file individually. Any that report failures will be called out by name, in addition to any other output.
I hope they improve the feedback to the point that this becomes obsolete.
## Installation
```
go get -u github.com/StevenACoffman/lintlolwut
```
## Usage
```
Usage of lintlolwut:
-match string
include ONLY files for which filepath includes the string
-t include test .go files
-tags build tags
a list of build tags to consider satisfied during the build. For more information about build tags, see the description of build constraints in the documentation for the go/build package
```
For example:
```
lintlolwut -match=mycoolthing
```
### Image Credit
The surrealist painting of the laughing fruit, titled _The Biting Pear of Salamanca_, was posted to deviantART on February 27th, 2006 by Ursula Vernon. Inspired by pop surrealism, she wrote that the pear "lives off low-flying birds, hand-outs, and the occasional unwary sightseer." As early as November 2006[3], a user on 4chan's /b/ (Random) message board had associated the photo with the caption LOLWUT.