Skip to content

Keep Unix line endings in bots and reject Windows ones - #10

Merged
flemming-n-larsen merged 1 commit into
mainfrom
unix-line-endings
Nov 1, 2026
Merged

flemming-n-larsen merged 1 commit into
mainfrom
unix-line-endings

Conversation

@flemming-n-larsen

Copy link
Copy Markdown
Contributor

What this changes

Every file in this repository is stored with Unix line endings (LF). A launcher script with Windows line endings (CRLF) cannot run under sh, and until now the failure appeared only in the moderation run, as a message about a stray character.

  • A .gitattributes file makes Git store and check out Unix line endings on every system.
  • The validator now rejects any file of a bot that has Windows line endings and names the file, for example: Orbit.sh has Windows line endings (CRLF); convert it to Unix line endings (LF). Binary files and __pycache__ are not checked.
  • CONTRIBUTING.md and templates/README.md tell authors to use Unix line endings.
  • Three new tests cover a launcher, a source file and the configuration file with Windows line endings, and a bot with Unix line endings. Two test helpers wrote text, which gives Windows line endings on Windows; they now write bytes.

Checks

  • All 52 tests pass (49 before this change plus 3 new).
  • All 200 stored text files already have Unix line endings, so this changes no existing bot and no content hash. Renormalizing the repository with the new setting changes nothing.

This is not a bot submission. It is a change to the validator and repository settings, so it needs a moderator's review and merge.

The repository stores every file with Unix line endings, and a launcher script with Windows line endings
cannot run under sh; the failure used to show up only in the moderation run as a message about a stray
character. A .gitattributes file makes Git store and check out Unix line endings on every system. The
validator now rejects any file of a bot that has Windows line endings (CRLF) and names the file.

No stored file changes: all 200 text files already have Unix line endings. Two test helpers wrote text, which
gives Windows line endings on Windows; they now write bytes.
@tank-royale-rumble-moderator-test

Copy link
Copy Markdown
Contributor

@robocode-dev/rumble-moderators Moderation needs your decision for 6e437146a9f3: Non-bot or protected file changed: .gitattributes

The required check stays pending. After reviewing, use /moderation approve <reason> or request changes.

@flemming-n-larsen

Copy link
Copy Markdown
Contributor Author

/moderation approve Unix line endings: Git setting and validator rule, tests pass

@tank-royale-rumble-moderator-test

Copy link
Copy Markdown
Contributor

@flemming-n-larsen accepted the escalated moderation for 6e437146a9f3: Unix line endings: Git setting and validator rule, tests pass

Merge remains a human action.

@flemming-n-larsen
flemming-n-larsen merged commit 12984ee into main Nov 1, 2026
4 checks passed
@flemming-n-larsen
flemming-n-larsen deleted the unix-line-endings branch November 1, 2026 20:11
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.

1 participant