Commit Graph

38 Commits

Author SHA1 Message Date
Robert Schadek b43c8f45cf Always Check Curly
Check that if|else|for|foreach|while|do|try|catch
are always followed by a BlockStatement aka. { }

closer

can not get the test to work

try to get the AutoFix in place

maybe a fix

nicer messages

some formatting

more tinkering

still nothing

autofix work now

AutoFix name

message to message_postfix
2023-09-24 19:35:46 +02:00
WebFreak001 c1e051bfba fix infinite allocating in context formatter 2023-07-10 13:57:27 +02:00
Jan Jurzitza fed654441f
fix #916 autofix CLI, add integration test for it (#917) 2023-07-09 13:09:21 +02:00
WebFreak001 3345a1953a improve public auto fix API 2023-07-08 23:09:33 +02:00
WebFreak001 43caad72a8 add CLI API to get autofixes at location 2023-07-08 23:09:33 +02:00
WebFreak001 53c9536332 add startIndex, endIndex support to format string 2023-07-08 23:09:33 +02:00
WebFreak001 4194e6af0c add `dscanner fix` command 2023-07-08 23:09:33 +02:00
WebFreak001 48cec8a6f4 implement indentation aware autofixes 2023-07-08 23:09:33 +02:00
WebFreak001 93aae57469 add autofix testing API 2023-07-08 23:09:33 +02:00
WebFreak001 f12319d5a8 add autofix whitespace collapsing API 2023-07-08 23:09:33 +02:00
Christian Köstlin 35d2cf4177 feature: Provide predefined error format compatible with dmds output
an output parser that works with dmd / ldc just works (tm) witha
dscanner as well
2023-07-07 00:15:04 +02:00
WebFreak001 1201a68f66 Only call Win32 API to enable colored output once 2023-07-05 22:41:42 +02:00
WebFreak001 a676bb13fb fix selective imports 2023-07-02 13:33:11 +02:00
WebFreak001 78f2b5a420 add colored output option
also adds a simpler way to invoke D-Scanner for users that uses this new
UI by default: `dscanner lint FILES...`
2023-07-02 13:33:11 +02:00
WebFreak001 146fec75d8 add index and endIndex to JSON formats 2023-06-29 17:43:30 +02:00
WebFreak001 b115a6333a also add byte indices to diagnostic ranges
For tools wanting to read from the source file this makes it much easier
to look up the code.
2023-06-29 17:43:30 +02:00
WebFreak001 83eb9c5c2e add built-in report formats incl. GitHub Actions
use on ourself and enable unused variables test to do first test in CI
2023-06-29 14:57:32 +02:00
WebFreak001 5c2035ff76 add end line/column to warnings 2023-06-29 13:19:36 +02:00
WebFreak001 93f338a5e7 fix logger warnings, for real this time
We should probably add a linter case for this
2023-05-19 23:12:16 +02:00
Mai-Lapyst e2cc6e1ad2 Adds an check for `@disable`d functions that have an body; closes #897 2023-05-09 04:10:43 +02:00
Jan Jurzitza 5f1cf31ee0
hide dsymbol warnings, fix #890 (#900) 2023-05-09 03:34:08 +02:00
WebFreak001 2220812b96 Moved DSymbol into DCD 2022-10-14 14:30:10 +02:00
WebFreak001 cdf881c103 add cyclomatic complexity check
Fix #684

Disabled by default.
2022-02-11 20:17:23 +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
Vladimir Panteleev e61ce45856
Add unused_result check 2020-08-25 06:26:31 +00:00
andre2007 da64499c52 --reportFile added 2020-04-13 20:47:18 +02: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
Andre Pany 3b6bbad9fe Added reportFormat sonarQubeGenericIssueData 2019-09-11 12:53:26 +02: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
Eugene Wissner 9502af2494 Split unused variable and unused parameter checks (#768) 2019-07-02 22:56:52 +02: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
Sebastian Wilzbach 558c1bf6cf Fix #438 - check for __gshared and immutable redundancies 2018-04-06 10:46:21 +02:00
BBasile cb31d2501e
add IZ safeAccess util and refactor several && chains with it (#577)
* add IZ safeAccess util and refactor several && chains with it

* show how to make inference working
2018-04-02 17:29:36 +02:00
BBasile 0e35538bbd Adds a check for too much trusted scope, close #545 (#581)
Adds a check for too much trusted scope, close #545
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
2018-04-02 07:48:20 +02:00
Sebastian Wilzbach cb073c3cf0 Add check for if constraint indendation 2018-03-22 21:03:10 +01:00
Laurent Tréguier 2be1a1f22f Move everything under package `dscanner` (#526)
* Move everything under package `dscanner`

* Fix .gitignore

* Fix .dscanner.ini
2018-03-22 20:15:42 +01:00