Static Analysis Tooling / Effective D

Walter Bright newshound2 at digitalmars.com
Tue Jan 21 14:30:38 PST 2014


On 1/21/2014 1:07 PM, Brian Schott wrote:
> On Tuesday, 21 January 2014 at 20:26:57 UTC, Walter Bright wrote:
>> @coverity_warnings
>>
>> should do fine (i.e. prefix with your tool name). It's not any harder than
>> coming up with names for your third party library.
>
> "test.d(10): Error: undefined identifier coverity_warnings"
>
> In order for this to work the analysis tool would have to distribute a .d or .di
> file that is imported by any module that needs to suppress warnings. Java has
> the SuppressWarnings annotation in the standard java.lang to avoid this.

The trouble is if you start doing that, you end up in an endless ratrace of 
adding ever more "standard" names.

If you're going to use a static checker, it doesn't seem to me to be a big 
burden to provide an import for it.


More information about the Digitalmars-d mailing list