Inspired from: https://issues.dlang.org/show_bug.cgi?id=17424
-
Unused parameter -- of course you should be able to say "intentionally unused" (underscore prefix to name? a uda?)
-
Unused imports -- this is super important to keep incremental compile times down
-
Copying a large value (more than given threshold) - when passing parameters, in assignments, etc. Can always use explicit copy functions instead, pass by ref, etc.
-
Allocating a large value on the stack (more than given threshold) - very useful for fibers with small stacks.
-
Unused definitions/types: a function is not reachable by any non-private definition -- some uda should allow overriding this
-
Signed/unsigned comparisons
-
Function is @nogc but not marked as such
-
Function is pure but not marked as such
-
Function is nothrow but not marked as such
-
Function is const but not marked as such
-
Code was determined to be dead (will never be executed)
-
Use of implicitly initialized variable (for variables implicitly set to .init), at least for floats/doubles where NaN is likely to be bug-prone.
-
Use of voided variable (for variables init'd with =void)
-
Constructor may throw - no automatic destruction will occur
-
Conditional used is always true/false and compiled out -- must be able to wash away known-good instances
Inspired from: https://issues.dlang.org/show_bug.cgi?id=17424
Unused parameter -- of course you should be able to say "intentionally unused" (underscore prefix to name? a uda?)
Unused imports -- this is super important to keep incremental compile times down
Copying a large value (more than given threshold) - when passing parameters, in assignments, etc. Can always use explicit copy functions instead, pass by ref, etc.
Allocating a large value on the stack (more than given threshold) - very useful for fibers with small stacks.
Unused definitions/types: a function is not reachable by any non-private definition -- some uda should allow overriding this
Signed/unsigned comparisons
Function is @nogc but not marked as such
Function is pure but not marked as such
Function is nothrow but not marked as such
Function is const but not marked as such
Code was determined to be dead (will never be executed)
Use of implicitly initialized variable (for variables implicitly set to .init), at least for floats/doubles where NaN is likely to be bug-prone.
Use of voided variable (for variables init'd with =void)
Constructor may throw - no automatic destruction will occur
Conditional used is always true/false and compiled out -- must be able to wash away known-good instances