Skip to content

Implement a new rule which checks correct order of appearance for template-defined headings - #22

Merged
koppor merged 7 commits into
mainfrom
rule08_impl
Sep 26, 2026
Merged

koppor merged 7 commits into
mainfrom
rule08_impl

Conversation

@Neutra1l

Copy link
Copy Markdown
Member
  • Missing headings, either optional or mandatory, are skipped as they are either ok to leave out or handled by Rule 01 respectively
  • Interspersed custom headings are ignored.
  • OptionalSection.java and MandatorySection.java are merged into one, with a new enum introduced SectionRequirement.java to capture semantics of optionality of sections. Various rules are reworked/refactored slightly as a result of this change.
  • README.md updated to include the new rule

@Neutra1l
Neutra1l requested a review from koppor September 14, 2026 06:58
@Neutra1l Neutra1l added the enhancement New feature or request label Sep 14, 2026

@koppor koppor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Follow up:

  1. Test cases
  2. Use of OpenFastTrace

Comment thread README.md
| `MADR05` | Only the title may have heading level 1. |
| `MADR06` | Headings must have the levels given in the MADR template. |
| `MADR07` | Consequences (`a`) and Confirmation (`b`), if present, must be level-3 headings under Decision Outcome. |
| `MADR08` | The Title (`a`) and the level 2 headings defined in the template (`b`) must appear in the correct order. |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Follow up: provide an id to each rule. See markdown lint. One can configure per number or per rule id

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Both of these follow ups I think are best handled in separate PRs, as I think they would involve substantial refactoring/rework of the current codebase. For now it would be nice if you can review this and other open PRs on their own merits.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That I meant by "follow-up" 😅

@koppor
koppor merged commit 5364237 into main Sep 26, 2026
8 checks passed
@koppor
koppor deleted the rule08_impl branch September 26, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants