Skip to content

Add report documentation quality checker#222

Open
pranavisrikanth wants to merge 3 commits into
mainfrom
tools/report-doc-quality-checker
Open

Add report documentation quality checker#222
pranavisrikanth wants to merge 3 commits into
mainfrom
tools/report-doc-quality-checker

Conversation

@pranavisrikanth
Copy link
Copy Markdown
Collaborator

Summary

This PR adds a lightweight Python utility script to support documentation quality validation for AutoAudit GRC/reporting artefacts.

The script checks markdown files for required sections and helps future contributors maintain more consistent report documentation structure.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactor / code cleanup
  • Documentation
  • CI/CD / infrastructure
  • Security

Affected Components

  • /backend-api
  • /frontend
  • /engine (collectors / policies)
  • /security
  • /infrastructure
  • /.github/workflows
  • /docs

Motivation

Recent GRC/report generation work highlighted the need for more consistent documentation structure across reporting artefacts. This utility provides a simple validation mechanism for required markdown sections.

Testing Done

  • Unit tests pass locally
  • Tested manually — describe how:
  • No tests required — explain why:

Tested manually by running:

python tools/check_report_doc_quality.py README.md

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c59d4f3c38

ℹ️ 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".

Comment on lines +19 to +21
missing_sections = [
section for section in REQUIRED_SECTIONS if section not in content
]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Match markdown headings, not arbitrary text

Make the section check validate actual heading lines instead of using substring containment. As written, any occurrence of ## Purpose-like text (for example in a code block, quoted example, or metadata) will satisfy the requirement even if the real section header is missing, so this checker can report false passes and weaken documentation quality enforcement.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Updated in the latest commit. The checker now validates against actual markdown heading lines instead of generic substring matches to reduce false positives.

Copy link
Copy Markdown
Collaborator

@du-dhartley du-dhartley left a comment

Choose a reason for hiding this comment

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

@pranavisrikanth I've approved this PR, but documentation elsewhere will need to be updated so that future contributors are aware that this tool exists and can be used. It would be more beneficial if usage of this was automated somehow but there's no evidence that this was planned.
Please merge this PR, but also establish a place where documentation can be updated to point contributors to this tool.

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.

2 participants