Getting started
1. Install
Section titled “1. Install”npm i -D @sudsylint/sudsyRun it with npx sudsy.
pip install sudsyOr run it without installing: uvx sudsy.
brew install bingsubandit/sudsy/sudsyscoop bucket add sudsy https://github.com/bingsubandit/scoop-sudsy; scoop install sudsyDownload the archive for your platform (Linux, macOS or Windows, x64 or arm64) from the GitHub releases and put sudsy on your PATH.
To try it first without installing anything: npx @sudsylint/sudsy check src/ or uvx sudsy check src/.
2. Check without changing anything
Section titled “2. Check without changing anything”The examples use two small files in src/:
import sysimport osx = os.getcwd()if x == None: print( "hi", sys.argv )function add(a, b) { debugger; return a+b}sudsy check src/src/a.py:1:1: error[format]: the file is not formatted; run `sudsy format`src/a.py:4:4: warning[none-comparison]: compare to None with `is` or `is not`, not `==` or `!=`src/b.js:1:1: error[format]: the file is not formatted; run `sudsy format`src/b.js:2:5: warning[no-debugger]: a call that stops in a debugger was left in the code2 file(s) checked, 2 error(s), 2 warning(s)A line reads file:line:column: level[rule]: message. An error[format] means the file is not formatted; a warning is a likely bug. check changes no files and exits 1 while there is an error.
3. Fix it
Section titled “3. Fix it”sudsy format rewrites the files in the project’s style and changes nothing else. sudsy fix applies the safe fixes of the rules first, then formats. Findings whose fix could change behavior are reported and left alone.
sudsy format src/2 file(s) checked, 2 reformatted, 0 unchangedimport sysimport os
x = os.getcwd()if x == None: print("hi", sys.argv)function add(a, b) { debugger; return a + b;}The two warnings stay, because removing a debugger or rewriting == None is not a safe fix. With the files above, sudsy fix src/ therefore writes the same result and prints the remaining warnings.
4. Configure
Section titled “4. Configure”Without a config file Sudsy formats with its defaults and lint reports likely bugs only, never style. In a terminal sudsy init asks which languages to set up, which style each should follow, and whether to migrate the configs of other tools it finds; Enter takes every default, and Esc writes nothing. Without a terminal it writes a starter file:
sudsy initextends: [] # e.g. preset:python/ruffTo keep the style of a tool you use today, extend its preset. For Python code formatted and linted with ruff:
sudsy init --preset python/ruffextends: - preset:python/ruffA rule is set to off, warn or error in the short form, and can sit beside the preset:
extends: - preset:python/rufflint: rules: no-debugger: errorSee all rules, the presets and the format options.
5. Editor
Section titled “5. Editor”The VS Code extension gives diagnostics, quick fixes, fix all and formatting. Install sudsy.sudsy from the VS Code Marketplace, or from Open VSX for Cursor, Windsurf and VSCodium:
code --install-extension sudsy.sudsyThe .vsix for your platform from the GitHub releases is the fallback.
Turn on format on save per language in .vscode/settings.json:
{ "[python]": { "editor.defaultFormatter": "sudsy.sudsy" }, "[javascript]": { "editor.defaultFormatter": "sudsy.sudsy" }, "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll.sudsy": "explicit" }}sudsy lsp is a language server over stdio, so any editor with an LSP client can use it. See editors and CI.
sudsy check runs the format check and the linter together and exits 1 on an unformatted file or a rule error. With --format github the findings appear as annotations on the pull request.
name: sudsyon: [push, pull_request]jobs: check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: { node-version: 22 } - run: npx @sudsylint/sudsy check --format github7. Next
Section titled “7. Next”- Command line: every command and the JSON output
- Rules: search and filter every rule
- Languages: what each language supports and how it compares
- Compared tools: rule by rule against ESLint, ruff, hadolint and the others