From efbf57d145d195be5d4925c620254138039dafb7 Mon Sep 17 00:00:00 2001 From: Thomas Bartlett <67928676+thomas-bartlett@users.noreply.github.com> Date: Mon, 26 Jan 2026 09:57:00 -0500 Subject: [PATCH] Fix docs formatting for mkdocs rendering --- docs/custom-rules.md | 20 +++++++++----------- mkdocs.yml | 1 + 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/custom-rules.md b/docs/custom-rules.md index e480eac..bb9fe5c 100644 --- a/docs/custom-rules.md +++ b/docs/custom-rules.md @@ -5,28 +5,26 @@ Create custom rules to enforce your own policies, compliance requirements, or co ## Quick Start 1. **Create a source folder** under `sources/`: - ``` - sources/ - ├── core/ # Project CodeGuard rules - ├── owasp/ # OWASP supplementary rules - └── my-rules/ # Your custom rules - ``` + + sources/ + core/ # Project CodeGuard rules + owasp/ # OWASP supplementary rules + my-rules/ # Your custom rules 2. **Copy the template** from `sources/templates/custom-rule-template.md.example` and customize it 3. **Build with your rules**: - ```bash - uv run python src/convert_to_ide_formats.py --source core my-rules - ``` + + uv run python src/convert_to_ide_formats.py --source core my-rules ## Frontmatter Schema | Field | Required | Description | -|-------|----------|-------------| +|:------|:---------|:------------| | `description` | Yes | Brief description of the rule | | `languages` | If `alwaysApply` is false | List of languages this rule applies to | | `alwaysApply` | No | If `true`, rule applies to all files (omit `languages`) | -| `tags` | No | Categories for filtering: `authentication`, `data-security`, `infrastructure`, `privacy`, `secrets`, `web` | +| `tags` | No | Filtering categories (see `src/tag_mappings.py`) | ## CLI Reference diff --git a/mkdocs.yml b/mkdocs.yml index c9c4925..b6fceab 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -44,6 +44,7 @@ repo_name: project-codeguard/rules nav: - Home: index.md - Getting Started: getting-started.md + - Custom Rules: custom-rules.md - FAQ: faq.md markdown_extensions: - admonition