GithubHelp home page GithubHelp logo

alexkohler / dogsled Goto Github PK

View Code? Open in Web Editor NEW
71.0 71.0 2.0 1.91 MB

dogsled is a Go static analysis tool to find assignments/declarations with too many blank identifiers.

License: MIT License

Go 100.00%

dogsled's People

Contributors

alexkohler avatar bcicen avatar brackendawson avatar ericcornelissen avatar ping-localhost avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dogsled's Issues

unavoidable dogsled for functions outside your control

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.

Unavoidable failure

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.