Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ If the workspace root contains a `srcs/` directory, it may contain symbolic link

### CRITICAL: Apply to ALL files you create or edit (bash scripts, Python, C++, YAML, Markdown, etc.)

- All text files must have their final line be non-empty and terminated with a single newline character, leaving no trailing blank lines
- **Never add trailing whitespace on any line** (spaces or tabs at end of lines)
- For all text files, the final character in the file **must** be a newline character, and the immediately-preceding character **must not** be either a newline character or other whitespace (space, tab, etc.)
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new wording in line 105 creates potential confusion about blank lines within files. The phrase "the immediately-preceding character must not be either a newline character" could be misinterpreted to mean that blank lines are never allowed, since blank lines consist of consecutive newline characters.

The intention appears to be: "files must end with exactly one newline character, and there must be no trailing blank lines at the end of the file." However, the current wording about "immediately-preceding character" doesn't clearly distinguish between legitimate blank lines within the file content versus prohibited trailing blank lines at the end.

Consider rewording to be more explicit, such as: "For all text files, the final character must be a newline character, and there must be no trailing blank lines or trailing whitespace at the end of the file."

Suggested change
- For all text files, the final character in the file **must** be a newline character, and the immediately-preceding character **must not** be either a newline character or other whitespace (space, tab, etc.)
- For all text files, the final character in the file **must** be a newline character, and there **must not** be any additional blank lines or trailing whitespace at the end of the file

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrase "other whitespace (space, tab, etc.)" in line 105 creates a technical contradiction with line 106. Line 105 prohibits any whitespace before the final newline, but line 106 says "Never add trailing whitespace on any line" - implying that the issue is trailing whitespace on lines, not before the file's final newline.

If line 105 is interpreted literally as written, it would prohibit files ending with patterns like "content \n" (where there's a space after content), which would be redundantly covered by the line 106 rule about trailing whitespace on lines.

The phrase "or other whitespace (space, tab, etc.)" should be removed from line 105, as the trailing whitespace rule in line 106 already covers this case. Line 105 should focus solely on the "no trailing blank lines" requirement, meaning the character before the final newline must not be another newline.

Suggested change
- For all text files, the final character in the file **must** be a newline character, and the immediately-preceding character **must not** be either a newline character or other whitespace (space, tab, etc.)
- For all text files, the final character in the file **must** be a newline character, and the immediately-preceding character **must not** be another newline character (no trailing blank lines)

Copilot uses AI. Check for mistakes.
- **Never add trailing whitespace on any line** (spaces or tabs at end of lines) unless it is part of a multi-line string
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exception "unless it is part of a multi-line string" is ambiguous and could lead to inconsistent behavior. In most programming contexts, trailing whitespace within multi-line strings is preserved by the language runtime, not by the source file format.

Questions arise: Does this mean Copilot should add trailing whitespace to multi-line string literals when the string content requires it? Should it preserve trailing whitespace that already exists in multi-line strings even if it's not semantically meaningful? What about YAML multi-line strings, heredocs, or template literals?

Consider either removing this exception (letting language semantics handle multi-line string whitespace) or providing specific examples of when this exception applies. The blanket exception may create more confusion than it resolves.

Suggested change
- **Never add trailing whitespace on any line** (spaces or tabs at end of lines) unless it is part of a multi-line string
- **Never add trailing whitespace on any line** (spaces or tabs at end of lines)

Copilot uses AI. Check for mistakes.
- This includes blank lines - they should contain only the newline character, no spaces or tabs
- Exception: Markdown two-space line breaks (avoid; use proper paragraph breaks instead)

Expand Down
Loading