Add markdown report documentation scoring tool#224
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 635ccf48f8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| score = 0 | ||
|
|
||
| for section, points in SCORING_SECTIONS.items(): |
There was a problem hiding this comment.
Parse headings instead of exact stripped-line equality
The section check uses exact string equality (if section in lines), so valid Markdown ATX headings with optional closing hashes (for example, ## Purpose ##) are scored as missing even when all required sections are present. This produces false negatives and causes the CLI to return a non-zero exit code for compliant documents whenever authors use alternate-but-valid heading syntax.
Useful? React with 👍 / 👎.
Summary
This PR adds a Python utility script that scores markdown report documentation quality based on required report sections.
The tool checks whether a markdown file contains key report headings and calculates a documentation quality score out of 100.
Type of Change
Affected Components
/backend-api/frontend/engine(collectors / policies)/security/infrastructure/.github/workflows/docsMotivation
This tool supports GRC/reporting documentation consistency by giving contributors a simple score-based way to assess whether markdown report artefacts contain required sections.
Testing Done
Tested manually by running:
python tools/score_report_doc_quality.py README.md