Comments (6)
gofmt prints diffs not lines with issues. I could special case it and find the first line with an issue and print a generic warning about Some kind of gofmt issue on this line. Recommend running gofmt -s -e <filename.go>
Thoughts @alecthomas ?
from gometalinter.
I don't personally use this, but I assumed that one warning per file would be enough? This seems reasonable to me:
gometalinter --linter='gofmt:gofmt -l *.go:^(?P<path>[^\n]+)$' \
--message-overrides='gofmt:file is not gofmted' \
--severity=gofmt:warning \
--disable-all --enable=gofmt
It does make the line number 0, but that could be changed to line 1.
from gometalinter.
@cep21 I just added support for goimports
(always has been in my toolchain with gofmt
).
Can you tell me if you're working on this? if not I'd gladly throw a PR as well.
from gometalinter.
Please submit one!
from gometalinter.
Done! does the current implementation fit your needs?
from gometalinter.
Yeap! Best we can easily do since it outputs diffs.
from gometalinter.
Related Issues (20)
- Add goreturns HOT 2
- go get failing due to kingping HOT 2
- The order of CLI flags aren't respected in combination with the config HOT 1
- Error when installing metalinter with vim-go HOT 2
- Adding support for power(ppc64le) arch HOT 9
- gometalinter does not invoke golint correctly HOT 1
- How to set the cyclomatic complexity value when using gometalinter? HOT 1
- Not reporting results from linters to VSCode HOT 4
- Remove supports for megacheck, unused, gosimple
- install.sh not working under Windows HOT 1
- The return value of calling gometalinterwith shell is not 0 HOT 5
- Add impi HOT 1
- gometalinter 3.0.0 is still looking for gosimple HOT 3
- Install failing on go 1.6.1 HOT 1
- vendor not work in go 1.10+ HOT 5
- Archive gometalinter HOT 22
- go mod vendor error HOT 4
- unknown linters: gosec
- Unmatched checksum HOT 4
- gometalinter doesn't work with golang 1.12.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gometalinter.