Files
static-web-server/docs/CODE_STYLE.md
Matthias Schoettle dd43d06551 refactor: format check support Markdown files via mdformat (#597)
* chore: format Markdown files with mdformat
* chore: switch to mdformat config file
* chore: add missing trailing slash
* docs: add section about formatting Markdown files
2025-12-07 10:40:21 +01:00

654 B

Code Style

SWS uses the default configuration of rustfmt.

cargo fmt

cargo fmt --all does not work in SWS. Please use the following commands:

Linux/BSDs

rustfmt --check --edition 2021 $(git ls-files '*.rs')

Windows

Get-ChildItem . -Filter "*.rs" -Recurse | foreach { rustfmt --check --edition 2021 $_.FullName }

Note

: If you are using rust-analyzer, you can add the following two lines in your settings.json to make sure the features get taken into account when checking the project:

 "rust-analyzer.cargo.features": ["full"],
 "rust-analyzer.check.features": ["full"],