1
1
Fork
You've already forked ecformat
0

Consider Subdirectory sections on relative paths #54

Manually merged
BaumiCoder merged 5 commits from bugfix/47-subdirectory-sections-are-not-considered into main 2026年06月05日 16:50:31 +02:00

Resolves #47

User perspective

If you give a relative path, such as src/my/module, as a target for ecformat, it now considers all relevant sections in the EditorConfig. Before this Pull Request some sections were not detected correctly (see #47 for details).

Developer perspective

As the ec4rs crate does not support relative paths completely, the solution for ecformat is to use only absolute paths. To make sure that really all paths are absolute, the targets (from the CLI) are converted to absolute paths as all paths are based on the targets.

Resolves #47 ### User perspective If you give a relative path, such as `src/my/module`, as a target for ecformat, it now considers all relevant sections in the EditorConfig. Before this Pull Request some sections were not detected correctly (see #47 for details). ### Developer perspective As the `ec4rs` crate does not support relative paths completely, the solution for ecformat is to use only absolute paths. To make sure that really all paths are absolute, the targets (from the CLI) are converted to absolute paths as all paths are based on the targets.
The relative form of the path is necessary to test
that ecformat also works fine on relative paths.
This test currently fails with
thread 'test_status_ecformat_tests_resources' (18162) panicked at tests/status.rs:192:5:
No md file in trim_trailing_whitespace directory considered
The bugfix for issue 47 will fix that test (RED-GREEN pattern).
As ec4rs does not fully support relative paths,
make sure that all paths inside ecformat are absolute.
Refactoring: Simplify parameter type
Some checks failed
/ changes (pull_request) Successful in 53s
/ lint_reuse (pull_request) Successful in 1m15s
/ lint_codespell (pull_request) Successful in 1m6s
/ lint_cargo_deny (advisories) (pull_request) Has been cancelled
/ lint_cargo_deny (bans licenses sources) (pull_request) Has been cancelled
/ lint_clippy (pull_request) Has been cancelled
/ lint_rustfmt (pull_request) Has been cancelled
/ lint_taplo (pull_request) Has been cancelled
/ lint_yamllint (pull_request) Has been cancelled
/ lint_cargo_udeps (pull_request) Has been cancelled
/ lint_docs_rs (pull_request) Has been cancelled
/ test (pull_request) Has been cancelled
/ lint_ecformat (pull_request) Has been cancelled
bbf67b44b3
Fix spelling in comments
All checks were successful
/ changes (pull_request) Successful in 53s
/ lint_reuse (pull_request) Successful in 1m13s
/ lint_codespell (pull_request) Successful in 1m6s
/ lint_ecformat (pull_request) Successful in 9m17s
/ test (pull_request) Successful in 4m36s
/ lint_cargo_deny (advisories) (pull_request) Has been skipped
/ lint_cargo_deny (bans licenses sources) (pull_request) Has been skipped
/ lint_clippy (pull_request) Successful in 3m27s
/ lint_rustfmt (pull_request) Successful in 1m59s
/ lint_taplo (pull_request) Has been skipped
/ lint_yamllint (pull_request) Has been skipped
/ lint_cargo_udeps (pull_request) Successful in 22m51s
/ lint_docs_rs (pull_request) Successful in 4m27s
105dbddec4
BaumiCoder manually merged commit fa914d324f into main 2026年06月05日 16:50:31 +02:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
Compat/Breaking
Breaking change that won't be backward compatible
EditorConfig
0.17.2
Issues to support version 0.17.2 of the EditorConfig specification
Kind
Bug
Something is not working
Kind
Chore
Some tasks maintainig tasks
Kind
Documentation
Documentation changes
Kind
Enhancement
Improve existing functionality
Kind
Feature
New functionality
Kind
Testing
Issue or pull request related to testing
Packaging
About packaging the project for some platform
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
WIP
Work in progress (Assignee is working on this issue)
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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!54
Reference in a new issue
BaumiCoder/ecformat
No description provided.
Delete branch "bugfix/47-subdirectory-sections-are-not-considered"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?