Skip to content

Fix rule_id displaying as wrong number on GitHub for rules 0100–0135#409

Merged
dennisdoomen merged 1 commit into
mainfrom
dennisdoomen/validate-rule-id-filenames
May 20, 2026
Merged

Fix rule_id displaying as wrong number on GitHub for rules 0100–0135#409
dennisdoomen merged 1 commit into
mainfrom
dennisdoomen/validate-rule-id-filenames

Conversation

@dennisdoomen
Copy link
Copy Markdown
Owner

@dennisdoomen dennisdoomen commented May 20, 2026

Problem

Rules with IDs between 0100 and 0135 display the wrong rule_id value when viewed on GitHub. For example, 0100.md shows rule_id: 64 instead of 0100.

This happens because YAML 1.1 (used by Jekyll) interprets unquoted numbers with a leading zero as octal. So 0100 (octal) = 64 (decimal).

Fix

Quote the rule_id values in the 9 affected files so YAML treats them as strings:

File Displayed as (before) Displays as (after)
0100.md 64 0100
0105.md 69 0105
0110.md 72 0110
0112.md 74 0112
0115.md 77 0115
0120.md 80 0120
0125.md 85 0125
0130.md 88 0130
0135.md 93 0135

rule_id values like 0100 were being parsed as octal integers by YAML 1.1
(0100 octal = 64 decimal), causing a mismatch with the filename.
Quoting the values ensures they are treated as strings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dennisdoomen dennisdoomen changed the title Fix YAML octal parsing of leading-zero rule_ids by quoting them Fix rule_id displaying as wrong number on GitHub for rules 0100–0135 May 20, 2026
@dennisdoomen dennisdoomen added bug and removed refined labels May 20, 2026
@dennisdoomen dennisdoomen merged commit c388907 into main May 20, 2026
1 check passed
@dennisdoomen dennisdoomen deleted the dennisdoomen/validate-rule-id-filenames branch May 20, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant