[SAOC 2024] - Leverage dmd as a library in D-Scanner in order to extend its functionality - Weekly Update 5
Vladiwostok
riciuvlad at gmail.com
Mon Oct 21 00:34:09 UTC 2024
Greetings,
I've made some progress regarding the previous Windows issue.
I've managed to pinpoint the issue to differences regarding end
of line characters. When using delimited strings with the 'q{}c'
syntax, '\r\n' is used as a line separator. When using the '``c'
syntax, '\r' is omitted. The Autofix fix for LambdaReturnCheck
works as expected if the source code uses '\r\n' on Windows
machines. However, writing delimited strings without '\r' to the
test file parsed by DMD on unit tests makes '\r' appear. Again,
those issues only manifest when building D-Scanner with DUB.
Can anyone more knowledgeable in delimited strings provide some
insights on how do they work?
Additionally, I've migrated a check to DMD that was missed:
https://github.com/Dlang-UPB/D-scanner/pull/161
There are a few linting issues found in Phobos that prevent the
merging of some checks. The most significant one is for ensuring
correct indentation when using static ifs. Those issues were not
detected before due to differences in how libdparse parses
conditional statements and conditional declarations. I've drafted
a PR, it should be ready for review soon.
More information about the Digitalmars-d
mailing list