Skip to content

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

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 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.

@flemming-n-larsen
flemming-n-larsen requested a review from a team as a code owner November 1, 2026 20:12
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 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

Copy link
Copy Markdown
Contributor

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

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

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