Skip to content

feat: support excluded documentation paths - #4

Merged
smiggleworth merged 1 commit into
mainfrom
feat/configurable-doc-excludes
Jul 25, 2026
Merged

feat: support excluded documentation paths#4
smiggleworth merged 1 commit into
mainfrom
feat/configurable-doc-excludes

Conversation

@smiggleworth

Copy link
Copy Markdown
Contributor

Closes #3

Summary

  • add docs.exclude_paths to repository policy
  • skip generated or vendored trees while validating Markdown
  • cover exact-directory and child-path exclusion

Verification

  • cargo fmt --check
  • cargo test --locked
  • git diff --check

Copilot AI review requested due to automatic review settings July 25, 2026 16:55
@smiggleworth
smiggleworth merged commit b2a06b1 into main Jul 25, 2026
@smiggleworth
smiggleworth deleted the feat/configurable-doc-excludes branch July 25, 2026 16:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds repository-configured documentation exclusion paths so validate-docs can skip generated/vendored trees (e.g., ui/node_modules) while walking Markdown files, without changing default behavior when no exclusions are configured.

Changes:

  • Added docs.exclude_paths to repository policy configuration and applied it during the WalkDir traversal in validate_docs.
  • Implemented is_excluded() to match exact directories and child paths against configured exclusions.
  • Documented the new policy key in README.md and added unit coverage for exclusion behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/repository_checks.rs Adds docs.exclude_paths handling to validate_docs, implements exclusion matching, and introduces unit tests.
README.md Documents docs.exclude_paths in the repository policy example and explains intended usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/repository_checks.rs
Comment on lines +426 to +430
#[cfg(test)]
mod tests {
use super::is_excluded;
use std::path::Path;

Comment thread src/repository_checks.rs
Comment on lines +434 to +438
assert!(is_excluded(
root,
Path::new("/repo/ui/node_modules/pkg/readme.md"),
&["ui/node_modules".into()]
));
Comment thread README.md
Comment on lines +95 to +96
Use `docs.exclude_paths` for generated or vendored trees that are not
repository-owned Markdown.
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.

feat: allow repository checks to exclude generated and dependency paths

2 participants