www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [SAOC 2024] - Leverage dmd as a library in D-Scanner in order to

Greetings,

This week I've been more focused on fixing the Autofix flow in 
D-Scanner.
There are 8 checks in need of an Autofix << fix >> :D
- AlwaysCurlyCheck
- AutoFunctionChecker
- DeleteCheck
- EnumArrayLiteralCheck
- ExplicitlyAnnotatedUnittestCheck
- FunctionAttributeCheck
- LambdaReturnCheck
- StaticIfElse

I started by using DMD in the autofix test flow first, and 
managed to fix DeleteCheck and EnumArrayLiteralCheck. The logic 
for autofix code replacements stays the same, only the 
replacement positions change, as they are based on specific 
tokens.

I've also moved around and did a bit of cleanup in the functions 
for running the static analysis flow of D-Scanner. Before, 
everything was in a single file (libdparse analysis flow, dmd 
analysis flow, autofix flow), and it became extremely hard to 
work on it. Now each flow has a separate file.

I've also updated the version of DMD, and now the pipeline fails 
:(

Next week's plan is to fix the pipeline and finish fixing all 
Autofixes
Sep 29