diff --git a/changelog.md b/changelog.md index 131d8e9..4c672a7 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,10 @@ # Changelog ### Features -* New lint for replacing (let [] ...) with (do ...) +* New lint `empty-let` for replacing (let [] ...) with (do ...) +* New lint `duplicate-table-keys` for detecting duplicate keys (eg. `{:a 1 :a 2}`) +* New lint `mismatched-argument-count` for ensuring function calls have the right argument count + * Disabled by default because it gives false positives when your arglist doesn't follow fennel's naming conventions ### Changes * Updated to dkjson 2.8 diff --git a/src/fennel-ls/lint.fnl b/src/fennel-ls/lint.fnl index 69804f1..10fae8c 100644 --- a/src/fennel-ls/lint.fnl +++ b/src/fennel-ls/lint.fnl @@ -310,7 +310,8 @@ the `file.diagnostics` field, filling it with diagnostics." nil last-required-argument last-required-argument - (not= (string.sub s 1 1) "?") + (let [first-char (string.sub s 1 1)] + (and (not= first-char "?") (not= first-char "_"))) i) (or vararg m)))) ;; exception: (- a b) only needs 1 argument