Skip to content

fix: support when charset is not set (fixes #505)#506

Merged
theoludwig merged 3 commits intoeditorconfig-checker:mainfrom
rasa:rasa/fix-unset-charset
Nov 25, 2025
Merged

fix: support when charset is not set (fixes #505)#506
theoludwig merged 3 commits intoeditorconfig-checker:mainfrom
rasa:rasa/fix-unset-charset

Conversation

@rasa
Copy link
Copy Markdown
Contributor

@rasa rasa commented Nov 21, 2025

Fixes #505

Comment thread CHANGELOG.md Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.44%. Comparing base (af09b21) to head (806323e).
⚠️ Report is 84 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #506      +/-   ##
==========================================
- Coverage   86.72%   85.44%   -1.28%     
==========================================
  Files          11       11              
  Lines        1017     1017              
==========================================
- Hits          882      869      -13     
+ Misses        102      100       -2     
- Partials       33       48      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Removed details for version 3.5.1 from the changelog.
@rasa rasa changed the title fix: support undefined charsets (fixes #505) fix: support when charset is not set (fixes #505) Nov 22, 2025
Copy link
Copy Markdown
Member

@theoludwig theoludwig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! That solves the problem.

Just pointing that out here, as it's related to charset:
I also have lot of issues with: "UTF-8-SIG" instead of "utf-8", shouldn't we consider that it's basically the same thing, and should we be that strict? (that can probably be solved separately than this PR).
What do you think?

Comment thread CHANGELOG.md
Comment thread Makefile

GO_VERSION := $(shell go version)
# go: -race is not supported on windows/arm64
ifeq ($(findstring windows/arm64,$(GO_VERSION)),windows/arm64)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think go Linux 386 doesn't support it either

Copy link
Copy Markdown
Contributor

@ccoVeille ccoVeille Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

this point can be addressed later. And the PR merged as-is.

@rasa
Copy link
Copy Markdown
Contributor Author

rasa commented Nov 24, 2025

"UTF-8-SIG" instead of "utf-8", shouldn't we consider that it's basically the same thing, and should we be that strict?

I think that utf-8 is for non-BOM files, since utf-8-bom is for BOM files. If we want to support both, perhaps we allow multiple charsets:

charset = utf-8,utf-8-bom

or maybe

charset = utf-8*

@theoludwig
Copy link
Copy Markdown
Member

"UTF-8-SIG" instead of "utf-8", shouldn't we consider that it's basically the same thing, and should we be that strict?

I think that utf-8 is for non-BOM files, since utf-8-bom is for BOM files. If we want to support both, perhaps we allow multiple charsets:

charset = utf-8,utf-8-bom

or maybe

charset = utf-8*

I created a separated issue for this: #511 , we might consider that utf-8-bom, sig, etc are "all the same", depending on how strict we want to be.

@theoludwig
Copy link
Copy Markdown
Member

@ccoVeille @mstruebing We should merge and release this PR rather quickly as it impacts lot of people as shown here: editorconfig-checker/action-editorconfig-checker#236, #511, #509, #505

@mstruebing
Copy link
Copy Markdown
Member

mstruebing commented Nov 25, 2025

Yes I agree, the commit messages still needs to be adjusted.

⧗   input: fix(docs): Update changelog
✖   subject must not be sentence-case, start-case, pascal-case, upper-case [subject-case]

⧗   input: fix(docs): Remove version 3.5.1 details from CHANGELOG

Removed details for version 3.5.1 from the changelog.
✖   subject must not be sentence-case, start-case, pascal-case, upper-case [subject-case]

cc @rasa

@theoludwig theoludwig merged commit 85fcb6b into editorconfig-checker:main Nov 25, 2025
4 of 6 checks passed
@rasa
Copy link
Copy Markdown
Contributor Author

rasa commented Nov 26, 2025

Yes I agree, the commit messages still needs to be adjusted.
cc @rasa

Sorry, I have been traveling all day. And sorry for the capitialization.

@theoludwig
Copy link
Copy Markdown
Member

Yes I agree, the commit messages still needs to be adjusted.
cc @rasa

Sorry, I have been traveling all day. And sorry for the capitialization.

No problem! Thank you for helping fixing the issue quickly after we released the charset check. 😄

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.

Character encoding checks trigger on 'Wrong character encoding (_ instead of "")'

4 participants