Commit Graph

75 Commits

Author SHA1 Message Date
Vladiwostok de6c0a3c98 Use DMD in CyclomaticComplexityCheck (#85)
* Use DMD in CyclomaticComplexityCheck

* Simplify templated visit

* Keep old unit tests
2025-08-29 13:16:44 +03:00
Vladiwostok 4e69052ddc Replace libdparse in IfElseSameCheck (#81)
* Fix & extend IfElseSameCheck

* Enable debug session

* Revert "Enable debug session"

This reverts commit e703fbe58db4c2def038b5473b5b127c4a3773d0.

* Replace common code with template

* Investigate failing workflows

* Revert "Investigate failing workflows"

This reverts commit 11e1dbf4935e492c18bb837611822df8bbb12efd.

* Remove check extension

* Trigger assign error only for the ternary operator

* Fix assignment error
2025-08-29 13:16:44 +03:00
Vladiwostok cd8f4031a9 Use DMD in NumberStyleCheck (#88)
* Replace libdparse with DMD in NumberStyleCheck

* Fix re-lexing for windows (CRLF terminators) files

* Improve unit test
2025-08-29 13:16:44 +03:00
Vladiwostok 7d8d89ca9c Delete DuplicateAttributeCheck (#79) 2025-08-29 13:16:44 +03:00
Eduard Staniloiu aefc3cb19a Fix branch after rebase 2025-08-29 13:16:44 +03:00
Eduard Staniloiu d76aa0890c Fix branch after rebase 2025-08-29 13:16:44 +03:00
Vladiwostok 3698c89fff Use DMD in RedundantStorageClassCheck (#84) 2025-08-29 13:16:44 +03:00
Vladiwostok 608e773400 Replace libdparse in AsmStyleCheck (#75) 2025-08-29 13:16:44 +03:00
Vladiwostok 52b2a16e1a Add null terminator to string pointers (#77) 2025-08-29 13:16:44 +03:00
lucica28 e73a8a8860 replace libdparse in trust_too_much visitor (#70) 2025-08-29 13:16:44 +03:00
lucica28 b45b268c0c delete float operator check (#71) 2025-08-29 13:16:44 +03:00
lucica28 a7545fc9d2 replace libdparse in unused label check (#65) 2025-08-29 13:16:44 +03:00
lucica28 47dc93d6e1 replace libdparse in exception check (#68) 2025-08-29 13:16:44 +03:00
lucica28 faf939ab18 replace libdparse in useless assert (#63) 2025-08-29 13:16:44 +03:00
lucica28 3c3eb1f578 replace libdparse in statif if else visitor (#56) 2025-08-29 13:16:44 +03:00
lucica28 a6c7de97b7 replace libdparse in redundant parens check (#61) 2025-08-29 13:16:44 +03:00
lucica28 cd2b2e0af4 update dmd and include the API needed for semantic analysis (#66)
* update dmd and include the API needed for semantic analysis

* update libparse + initial implementation for properly documented public functions

* test

* refactor

* update workflows

* delete unused code
2025-08-29 13:16:44 +03:00
lucica28 c115d9f163 replace libdparse in backwards range check (#58) 2025-08-29 13:16:44 +03:00
lucica28 88ea8f974a replace libdparse in builtin properties visitor (#52) 2025-08-29 13:16:44 +03:00
lucica28 9f961bf051 replace libdparse in logic precedence visitor (#54) 2025-08-29 13:16:44 +03:00
lucica28 b90511573d replace libdparse in auto ref assignment (#51) 2025-08-29 13:16:44 +03:00
lucica28 1591f9a16a replace libparse in opequals without tohash visitor (#53) 2025-08-29 13:16:44 +03:00
lucica28 117c48a5f3 replace libdpase in assert without msg visitor (#50) 2025-08-29 13:16:44 +03:00
lucica28 697e59d7d7 replace libdparse in local imports visitor (#45) 2025-08-29 13:16:44 +03:00
lucica28 35deff3302 replace libdparse in constructor check (#43) 2025-08-29 13:16:44 +03:00
lucica28 bba7536e41 replace libdparse in alias style visitor (#38) 2025-08-29 13:16:44 +03:00
lucica28 56f7d99a27 replace libdparse in explicitly annotated unittests check (#44) 2025-08-29 13:16:44 +03:00
lucica28 ec0d82e62c replace libdparse in length subtraction visitor (#42) 2025-08-29 13:16:44 +03:00
lucica28 8bbaf8e93b replace libdparse in redundant attributes visitor (#40) 2025-08-29 13:16:44 +03:00
lucica28 8a7fe0be62 replace libdparse in imports sortedness visitor (#35)
* replace libdparse in imports sortedness visitor

* minor refactor
2025-08-29 13:16:44 +03:00
lucica28 fa2a67d0ca replace libparse in incorrect infinite range visitor (#33) 2025-08-29 13:16:44 +03:00
lucica28 3b9fe154a1 replace libparse in final attribute visitor (#34) 2025-08-29 13:16:44 +03:00
lucica28 0c470eaa50 replace libdparse in delete check (#21)
* replace libdparse in delete check

* delete comment
2025-08-29 13:16:44 +03:00
lucica28 7c9f8cb97b replace libdparse in objectconst functionality + unittests integration with dmd (#17)
* replace libdparse in objectconst functionality + unittests integration with dmd

* updated dmd

* run tests

* use templates

* visit aggregate declaration

* updated dmd

* solve linter seg fault

* get rid of dup + refactor

* fix typo
2025-08-29 13:16:44 +03:00
Lucian Danescu f6961acd7e Replace libdparse in enum array functionality 2025-08-29 13:16:44 +03:00
WebFreak001 8612841365 fix compilation on old compilers 2023-10-25 08:49:37 +02:00
WebFreak001 42033dcc55 add BaseAnalyzerArguments to keep ctor changes sane
also immediately makes tokens a part of it

This struct can for example precompute token indices for line endings
2023-10-25 08:49:37 +02:00
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