1
1
Fork
You've already forked ecformat
0

EditorConfig: Support spelling_language (validation only) #43

Manually merged
BaumiCoder merged 20 commits from feature/8-spelling_language into main 2026年05月31日 11:08:52 +02:00

Resolves #8

User perspective

Include the spelling_language property into the check command. However, it only validates the values set for this property. More details are in the README in the respective section.
The fix command does nothing with that property as an invalid value cannot be fixed automatically. It also does not perform a check instead for this property as fix is not indented to return such errors.

Developer perspective

As this is the first property, which needs an iteration over the .editorconfig files directly, some implementation for this introduced very similar code to the iteration over all files. Therefore, respective refactorings, such as extracting methods, is also part of this Pull Request.

Resolves #8 ### User perspective Include the `spelling_language` property into the `check` command. However, it only validates the values set for this property. More details are in the README in the respective section. The `fix` command does nothing with that property as an invalid value cannot be fixed automatically. It also does not perform a check instead for this property as `fix` is not indented to return such errors. ### Developer perspective As this is the first property, which needs an iteration over the `.editorconfig` files directly, some implementation for this introduced very similar code to the iteration over all files. Therefore, respective refactorings, such as extracting methods, is also part of this Pull Request.
This feature is needed für support
of the spelling_language EditorConfig property
The spelling_language is the first property where ecformat only can
validate the set value itself and not that files respect it.
For this is makes no sense to validate property for every file
where it applies to.
I reported the bug regarding the handling of unset in this situation.
Without this workaround a "ecformat check" fails on the
ecformat repository itself due to the "spelling_language = unset"
in LICENSES/.editorconfig which unsets all properties. Even for
properties which are currently not set in the root .editorconfig.
As the ignore crate does not consider which files are actually in the
repository, ignoring them with a gitignore implies that ecformat ignores
them while validating the .editorconfig files.
To allow usage in tests for get_editorconfig_files
Although ignoring all hidden files is not acceptable at the search for
.editorconfig files as they are hidden themself, hidden directories
have to be ignored to work as documented.
This avoids that the automatic changes in this directory conflict
with the EditorConfig for these files. Furthermore, its a nice test case
for the get_editorconfig_files function.
The get_target_files function never returns an error as it returns
them related to single files inside the iterator, the same way as
get_editorconfig_files does.
Disabling the repeat rule as repeating the first word of the sentence
across multiple comments is not an issue.
Document spelling_language support
All checks were successful
/ changes (pull_request) Successful in 1m32s
/ lint_reuse (pull_request) Successful in 1m13s
/ lint_codespell (pull_request) Successful in 1m8s
/ lint_ecformat (pull_request) Successful in 10m29s
/ test (pull_request) Successful in 4m32s
/ lint_cargo_deny (advisories) (pull_request) Successful in 3m3s
/ lint_cargo_deny (bans licenses sources) (pull_request) Successful in 2m59s
/ lint_clippy (pull_request) Successful in 3m29s
/ lint_rustfmt (pull_request) Successful in 2m2s
/ lint_taplo (pull_request) Successful in 1m57s
/ lint_yamllint (pull_request) Has been skipped
/ lint_cargo_udeps (pull_request) Successful in 22m48s
/ lint_docs_rs (pull_request) Successful in 4m34s
89f1441b68
BaumiCoder changed title from (削除) feature/8-spelling_language (削除ここまで) to EditorConfig: Support spelling_language (validation only) 2026年05月30日 16:16:25 +02:00
Add comment about ec4rs workarounds
All checks were successful
/ changes (pull_request) Successful in 53s
/ lint_reuse (pull_request) Successful in 1m13s
/ lint_codespell (pull_request) Successful in 1m7s
/ lint_ecformat (pull_request) Successful in 2m13s
/ test (pull_request) Successful in 4m33s
/ lint_cargo_deny (advisories) (pull_request) Successful in 3m5s
/ lint_cargo_deny (bans licenses sources) (pull_request) Successful in 2m31s
/ lint_clippy (pull_request) Successful in 3m29s
/ lint_rustfmt (pull_request) Successful in 1m45s
/ lint_taplo (pull_request) Successful in 1m56s
/ lint_yamllint (pull_request) Has been skipped
/ lint_cargo_udeps (pull_request) Successful in 4m1s
/ lint_docs_rs (pull_request) Successful in 3m46s
7cb1ab5072
As reminder to remove them when upgrading to the ec4rs version
that contains the bug fixes.
BaumiCoder manually merged commit 18d80c7301 into main 2026年05月31日 11:08:52 +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!43
Reference in a new issue
BaumiCoder/ecformat
No description provided.
Delete branch "feature/8-spelling_language"

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?