Sift is a Guile-based formatter, linter, fixer and language server for Scheme, Emacs Lisp and Common Lisp. Its central design choice is to parse source into dialect-specific forms with source positions, then rewrite whitespace around that structure rather than treating code as lines of text. It aims to preserve comments, blank lines, datum comments, read-time forms and other syntax exactly, while making formatting idempotent: running the formatter again should leave the file unchanged. The test suite checks preservation and idempotence across its fixtures. Each dialect follows its own syntax and conventions, including differences in brackets and reader forms, rather than applying one blended style.
The tool provides separate commands to check formatting, print or write formatted code, lint, and apply fixes; CI can check formatting and lint together without changing files. It includes 92 documented, tested rules, with stable codes and explanations. Fixes alter specific source ranges, and are discarded if the combined changes would cause a parse error; comment-based suppressions can disable rules locally. The same results are available in editors through an LSP server, which offers diagnostics, fixes, formatting, navigation, completion and other features. Output formats include human-readable text, JSON, SARIF and GitHub annotations. Configuration can be layered and inspected, and the project also provides editor and CI integrations, pre-commit hooks, and a diagnostic command for checking its runtime and setup. It is MIT-licensed and requires Guile 3.0.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.