alexkohler / dogsled Goto Github PK
View Code? Open in Web Editor NEWdogsled is a Go static analysis tool to find assignments/declarations with too many blank identifiers.
License: MIT License
dogsled is a Go static analysis tool to find assignments/declarations with too many blank identifiers.
License: MIT License
Using the -set_exit_status
flag has no effect because the variable used, exitStatus
, is initialize to 0 and never changed.
Lines 49 to 57 in 34d2ab9
It's unclear to me how you're supposed to fix this linter error when you're calling a function you don't control, for example, the standard library. The following gives a path to the file of the calling code:
_, self, _, _ := runtime.Caller(0)
I can't edit the runtime
package.
Presumably, the intention of this linter is to warn when people have written functions like runtime.Caller
and should return a struct instead. So the linter should perhaps only warn when the called function is within the same module/repository. At the least, a list of known exclusions in the standard library would be good.
I encountered a problem while using dogsled to check my source code. I use tview in my project, which has an API that returns the coordinates and height and width of the rectangle where the UI element is located. Such APIs are common in UI libraries. But my code only needs to know the height, so I have to write this code:
_, _, _, height := ui.pages.GetRect()
But at this time dogsled told me that this was wrong. But I can’t really assign them to some variables, because I really do n’t need them!
So what should I do?
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.