When a `match` call's patterns do not contain any symbols that reference the outer scope, then there is no reason to use `match`; that call should be replaced with `case`. This allocates diagnostic code 308 to match-should-case. In order to detect this, I had to add a loop over file.lexicals. This is often a very large table, so it could adverse performance impact. I believe it is necessary in order to distinguish between case vs match since other means seem to only be applied after macroexpansion by which time neither one exists. I've updated docs/linting.md to mention the new loop and cleaned up a few things in that file that were outdated. I've added tests for the new lint to ensure it doesn't trigger when it shouldn't. |
||
|---|---|---|
| .. | ||
| linting.md | ||
| manual.md | ||
| packaging.md | ||