crystal-ameba / ameba

A static code analysis tool for Crystal
https://crystal-ameba.github.io
MIT License
525 stars 39 forks source link

Expand ameba's functionality with semantic information #513

Open nobodywasishere opened 3 days ago

nobodywasishere commented 3 days ago

Currently ameba uses only the stdlib parser in order to provide an AST for the rules to operate over. This is useful, but limits the kinds of things that ameba can be used for. This is an issue to discuss if semantic information to ameba, what that would look like, and what are the downsides / tradeoffs to different approaches. For instance, if we added a top level semantic pass:

nobodywasishere commented 3 days ago

Other rule ideas possible with top level semantic (not saying these should be done, but that they could be):