Comments (6)
Note: currently it could be added by manually installing and then passing following additional argument to metalinter:
--linter='maligned:maligned .:PATH:LINE:COL:MESSAGE' --severity=maligned:warning
Where maligned points to end of the struct, aligncheck points to start of struct, based on examples
from gometalinter.
Do you have an example of where it is more precise, because it seems to be producing less information for me:
$ maligned cmd/compile/internal/gc cmd/link/internal/ld
/usr/local/Cellar/go/1.5/libexec/src/cmd/compile/internal/gc/esc.go:395:15: struct of size 232 could be 224
/usr/local/Cellar/go/1.5/libexec/src/cmd/compile/internal/gc/go.go:135:10: struct of size 120 could be 112
/usr/local/Cellar/go/1.5/libexec/src/cmd/compile/internal/gc/go.go:155:11: struct of size 224 could be 216
/usr/local/Cellar/go/1.5/libexec/src/cmd/link/internal/ld/ldelf.go:267:13: struct of size 208 could be 200
/usr/local/Cellar/go/1.5/libexec/src/cmd/link/internal/ld/ldpe.go:117:12: struct of size 144 could be 136
/usr/local/Cellar/go/1.5/libexec/src/cmd/link/internal/ld/link.go:123:11: struct of size 256 could be 240
/usr/local/Cellar/go/1.5/libexec/src/cmd/link/internal/ld/link.go:40:11: struct of size 296 could be 288
$ aligncheck cmd/compile/internal/gc cmd/link/internal/ld
cmd/compile/internal/gc: /usr/local/Cellar/go/1.5/libexec/src/cmd/compile/internal/gc/esc.go:395:6: struct EscState could have size 224 (currently 232)
cmd/compile/internal/gc: /usr/local/Cellar/go/1.5/libexec/src/cmd/compile/internal/gc/go.go:135:6: struct Sym could have size 112 (currently 120)
cmd/compile/internal/gc: /usr/local/Cellar/go/1.5/libexec/src/cmd/compile/internal/gc/go.go:155:6: struct Type could have size 216 (currently 224)
cmd/compile/internal/gc: /usr/local/Cellar/go/1.5/libexec/src/cmd/compile/internal/gc/go.go:80:6: struct Mpcplx could have size 72 (currently 80)
cmd/link/internal/ld: /usr/local/Cellar/go/1.5/libexec/src/cmd/link/internal/ld/ldelf.go:267:6: struct ElfObj could have size 200 (currently 208)
cmd/link/internal/ld: /usr/local/Cellar/go/1.5/libexec/src/cmd/link/internal/ld/ldpe.go:117:6: struct PeObj could have size 136 (currently 144)
cmd/link/internal/ld: /usr/local/Cellar/go/1.5/libexec/src/cmd/link/internal/ld/link.go:123:6: struct Link could have size 240 (currently 256)
cmd/link/internal/ld: /usr/local/Cellar/go/1.5/libexec/src/cmd/link/internal/ld/link.go:40:6: struct LSym could have size 288 (currently 296)
from gometalinter.
yes, see the link to the go issue which is admittedly an edgecase
from gometalinter.
oh you mean for the same thing it provides more info, nevermind, cant read
from gometalinter.
Exactly, yes.
Both of these tools are quite slow and CPU intensive due to their nature, so I'd prefer to only integrate one. I have no preference which beyond "the best", but so far it seems that aligncheck
produces better results?
from gometalinter.
sure, my mistake then, I thought it didn't cover the edgecase of a struct{}
being the last member
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.