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

test: flag crlf line endings #44

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

test: flag crlf line endings #44

wants to merge 9 commits into from

Conversation

OnkarRuikar
Copy link
Owner

Testing workflow to flag crlf endings.

@OnkarRuikar OnkarRuikar force-pushed the ci_crlf branch 2 times, most recently from 373ef34 to f2e0bf9 Compare December 29, 2024 07:13
files/en-us/games/test/index.md Show resolved Hide resolved
files/en-us/games/test/index.md Show resolved Hide resolved
files/en-us/games/test/index.md Show resolved Hide resolved
@OnkarRuikar
Copy link
Owner Author

@yin1999 thanks! How did you upload the file with crlf?

The modified workflow does flag files with mixed/crlf endings: https://github.com/OnkarRuikar/content/actions/runs/12534736823/job/34955862300?pr=44#step:12:62

The git diff cannot catch the crlf to lf change, and the reviewdog needs the git diff style text to make a suggestion comment. So, for now, we can only flag the files and ask the contributors to correct the line endings. Do you think this solution looks good?

@yin1999
Copy link

yin1999 commented Dec 30, 2024

@yin1999 thanks! How did you upload the file with crlf?

Using github.dev - just press the dot key (.) to open it. You can made the change of EOLs with the Web UI. See: mdn/translated-content#25244 (comment)

The git diff cannot catch the crlf to lf change, and the reviewdog needs the git diff style text to make a suggestion comment. So, for now, we can only flag the files and ask the contributors to correct the line endings. Do you think this solution looks good?

I think this is a reasonable solution! But is there a way for us to tell the PR author through PR review comments when encounter these errors? This is more challenging, we may be able to implement it in the future :)

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