Skip to content
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

Fix parsing section lines with trailing comments #363

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rdparker
Copy link

While working on zsa/qmk_firmware, I ran into the following error related to parsing the listed section header line:

editorconfig-error: Error thrown from editorconfig lib: "Error from editorconfig-get-properties-function: (editorconfig-error \"Error from editorconfig-get-properties-function: (error \\\"Error while reading config file: /home/.../qmk_firmware/.editorconfig:14:
    [{*.yaml,*.yml}] # To match GitHub Actions formatting
\\\")\")"

While having a trailing comment on a section header line is unusual, to my knowledge, it is not forbidden. This change patches the relevant regexp using the optional comment pattern from the cond clause immediately above it.

* (editorconfig-core-handle--parse-file): Fix parsing section
lines with trailing comments.

Copyright-paperwork-exempt: yes
@10sr 10sr self-assigned this Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants