aboutsummaryrefslogtreecommitdiff
path: root/test/functional/script/clint_spec.lua
Commit message (Collapse)AuthorAge
* test(harness): migrate away from magic globalsJustin M. Keyes2026-07-21
| | | | | | | | | | | | | | | | | | | | | Problem: The magic globals `it`, `describe`, etc., are more trouble than they are worth. - Hooking into `after_each` requires `getfenv()` hacks. - They confuse luals/emmylua, because the top-level `.luarc.json` isn't merged with `test/.luarc.json` (apparently a luals limitation?) - They totally defeat discoverability because the user just has to "know" about the various magic symbols. So they harm DX, which means they serve no purpose at all. Solution: - Expose the test API from `testutil`, so tests can call `t.it()`, `t.describe()`, etc., in the conventional way. - Drop `getfenv()` hacks. - Drop the `setfenv()` injection in `load_chunk`. - Drop `test/_meta.lua`.
* build: lint "strtol" #40442Justin M. Keyes2026-06-28
| | | | | | | | | | | | | | | | | | Problem: No lint for strtol(). Solution: Add lint, and update existing usages. Callers that previously got a (garbage) large positive value: - `indent.c`: use getdigits() (intmax, no int truncation) with def=1 so overflow/too-large values stay positive and fall through to the existing "too big" check (E475). - `file_search.c`: use getdigits() with def=255 so overflow/too-large values keep the "max expand" (else) branch. The other conversions (api/command.c, eval/window.c, highlight_group.c, tui/tui.c) only diverge on pathological overflow inputs where strtol's result was already garbage and the observable outcome is unchanged.
* docs: misc, editorconfigJustin M. Keyes2025-12-15
| | | | fix https://github.com/neovim/neovim/issues/36858
* refactor: clint.py => clint.luaJustin M. Keyes2025-12-08
Problem: `clint.py` is the last python in our codebase, and beyond that it needs some cleanup. And it lacks tests, so modifying it can be painful. Also, we need a way to add ad-hoc lint rules for *Lua*, so it will help to have our ad-hoc rules for C in the same language (the scripts may share functions/techniques): https://github.com/neovim/neovim/issues/28372 Solution: - convert to `clint.lua` (mostly AI-generated, but it now has test coverage, unlike `clint.py`) - drop rules that are no longer needed: - "readability/multiline_string" - technially still relevant, but very uncommon so doesn't really matter. - "--line-length" - Not used in the old clint.py, nor the new clint.lua. - "comment whitespace" check - It is enforced by uncrustify. - "TODO" check - The `-google-readability-function-size` clang-tidy rule enforces "TODO(user)" format. (It was already enabled long ago.)