4 ms·
This sounds like a component of the type of tool normally called a static analysis engine. "Lint" to me implies more of a lightweight tool that complains about
by sievebrain 10y ago
This sounds like a component of the type of tool normally called a static analysis engine. "Lint" to me implies more of a lightweight tool that complains about tabs vs spaces and things like that.
- llogiq 10y agoI just call it a lint because it uses the rustic::lint API. And I posited that such analysis belongs in the compiler. However, lints no longer need to be lightweight; I've seen full-program analysis passes called lints. And in rust, lints usually don't complain about tabs/spaces (though we could write one), but rather certain idioms which are exacerbating readability, flexibility, performance or any combination of the above.
- Manishearth 10y agoThe general term lint refers to things that catch possible bugs. http://github.com/manishearth/rust-clippy/ http://github.com/manishearth/rust-clippy/ contains tons of lints which are much more powerful than just tabs vs spaces. Many catch code style things, but some of them also catch possible bugs. The example I gave of "does not panic" isn't really a lint, more of a restriction -- a static analysis pass that helps catch things which might not usually be a problem, but are a problem for your specific use case (so off by default). But there are lints as well which could benefit from the nsa lint backend.
- melloc 10y agoThings that complain about tabs vs spaces and other code layout concerns are style checkers. Linters complain about the actual content of the program, and enforce certain behavior. For example, warning you about unused functions, parameters, and variables, warning on duplicate fields in JavaScript objects, complaining about using parameter lists in C, etc.