Repository navigation
Releases
Sudsy 0.0.3
Packaging
- The VS Code publisher is
sudsy(extension idsudsy.sudsy) and the winget id isSudsy.Sudsy.
The package descriptions and READMEs are generated from the language support data and no longer
claim languages that are still in progress; npm and PyPI packages carry keywords.
Lint
-
Ruby
unknown-cop-nameis renamedunknown-rule-in-directive(no alias): a shared rule that
reads the grammar'ssuppress directiverows. The Pythonnot a == b,not not arules
(negate-equal-op,negate-not-equal-op,double-negation) now offer an unsafe fix. -
PowerShell uses the shared rules, renamed (config keys and the
powershell/psscriptanalyzerpreset
follow, no aliases):no-invoke-expressionisno-eval,no-write-hostisno-print,
empty-catch-blockisno-empty-catch. They report the whole command or clause, not its first
token. Command names incallslists match without regard to case in PowerShell. -
no-control-regex,no-regex-spacesandno-misleading-character-classalso exist for Java
(Pattern.compile,Pattern.matches), C# (new Regex, the staticRegexmethods) and PHP
(preg_*); they are off by default. -
no-unreachableis renamedunreachable-code(JavaScript/TypeScript config keys and the
eslint-recommendedpreset follow). It now runs in C#, Java, JavaScript/TypeScript, Kotlin, PHP,
Python and Ruby, and is on by default (warn) in all of them; in C# it was off. -
no-fallthroughalso runs in Java and PHP. -
JavaScript/TypeScript scope rules are the shared ones and are renamed (config keys and the
eslint-recommendedandtypescript-eslint-recommendedpresets follow, no aliases):
no-undefisundefined-variable,no-redeclareisredeclared-variable,
no-use-before-defineisuse-before-define,no-shadowisshadowed-variable, and
no-unused-varsis split intounused-variableand the newunused-parameter. ESLint's
options become rule options:unused-variablehascaught_errors,ignore_patternand
ignore_rest_siblings,unused-parameterhasargsandignore_pattern,use-before-define
hasfunctions,classesandvariables,shadowed-variablehasallowandkinds. -
Python scope rules are the shared ones and are renamed (config keys and the
python/ruffpreset
follow, no aliases):undefined-nameisundefined-variable,redefined-while-unusedis
redeclared-variable,undefined-local(F823) isuse-before-define, and
import-shadowed-by-loop-varandredefined-argument-from-localare merged into
shadowed-variable(so a plainwarnnow reports both; it wasofffor the second).
Names inside quoted annotations are read as identifiers, not parsed. -
The regex rules are one shared family (
core_rules::regex_source): JavaScript/TypeScript keeps
no-control-regex,no-regex-spaces,no-empty-character-class,
no-misleading-character-classandno-useless-escape(regex part), and Python has the new
no-control-regex,no-regex-spacesandno-misleading-character-class(off by default) for
the constant string given tore.compile,re.match,re.searchand the otherrefunctions.
no-regex-spacesnow also reads the pattern of a string argument with its escapes decoded. -
Rules that check the same thing share one id (config keys and the presets follow, no aliases):
no-self-assign(Rubyself-assignment),boolean-literal-comparison(Python
true-false-comparison; Java has it as before),no-wildcard-imports(Javaavoid-star-import,
Pythonundefined-local-with-import-star),no-useless-expression(JavaScript
no-unused-expressions, Pythonuseless-expression),no-debugger(Pythonleftover-debugger),
no-print(Pythonprintandpprint; aprint(file=...)to a file and the aliasppare no longer told apart),no-eval(Pythonexec-call),no-empty-catch(Pythontry-except-pass, Ruby
suppressed-exception),no-broad-catch(Pythonbare-exceptandblind-except, Ruby
rescue-exception; optionsbareandtypes) andno-throw-generic(Python
raise-vanilla-class; optiontypes). An emptycatchisno-empty-catch, no longer
no-empty-block. Pythonbare-exceptandblind-exceptare one rule:blind-exceptis
no-broad-catchwith the optiontypes: [Exception, BaseException], and it no longer sees a
tuple of types.no-debuggeralso reports the Python import of a debugger module.
CSScomment-no-emptyisno-empty-commentandcomment-whitespace-insideiscomment-space
with the optionsblock: trueandline: false(the stylelint preset sets them).
Changed
- GraphQL
selection-set-depth: the optionmax_depthis nowmax, as in everymaxrule.
Sudsy 0.0.2
Fixed
- VS Code and the release archives: JavaScript/TypeScript, CSS, Python, SQL, Java, HTML, Vue,
Svelte, Angular, Kotlin, PHP and Ruby were reported as not installed and were not formatted or
linted, and installing them failed with "this build has nojslanguage pack". Only
tree-sitter languages are packs; the others are in the binary. - Python: the formatter is stable on its own output (comments in lambdas, implicit string
concatenations, after the head of an attribute chain, inclass C( # c).
Install
- Packages for npm (
npm i -D sudsy), PyPI (pip install sudsy,uvx sudsy), Homebrew
(brew install bingsubandit/sudsy/sudsy), Scoop, winget andcargo binstall, built from the
release archives. - VS Code: the install prompt for a missing language shows on every open of such a file, with
"Don't ask again"; the command "Sudsy: Install Missing Languages" installs the languages of the
open files.sudsy.importStrategy:fromEnvironment(default) usessudsy.serverPath, then a
sudsyon PATH, then the bundled binary;useBundledalways uses the bundled one.
Lint
- On every language with statement roles (C#, Java, JavaScript/TypeScript, Kotlin, PHP, Python,
Ruby, SQL):no-self-compare,no-constant-condition,no-constant-comparison,
no-assignment-in-condition,no-empty-blockandno-duplicate-case. - Java, Kotlin and PHP: unused imports, unused local variables, undefined variables (PHP) and
parameter assignment. - JavaScript:
no-fallthrough,no-unexpected-multiline,no-control-regexand
no-misleading-character-class. - Vue and Svelte: rules checked against eslint-plugin-vue and eslint-plugin-svelte
(no-target-blankandno-dupe-on-directivescorrected, fewer false positives), new
v-on-event-hyphenation,no-v-text-v-html-on-component,no-use-v-else-with-v-for,
no-dupe-v-else-ifandno-unknown-style-directive-property; on Vue<script>and
<script setup>,require-default-prop,require-prop-typesandno-dupe-keys, and Svelte
no-object-in-text-mustaches.
Faster
- SQL: a hand-written parser replaces sqruff (about 40x faster, a twentieth of the memory, no
512 KB file limit; the binary is 4 MB smaller). - Startup about 30 percent fewer instructions; HTML, Vue and Svelte formatting cheaper.
Sudsy 0.0.1
First release: one formatter and linter, as a CLI and a VS Code extension, configured by
one sudsy.yaml. Every layout decision is an option; presets are plain config.
C# (needs the .NET 10 runtime)
- Formatter with options for brace style, wrapping, blank lines, usings and more; presets
csharp/google,csharp/csharpier-compat,csharp/stylecop,csharp/dotnet-runtimeand
csharp/unity. Without a preset the layout is Microsoft's. - Lint rules on Roslyn binding, types and control flow (unreachable code, unused variables and
assignments, usings, private members, null dereferences) plus the StyleCop-style layout,
naming and documentation rules.analysis: fast|standard|deepsets how much runs. - Unity:
csharp/unitycountsAwake,Update,OnTriggerEnterand the other message methods
as used;.asmdef,.asmref,.inputactions(JSON),.uss(CSS) and.uxml(XML) are
formatted. Unity's serialized YAML (.unity,.prefab,.asset,.meta) is left alone.
Data and config files
- JSON and JSONC, YAML, TOML, XML (
.csproj,.props,.resx,.xaml, ...), INI,.editorconfig,
.gitignore: formatting and lint rules; presetsjson/prettier-compat,json/biome,
yaml/prettier-compat,yaml/yamllint,toml/taplo-compat,xml/csharpier-compat. - GitHub Actions workflows and Dockerfiles, Protobuf, HCL, Makefile.
Web, scripts and docs
- CSS, SCSS and Less, JavaScript and TypeScript (JSX/TSX), HTML with embedded script and style,
GraphQL, Markdown (embedded code blocks are formatted by their languages). - Python (ruff's layout and rule families), SQL (sqlfluff's layout and rules; dialects ansi,
postgres, mysql, tsql), Vue and Svelte single-file components, Angular templates. - Shell and PowerShell lint.
Early (formatter or rules incomplete; keep format on save off for these)
- Java: google-java-format layout (84% of a large corpus identical) and Checkstyle-style rules.
- Kotlin: ktlint's whitespace layout without wrapping, and the first ktlint rules.
- C and C++, PHP, Ruby: parsed and linted; files are kept as written by the formatter.
Tools
- CLI:
format,lint,fix,check,rules,config print,init(including migration from
yamllint, Prettier, Biome, ESLint, StyleCop and CSharpier configs); human, JSON, SARIF and GitHub
Actions output. - VS Code extension (language server): diagnostics, quick fixes, fix all, format on save, a
long-lived C# worker with an incrementally updated workspace. The.vsixcontains the server
and the worker. - Rules beyond the built-in ones: ast-grep-style pattern rules (
plugins: patterns:) and Wasm
plugins (API v0, unstable). - Packages for linux, macOS and Windows (x64 and arm64).
Known limits
- The C# workspace is the
.csfiles under the opened roots, not an MSBuild project: package types
do not resolve, soremove-unused-usingsstays silent for files with errors. unused-private-memberdoes not see calls by name (Invoke("Name"),StartCoroutine("Name")).- Range formatting is not available.
- The Wasm plugin API changes without notice until v1.