Commit Graph

114 Commits

Author SHA1 Message Date
WebFreak001 2220812b96 Moved DSymbol into DCD 2022-10-14 14:30:10 +02:00
WebFreak001 e027965176 fix null pointer access in unused.d 2022-03-07 22:53:04 +01:00
WebFreak001 0316c9d70a fix libdparse deprecation in new check 2022-02-12 23:04:15 +01:00
WebFreak001 cdf881c103 add cyclomatic complexity check
Fix #684

Disabled by default.
2022-02-11 20:17:23 +01:00
WebFreak001 7f93ffaa1f add test that #499 is fixed 2022-02-02 21:31:28 +01:00
WebFreak001 631791e14d add tests for shortened function body extensions
Remove implementation in unused label (expressions can't have labels)
2022-02-02 21:02:29 +01:00
WebFreak001 a3fe7611a8 implement new ThrowExpression & shortened methods 2022-01-31 18:04:17 +01:00
Shigeki Karita 7c54e445c6 Add max_line_length config 2022-01-21 13:24:35 +01:00
Per Nordlöw 308bdfd1c1 Replace `std.typecons.scoped` with `scope` 2021-08-27 16:49:36 +09:00
Per Nordlöw 41d9682a5f Bump dsymbol to use branch use-gcallocator
Replace deprecated `body` with `do`

Bump dsymbol

Bump dsymbol
2021-08-27 16:49:36 +09:00
WebFreak001 7809598da0 fix if_constraints_indent with broken/null tokens
Subtraction from t.line (which is unsigned) caused the while loop
to run nearly infinitely before, starving the system of memory as it
was allocating memory.

fixes #829
2021-05-10 18:28:24 +00:00
Vladimir Panteleev e61ce45856
Add unused_result check 2020-08-25 06:26:31 +00:00
Hackerpilot 2174832e9f Fix tabs/spaces 2020-08-06 17:27:16 -07:00
Hackerpilot 3b590c377a Fix #815 2020-08-06 15:11:04 -07:00
Hackerpilot 0f37040b6f Fix the wording of the -I documentation 2020-07-17 01:23:18 -07:00
Hackerpilot b305f4fbfa Document some of the undocumented command-line switches 2020-07-16 18:38:59 -07:00
Hackerpilot 4bca597f4b Update the documentation for the local import rule 2020-06-22 22:18:12 -07:00
Hackerpilot 1bc03367b4 Disable the local imports check by default 2020-06-22 19:01:05 -07:00
andre2007 da64499c52 --reportFile added 2020-04-13 20:47:18 +02:00
H Paterson 064be72ee7
Fix imports
Because I'm rubbish at programming.
2020-03-21 18:58:07 +13:00
H Paterson 7f10a0598a
Fix find function
Use `canFind`, not `find` - which returns the post-string, not a boolean.
2020-03-21 18:56:58 +13:00
H Paterson 497a900f21
Exclude all hidden directories. 2020-03-21 18:52:00 +13:00
H Paterson 346d11f5e0
Exclude `.git` from search paths.
Currently dscanner searches for files in the target directory ending in `.d` or `.di`.

Git has some hidden files in `.git`, which log commits to files. These files share the same name as the tracked file: For example `.git/logs/refs/heads/somedfile.d` actually contains Git data, not D code.

A naive call to dscanner using `dscanner --syntaxCheck` or `dscanner --styleCheck` (therefore also `dub lint...`) will attempt to check these Git files, resulting in spurious errors, such as:
```sh
./.git/logs/refs/heads/charstream.d(1:1)[error]:
./.git/logs/refs/heads/charstream.d(1:118)[warn]: Line is longer than 120 characters
```

I believe Git is a common enough tool that we're justified to handle this case inside D scanner, rather than asking the user to write configuration files with dodge the `.git` folder.
2020-03-21 18:28:59 +13:00
MoonlightSentinel 00a0eedad5
Fix issue #794: False positive for parameter used in __traits(...)
This applies the already implemented solution for variables (#790) to
parameters by moving the __traits() logic in a new shared superclass.

It's explicitly excluded from UnusedIdentifier because I cannot think
of a good reason to silently allow unused labels.
2020-03-08 02:07:05 +01:00
MoonlightSentinel 4f417b64a1 Fix #788: Enum value used inside __traits(...) flagged as unused 2020-01-26 19:17:12 +01:00
MoonlightSentinel be5acfcae8 Fix empty error messages in issue 786
The message was assigned to Message.key and hence not printed.
2020-01-04 15:10:58 +01:00
Eugen Wissner 1d476fa39d Support checkName in errorFormat 2019-09-25 10:13:07 +03:00
Brian Schott d4dd5b9864
Merge pull request #773 from dlang-community/update-ctags-url
Fix the URL in the ctags output
2019-09-12 16:46:55 -07:00
Andre Pany 3b6bbad9fe Added reportFormat sonarQubeGenericIssueData 2019-09-11 12:53:26 +02:00
Hackerpilot 583fa7a898 Fix the URL in the ctags output 2019-08-23 11:19:23 -07:00
Eugene Wissner 3b9d608866 Track check name for error messages (#769)
* Track check name for error messages

* Assert BaseAnalyzer.getName() is implemented
2019-07-09 12:16:25 +02:00
Frank LENORMAND 94d102a5f6 Document --errorFormat (#767)
* Document the "--errorFormat" in the usage message

* Document the "--errorFormat" in the README
2019-07-02 23:00:16 +02:00
Eugene Wissner 9502af2494 Split unused variable and unused parameter checks (#768) 2019-07-02 22:56:52 +02:00
Hiroki Noda e13c4f2f60 Use writeln instead of write to print the version (#764) 2019-06-03 09:34:17 +02:00
Basile-z 378cbcc6bd
fix #762 - False positive on "unused variable" with side effect (#763) 2019-05-29 11:11:03 +02:00
Sebastian Wilzbach 93418e3aa9 Fix #760 - ignore deprecated symbols in the undocumented check 2019-05-14 23:29:53 +02:00
Basile Burg 4499e559f0 final attrib check, prevent using an array to store the protection 2019-02-28 12:09:21 +01:00
Basile Burg 7850f30ec9 fix dscanner warning on non doc decl 2019-02-28 12:01:58 +01:00
Basile Burg 436a961934 Revert "ci, add codecov (#741)"
This reverts commit 0b84fc9b6b.
2019-01-03 03:05:03 +01:00
BBasile 0b84fc9b6b ci, add codecov (#741)
ci, add codecov
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
2019-01-02 16:23:18 +01:00
Nathan Sashihara 383fcb84d8 Fix byte order mark stripping (#740)
Fix byte order mark stripping
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
2019-01-01 11:13:09 +01:00
BBasile 9ef6d0aec1 fix - adaptation to correct DIP 1009 impl. was incomplete (#728)
fix - adaptation to correct DIP 1009 impl. was incomplete
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
2018-11-29 09:51:23 +01:00
BBasile 83c89ddc22 fix #721 - disable GC while scanning to prevent GC to dispose some AST members (#725)
fix #721 - disable GC while scanning to prevent GC to dispose some AST members
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
2018-11-29 08:41:08 +01:00
Basile Burg 8d3dcc55bc fix #723 - segfault when running D-Scanner master against dparse repo with -S 2018-11-27 14:40:12 +01:00
BBasile f585c383f1
update to dparse 0.10.x (#713) 2018-11-22 22:57:25 +01:00
Basile Burg aebb5b4a4c fix #696 - Unused variable fake positive with UFCS
Apparently it was a bug not only specific to the UFCS.
Now every use of the member access operator is handled.
2018-09-16 16:58:39 +02:00
WebFreak001 aeebbf85ae Fix #698 2018-09-13 16:42:21 +02:00
The Dlang Bot ed5bfe7269
Merge pull request #691 from BBasile/dparse-attrib-inloop
Update dparse to fix possible infinite loop and adapt to ParameterAttribute
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
2018-08-30 11:52:03 +02:00
Basile Burg 7494c5fb14 Update dparse to fix possible infinite loop and adapt to ParameterAttribute 2018-08-29 18:19:58 +02:00
BBasile 1b503656d4
Set the check for useless init disabled by default 2018-08-22 16:32:40 +02:00