7

I just came along and it seems to me it is just a soft synonym of I propose we make it a proper one.

From the tag wiki:

NOTE: It is recommend to use the tag static-analysis instead.

While searching for prior art I also came along which has been discussed before and despite it's tag wiki is used much in the same way and not just for the lint tool:

and not even all 54 C questions are about that specific tool.

So even if there is some opposite argument the fact that there is another specific tag, the fact that also applies to those questions and the overall usage in my opinion warrants synonymizing to , too.

Since writing this I went through all of [lint] [c] is:q and tagged where it was obvious to me in order to preserve the specific tool info when this gets synonymized but if you're bored feel free to check if I missed something.

7
  • 4
    Yeah, I am all for synonymising it.
    – Dharman Mod
    Mar 2 at 21:23
  • 1
    Why lint to static-analysis and not the other way around? lint is shorter and more popular. Mar 3 at 12:58
  • 1
    Because lint is a slang term and the tag wiki for lint states it's for the specific tools by gimpel only.
    – cafce25
    Mar 3 at 13:59
  • 1
    Also on here it's actually about equally as popular if we combine lint (1,791) and linter (314) vs static-analysis (2,117)
    – cafce25
    Mar 3 at 14:24
  • 1
    I'm not sure at what extent tools based on the original "lint" for Unix back in the dinosaur days actually need to have their own tag. Otherwise the most proper course of action would be to get rid of lint and linter entirely. Use the tag pc-lint for questions regarding that specific product (once Gimpel, nowadays Vector). Possibly this could be done by a moderator associating lint and linter with static-analysis and then afterwards remove the two "lint" tags.
    – Lundin
    Mar 3 at 14:39
  • 3
    Just to throw another perspective in ring– "static analysis" might be the formal term, but I don't think I've ever heard that phrase before (coming from a web dev background). If we synonymize, it might be wise to consider adjusting the [static-analysis] tag wiki to specifically call out "lint/er" as a commonly used synonym to reduce confusion for people unfamiliar with the formal term.
    – zcoop98
    Mar 3 at 16:57
  • @cafce25 Those numbers don't mean much; we don't know how many of those questions were edited to replace [lint] with [static-analysis]. Whether a term is slang or not is not relevant either, the main synonym should be the one that is better known and more searched for. Mar 4 at 5:15

3 Answers 3

9

I'm mainly considering R here, as that's one of my areas of expertise.

As I understand it, a linter is a static code analysis tool intended to detect programming errors and bad practices. However, static code analysis is much broader than that.

In R, a common application for static code analysis is to detect which variables and packages a piece of code is using, so it can be deferred to a separate process for multiprocessing and async execution (both the future and foreach package do this). Another common use case is to detect which packages a piece of code is using to easily install these and possibly version them (the Rstudio IDE, the checkpoint package and some others do this, may seem trivial but in practice it isn't and they often get it wrong).

While an R + static analysis search unfortunately mainly reveals that people commonly misread it as statistical analysis, three questions include it correctly and do not use it for a linter (whole other point: I'd prefer since it's more explicit and less confusing).

I see linter as a subcategory of static code analysis, and it could warrant its own tag. lint + linter do seem to mean the same thing. We certainly should not make lint or linter the main tag.

6
  • 1
    "As I understand it, a linter is a static code analysis tool intended to detect programming errors and bad practices" I don't really see why it would just be a subset of static analysis. "Linter" is slang so there's no formal definition of it - whatever meaning people put into "linter" is completely subjective.
    – Lundin
    Mar 3 at 14:26
  • @Lundin Linter might be slang, but I'm not sure how it'd be taken to mean anything other than "something which lints", which in turn just means performing some task loosely akin to static analysis. Is it really accurate to describe its definitely as "completely subjective"?
    – zcoop98
    Mar 3 at 17:01
  • @zcoop98 "which in turn just means performing some task loosely akin to static analysis" Why loosely? That's your personal opinion.
    – Lundin
    Mar 3 at 17:23
  • @Lundin I used "loosely" to convey "encompassing a large variety of possible tasks done by linters", not as an opinion of mine. Lots of people use a lot of different linters, that doesn't mean that they aren't all doing static analysis of some sort. That's what a linter does, in my understanding.
    – zcoop98
    Mar 3 at 17:27
  • 1
    Static analysis only means "go through the code at compile-time" as opposed to dynamic analysis which means "go through the program during run-time". As for why the tool does this, it could be finding bugs or dangerous practices, or enforcing coding standards, or mapping dependencies, or measuring complexity etc etc.
    – Lundin
    Mar 3 at 17:39
  • 2
    @Lundin I know there's no single definition, that's why I led with "as I understand it". If you think "lint" and "linter" are completely subjective, I think you should probably post an answer to argue your point, since then it clearly shouldn't be a synonym of static-analysis.
    – Erik A
    Mar 3 at 18:19
1

There is a tool for Android development called lint (or Android Lint). There is already a tag for it, but a bit more questions are just tagged with and with a small overlap between them:

There is also and some questions about ktlint have only the tag.

1

I agree with Erik A's opinion:

We certainly should not make lint or linter the main tag.

The way tags are organized in the Python ecosystem each static analysis tool has its own tag (the way it should be), e.g. , , ...

The argument that "lint" is shorter and more popular on Google doesn't outweigh using correct terminology in this case. I say make a synonym of and keep a list of linter tool tags per language in the tag wiki.

1
  • 1
    This seems sensible but we have go through the tag wikis since they don't seem entirely correct currently, at least not for the lint tag. The tag has a much broader use.
    – Lundin
    Mar 16 at 10:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .