[Issue 18487] wrong warning: `A unittest should be annotated with at least @safe or @system`
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 22 06:27:02 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18487
greenify <greeenify at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |greeenify at gmail.com
Resolution|--- |WONTFIX
--- Comment #1 from greenify <greeenify at gmail.com> ---
That's not a bug, but a feature. The idea is that reviewers see that a unittest
is @system or @safe and can point out cases where the test should have been
@safe.
Also in a diff you typically don't see the module-level attributes + unittests
are by default @system and yes we enforce the annotation in order to raise
awareness of annotating the unittests.
I see the the point to extend it for module-level attributes, but that's not
how this check was intended to be. Hence, I am closing this as WONTFIX.
BTW
- module-level attributes are very seldomly used at Phobos because they make
reviewing really tricky
- this is the wrong component, it's a DScanner check
--
More information about the Digitalmars-d-bugs
mailing list