D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 9811 - Add static code analyzing (i.e. PVS-Studio-like diagnostic)
Summary: Add static code analyzing (i.e. PVS-Studio-like diagnostic)
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-24 23:52 UTC by Denis Shelomovskii
Modified: 2024-12-13 18:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Denis Shelomovskii 2013-03-24 23:52:44 UTC
There are things which may or may not indicate and error. Current compiler behavior is: "I'm a compiler, I can't even give a warning if there is a change for false positive, there are only warnings and errors". But it looks inconsistent with the fact a compiler tries to help the developer by doing code coverage, documentation etc. Static code analyzing is an essential task a compiler could also do and do good. Also, IMHO, compilers should do static analyzing instead of external tools.

So I propose to add "-diagnostic" flag to the compiler for things Walter is "a bit uncomfortable in declaring it as always wrong" and also for things that are definitely not always wrong. There also could be different levels of such analyzing and ability to treat diagnostic warnings as errors.


See also:
[1] Interview of Walter Bright by Andrey Karpov
http://www.viva64.com/en/b/0182/
[2] NG thread about the interview
http://forum.dlang.org/thread/nnzzbsafuwwzuotvlkpu@forum.dlang.org
Comment 1 dlangBugzillaToGithub 2024-12-13 18:05:19 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/18546

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB