Skip to content

Make editorconfig-checker exclude regexes explicit #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 16, 2021
Merged

Make editorconfig-checker exclude regexes explicit #139

merged 2 commits into from
Aug 16, 2021

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Aug 15, 2021

The Exclude array in the .ecrc configuration file contains the regular expressions of paths that should be excluded from checking by the editorconfig-checker tool.

Previously, the "template" file contained a list of filenames that should always be ignored. Although it worked, it was not really correct because the . in the filename is actually a regex wildcard, which is not what was intended. Although a false match was unlikely, this also might mislead users adding project-specific exclusions to the file regarding the nature of the exclude patterns. Changing to very explicit patterns avoids any chance of false matches and also makes it clear that these are regexes.

The repository doesn't have any project-specific configurations for the editorconfig-checker tool, so the stock
"template" `.ecrc` file can be used. This should be kept in sync automatically via the `config:sync` task and the
"Check Configuration Files Sync" workflow.
The `Exclude` array in the `.ecrc` configuration file contains the regular expressions of paths that should be excluded
from checking by the editorconfig-checker tool.

Previously, the "template" file contained a list of filenames that should always be ignored. Although it did work, it was
not really correct because the `.` in the filename is actually a regex wildcard, which is not what was intended. Although
a false match was unlikely, this also might mislead users adding project-specific exclusions to the file regarding the
nature of the exclude patterns. Changing to very explicit patterns avoids any chance of false matches and also makes it
clear that these are regexes.
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Aug 15, 2021
@per1234 per1234 requested a review from umbynos August 15, 2021 03:55
@per1234 per1234 merged commit b7bda5c into arduino:main Aug 16, 2021
@per1234 per1234 deleted the ec-exclude branch August 16, 2021 09:54
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants