Skip to content

respect end_of_line and charset in editorconfig#973

Merged
cfbao merged 3 commits intomainfrom
cbao/editorconfig-eol
Apr 16, 2026
Merged

respect end_of_line and charset in editorconfig#973
cfbao merged 3 commits intomainfrom
cbao/editorconfig-eol

Conversation

@cfbao
Copy link
Copy Markdown
Contributor

@cfbao cfbao commented Apr 6, 2026

Depending on the OS, the source generator uses different EOL for these two lines (added using StringBuilder.AppendLine):

#pragma warning disable CS1572
#nullable enable annotations

When the generated code is committed and kept in sync with CI (e.g. in opensearch-infrastructure), this can cause frequent drifts because dev machines and actions runners use different OSes.

This PR uses end_of_line from editorconfig as the source of truth to resolve this issue.

Also added support for charset. Not having this doesn't cause drift, but it's just nice to have, and it's supported in a similar way.

VUL-1128

@cfbao cfbao marked this pull request as ready for review April 6, 2026 04:54
@cfbao cfbao requested review from j3parker and omsmith as code owners April 6, 2026 04:54
@cfbao cfbao changed the title respect end_of_line in editorconfig respect end_of_line and charset in editorconfig Apr 11, 2026
@cfbao cfbao merged commit 3446384 into main Apr 16, 2026
2 checks passed
@cfbao cfbao deleted the cbao/editorconfig-eol branch April 16, 2026 20:45
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