D-Scanner
D-Scanner copied to clipboard
Swiss-army knife for D source code
What are thoughts on issuing a warning when accessing a member variable without going through the `this` reference? ``` struct A { int i; this(int i) { i = i;...
cc @ricardaxel
The following works fine for all modules: ``` [analysis.config.StaticAnalysisConfig] undocumented_declaration_check="disabled" ``` but if I add another setting specific to a module, **with _ModuleFilters_ before _StaticAnalysisConfig_**, then the `undocumented_declaration_check` is somehow...
`dscanner.suspicious.label_var_same_name` triggers here: ```d struct Foo { long line = 1; static void bar() { long line = 1; // Variable "Foo.line" has the same name as a variable defined...
Would you be open to add some mechanism to skip linting a given line / function / ... ? For example through UDAs, following code wouldn't raise any warning. ```...
Arch/EndeavourOS x86_64, dmd 2.105.0, ldc v1.35-beta1, dscanner v0.15.2 from dub. dscanner errors out when performing a style check on my project. I am unsure of whether the fault lies in...
Some build systems (bazel, meson, ..) can generate compilation database, that contain information about import directories. For D code, such file looks like that : ``` [ { "directory": "build",...
Known useless extra allocations (can be removed without any downsides): - [ ] `std.array:array` on `SortedRange!(T[])` -> use `.release` (avoids allocation) or `.dup` (keeps behavior) instead - [ ] `std.array:array`...
Phobos does a bunch of style checks with `grep`, it would be good to do those with dscanner instead (partly so we can ignore the `etc.` directory. https://github.com/dlang/phobos/blob/master/posix.mak#L589 Things phobos...
DScanner says this code is an error: `alias this = _base;`  This is an allowed syntax since dlang version: 2.105.0 https://dlang.org/changelog/2.105.0.html#dmd.alias-this-syntax (1 august 2023) While i type this i...