On Tuesday, 9 April 2013 at 18:22:33 UTC, Jonathan M Davis wrote:
Is there any work on that?
No. As I understand it, Walter is against adding flags like
that to dmd. He
doesn't want a lot of stray flags which affect what is and
isn't a warning and
the like. He doesn't even like the fact that warnings exist in
the first place
- which I'm inclined to agree with. If it's something that has
to be fixed, it
should be an error, and if it doesn't have to be fix, don't
warn about it,
because any good programmer is going to have to fix all of the
warnings anyway,
ultimately making it not much different from an error anyway.
Stuff like you're
suggesting really should be left up to lint-like tools.
I personally think that there might be some benefit to an
official discussion about lint-like tools. The schedule for the
Conference has a lecture about AnalyzeD, which is the only
official lint-like tool I've heard of so far. That is either
meant to remain a third-party operation, or it is meant to at
some point come closer to being an "official" lint-like tool.
I understand that D tries to clearly separate errors from legal
code. But I'm sure lint-like tools have their place. It seems a
little weird that there is nothing standard (that I've found, at
least) about that topic. D has many standard things, unittest,
ddoc, assert, etc., but no standard lint-like tools. My
understanding of lint-like tools is that they address the areas a
compiler shouldn't address, namely those which can generate false
positives. But just because it could generate a false positive
doesn't mean that it should be completely ignored.
Is there a way standardize a set of warnings such that some
lint-like tool could be "compliant" with the standard warnings? A
standard might help people focus on this issue better.