A fork of https://git.sr.ht/~xerool/fennel-ls/ for development purposes
Go to file
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
deps fennel 1.5.1 2024-09-03 12:04:47 -05:00
docs Add match-should-case lint and fix action. 2024-10-10 19:46:59 -05:00
nix feat: add nix(os) packaging &development support 2024-02-19 23:14:52 -06:00
rockspecs I keep messing with the luarocks stuff 2024-06-27 01:27:54 -05:00
src Add match-should-case lint and fix action. 2024-10-10 19:46:59 -05:00
test Add match-should-case lint and fix action. 2024-10-10 19:46:59 -05:00
tools clean up require paths 2024-09-07 23:32:37 -05:00
.build.yml small changes 2024-06-24 00:22:51 -05:00
.gitignore Add Love2D API generation flag option to make docs target 2024-09-07 12:33:57 -04:00
changelog.md update changelog 2024-07-08 10:49:04 -05:00
default.nix feat: add nix(os) packaging &development support 2024-02-19 23:14:52 -06:00
fennel fennel 1.5.1 2024-09-03 12:04:47 -05:00
flake.lock feat: add nix(os) packaging &development support 2024-02-19 23:14:52 -06:00
flake.nix feat: add nix(os) packaging &development support 2024-02-19 23:14:52 -06:00
flsproject.fnl add an flsproject.fnl file 2024-07-08 11:52:26 -05:00
LICENSE Update copyright line 2024-06-15 22:32:11 -05:00
Makefile Add Love2D API generation flag option to make docs target 2024-09-07 12:33:57 -04:00
README.md Reorganize the readme files 2024-07-07 23:29:46 -05:00
TODO.md fennel 1.5.1 2024-09-03 12:04:47 -05:00

fennel-ls

Source | Issues | Mailing List

Provides intelligent editing features for fennel files.

License

fennel-ls is licensed under the MIT license. See LICENSE for more info. This project also contains files from other projects:

  • fennel and deps/fennel.lua are compiled from fennel [MIT license]

  • deps/faith.lua is from faith [MIT license]

  • deps/pl/stringio.lua is from Penlight [MIT license]

  • deps/dkjson.lua is from dkjson [MIT license]

  • src/fennel-ls/docs/generated/* contains files generated from other sources. It contains information from: