fennel-ls/docs
Phil Hagelberg a27f42bfa4 Add match-should-case lint and fix action.
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.
2024-10-10 19:46:59 -05:00
..
linting.md Add match-should-case lint and fix action. 2024-10-10 19:46:59 -05:00
manual.md Fix loading of globals from love2d generated documentation. 2024-09-07 15:00:13 -07:00
packaging.md Add Love2D API generation flag option to make docs target 2024-09-07 12:33:57 -04:00