Add CI script to check line ends#1452
Conversation
|
The The But Ubuntu 22.04 (on which we run mmtk-core CI tests) only provides |
It will display files it processed.
|
As we can see in #1453, the CI style check will now fail if any text file has wrong line ending style. We may introduce |
|
|
||
| # --- Check line ends of text files --- | ||
|
|
||
| if ! $project_root/.github/scripts/ci-check-lineends.sh -v; then |
There was a problem hiding this comment.
I don't think we want -v. From the log in https://github.com/mmtk/mmtk-core/actions/runs/22472311227/job/65091763326?pr=1453, without -v, we will skip printing "Processing file" lines, and the output will only show the files that violate the check, which is much cleaner and useful.
There was a problem hiding this comment.
Yes. That makes sense. I just tried to mimic the style of our existing bash scripts which use -x. I think it is cleaner to just print files with errors.
We add CI scripts to ensure that all text files
This PR is inspired by the scripts introduced in the OpenJDK binding in mmtk/mmtk-openjdk#105, but also offers the ability to automatically fix line ends for the user:
This PR also fixes existing text files that have wrong line ends.