ArchUnit
ArchUnit copied to clipboard
Feature Request: Support for analysis of local variables
During https://stackoverflow.com/questions/70507647/how-to-assert-hashmap-keys-to-be-comparable-with-archunit/70509141 we needed a way to analyze local variables.
Hence, I propose to extend JavaCodeUnit https://www.archunit.org/userguide/html/000_Index.html#_domain to also support local variable definition, declaration and initialization.
Technically this should be doable :slightly_smiling_face: But notice that there once already was #227 which pretty much suggested the same I think? However, I didn't get around to it back then and nobody else was willing to tackle it either, so I eventually closed it :disappointed: I would be still open to it (would be necessary to analyse performance impact though and possibly make it an opt-in feature if the drain is too big, since the use case is quite specific). But, as back then I personally don't know when I can really tackle this. So any support would be highly appreciated!
For more persons to find their way to this thread ... https://stackoverflow.com/questions/74461422/archunit-test-sensitive-variable-naming ... ;-)