[core.reflect] looking at module dependencies

Stefan Koch uplink.coder at googlemail.com
Sat Oct 2 10:45:29 UTC 2021


On Saturday, 2 October 2021 at 10:16:56 UTC, Basile B. wrote:
> On Friday, 1 October 2021 at 14:44:24 UTC, Stefan Koch wrote:
>> Please let me know if this needs more explanation and if you 
>> found the usage of core.reflect intuitive.
>
> To which extent self-linting would be work with core.reflect ?
>
> I'm thinking to something like add `import self_lint;`. That 
> module would implement several visitors, like the D-scanner 
> checks. Then during compilation you can also lint, for example 
> using `enum _ = lintSymbols!(SequenceOfSymbolToLint).` to 
> trigger the checks.

If you can inject code as a trigger it would work just fine.
However it cannot just be the import.
Adding an import must never change the module that is the 
importer.



More information about the Digitalmars-d mailing list