no_trailing_whitespace
No line may end with space or tab.
Options
Section titled “Options”This rule takes no kind-specific options.
Plus the common paths, level, id, and when fields. This table is generated from the JSON Schema; option types and defaults are authoritative.
Example
Section titled “Example”Source files with trailing spaces or tabs
Section titled “Source files with trailing spaces or tabs”The rule fires on this repository:
src/src/bad.rssrc/good.rssrc/tabbed.mdfn bad() {}fn good() {}# HeadingWith this .alint.yml:
version: 1rules: - id: no-ws kind: no_trailing_whitespace paths: "src/**/*" level: erroralint check reports:
--- src/bad.rs ----------------------------------------------------------------- x error no-ws 1:1 trailing whitespace on line 1
--- src/tabbed.md -------------------------------------------------------------- x error no-ws 1:1 trailing whitespace on line 1
Summary (2 violations): x 2 errors 0 passing * 1 failingEvery source file is free of trailing whitespace
Section titled “Every source file is free of trailing whitespace”This repository is compliant:
src/src/one.rssrc/two.rsfn one() {}fn two() {}With this .alint.yml:
version: 1rules: - id: no-ws kind: no_trailing_whitespace paths: "src/**/*.rs" level: erroralint check reports:
v All 1 rule(s) passed.