EditorConfig: Support trim_trailing_whitespace #39

Manually merged
BaumiCoder merged 12 commits from feature/5-trim_trailing_whitespace into main 2026-05-05 19:29:18 +02:00
Owner

Resolves #5

User perspective

Include the trim_trailing_whitespace property into the check and fix command.

Developer perspective

This Pull Request adds the support for trim_trailing_whitespace, the first line based property, which is supported, after the end_of_line property. Therefore, the handling of the end_of_line character, with the platform default as fallback, becomes relevant. For this a small refactoring in end_of_line.rs is also part of the changes.

Resolves #5 ### User perspective Include the `trim_trailing_whitespace` property into the `check` and `fix` command. ### Developer perspective This Pull Request adds the support for `trim_trailing_whitespace`, the first line based property, which is supported, after the `end_of_line` property. Therefore, the handling of the `end_of_line` character, with the platform default as fallback, becomes relevant. For this a small refactoring in `end_of_line.rs` is also part of the changes.
For a more consistant code and to avoid that adjustments are necessary
when the returned types changes.
All submodules of editorconfig not over crate for more direct paths
The line ending, including a fall back option, will be necessary for
every editorconfig property handler which does something line based.
Documentation: Describe end_of_line usage
All checks were successful
/ changes (pull_request) Successful in 2m9s
/ lint_reuse (pull_request) Successful in 1m13s
/ lint_codespell (pull_request) Successful in 1m6s
/ lint_ecformat (pull_request) Successful in 10m20s
/ test (pull_request) Successful in 1m0s
/ lint_cargo_deny (advisories) (pull_request) Has been skipped
/ lint_cargo_deny (bans licenses sources) (pull_request) Has been skipped
/ lint_clippy (pull_request) Has been skipped
/ lint_rustfmt (pull_request) Has been skipped
/ lint_taplo (pull_request) Has been skipped
/ lint_yamllint (pull_request) Has been skipped
/ lint_cargo_udeps (pull_request) Has been skipped
/ lint_docs_rs (pull_request) Has been skipped
76c283b68c
The trim_trailing_whitespace handling is the first line base processing
and the upcoming ones will also use the end_of_line::get_line_ending().
Only the trait inside the itertools crate needs to be used.
Merge branch 'feature/5-trim_trailing_whitespace' of ssh://codeberg.org/BaumiCoder/ecformat into feature/5-trim_trailing_whitespace
All checks were successful
/ changes (pull_request) Successful in 52s
/ lint_reuse (pull_request) Successful in 1m10s
/ lint_codespell (pull_request) Successful in 1m4s
/ lint_ecformat (pull_request) Successful in 1m58s
/ test (pull_request) Successful in 57s
/ lint_cargo_deny (advisories) (pull_request) Has been skipped
/ lint_cargo_deny (bans licenses sources) (pull_request) Has been skipped
/ lint_clippy (pull_request) Has been skipped
/ lint_rustfmt (pull_request) Has been skipped
/ lint_taplo (pull_request) Has been skipped
/ lint_yamllint (pull_request) Has been skipped
/ lint_cargo_udeps (pull_request) Has been skipped
/ lint_docs_rs (pull_request) Has been skipped
b68d9156ca
BaumiCoder manually merged commit 0307c00419 into main 2026-05-05 19:29:17 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BaumiCoder/ecformat!39
No description provided.