D-Scanner
D-Scanner copied to clipboard
Swiss-army knife for D source code
since [`assert(false)` has the specific meaning of "unreachable code"](https://dlang.org/spec/expression.html#assert_expressions), it should be exempt from the assert message check as to add one would be needless repetition.
# `If` statements & 'implicit' explicit casts This issue mostly pertains to 'implicit' casts in `if` statements though it is not limited to this domain. *_To double check the behavior...
in DMD it seems to be a syntax error to have unittests in functions or other unittests, but in libdparse it's allowed, so this dscanner check adds a warning/error for...
In the following example, `U` is not considered private: ```d private alias a = int; private int i; private void f() {} private class C {} private struct S {}...
I had to look into dscanner source code to find out that `dscanner.confusing.function_attributes` is linked to `function_attributes_check` in the config. This one sounds obvious but some are less, and I...
In the following example, `y` is treated as an export, even though it's a local variable like `b`. ```d import core.stdc.stdio : printf; void main() { printf("result is %d\n", foo(10));...
When I upgrade to the newest LDC version, parsing breaks in many ways. Here's a simple example: ```d import core.stdc.stdio : printf; void f() {} void main() { printf("call f");...
See https://forum.dlang.org/thread/[email protected] code like ```d struct Something(Types...) {} enum isSomething(T) = is(T : Something!Types, Types...); ``` might be how users write custom is-checks to see if a given type is...
I tried a documented example: 1. embedded in the documentation for the struct 2. as a member of the struct 3. following the closing brace of the struct I have...