Skip to content

feat(config): add extend-exclude configuration key - #131

Merged
Alberto-Codes merged 7 commits into
mainfrom
feat/config-16-1-extend-exclude
Feb 25, 2026
Merged

feat(config): add extend-exclude configuration key#131
Alberto-Codes merged 7 commits into
mainfrom
feat/config-16-1-extend-exclude

Conversation

@Alberto-Codes

Copy link
Copy Markdown
Owner

Developers can now add project-specific exclude patterns on top of docvet's defaults without repeating them, using the same extend-exclude convention as ruff, black, and flake8. Previously, setting exclude replaced the defaults entirely, forcing users to re-list ["tests", "scripts"] alongside their custom patterns.

  • Add extend-exclude to valid top-level keys with type validation (list of strings)
  • Implement merge formula in load_config: final = (user_exclude or defaults) + extend_exclude
  • Add 9 unit tests covering all 7 ACs plus multi-value and empty-list edge cases
  • Zero changes to discovery.py or any check module — merge is purely a config concern

Test: uv run pytest tests/unit/test_config.py -k extend_exclude -v

Closes #18

test(config): add extend-exclude unit tests for all 7 ACs


PR Review

Checklist

  • Self-reviewed my code
  • Tests pass (uv run pytest)
  • Lint passes (uv run ruff check .)
  • Types pass (uv run ty check)
  • Breaking changes use ! in title and BREAKING CHANGE: in body

Review Focus

Merge logic in load_config (lines 577-583) — the new base_exclude variable replaces the old inline ternary. Validation block in _parse_docvet_section (lines 432-437) mirrors the existing exclude pattern.

Related

  • Story: _bmad-output/implementation-artifacts/16-1-config-parsing-and-merge-logic.md
  • Epic: _bmad-output/planning-artifacts/epics-extend-exclude.md

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Alberto-Codes
Alberto-Codes marked this pull request as ready for review February 25, 2026 18:26
Copilot AI review requested due to automatic review settings February 25, 2026 18:26

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 support for an additive extend-exclude configuration key in pyproject.toml so projects can append their own exclude patterns without re-listing docvet’s defaults.

Changes:

  • Accept extend-exclude as a valid [tool.docvet] key with type validation (list[str]).
  • Merge extend-exclude into the final exclude list during load_config.
  • Add unit tests covering extend-exclude behavior (defaults-only, exclude-only, composed, validation errors, and edge cases).

Reviewed changes

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

Show a summary per file
File Description
src/docvet/config.py Adds extend-exclude key validation and merges it into exclude during config load.
tests/unit/test_config.py Adds unit tests for the new extend-exclude behavior and validation cases.
_bmad-output/planning-artifacts/epics-extend-exclude.md Adds planning artifact for the extend-exclude epic and stories.
_bmad-output/implementation-artifacts/sprint-status.yaml Updates generated date and tracks Epic 16 story status.
_bmad-output/implementation-artifacts/16-1-config-parsing-and-merge-logic.md Adds implementation notes and AC/test mapping for Story 16.1.

Comment thread _bmad-output/planning-artifacts/epics-extend-exclude.md
Comment thread _bmad-output/planning-artifacts/epics-extend-exclude.md Outdated
@Alberto-Codes
Alberto-Codes merged commit 15aa4ff into main Feb 25, 2026
8 checks passed
@Alberto-Codes
Alberto-Codes deleted the feat/config-16-1-extend-exclude branch February 25, 2026 18:38
Alberto-Codes added a commit that referenced this pull request Feb 25, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.3.0](v1.2.1...v1.3.0)
(2026-02-25)


### Features

* **config:** add extend-exclude configuration key
([#131](#131))
([15aa4ff](15aa4ff)),
closes [#18](#18)


### Documentation

* **config:** add extend-exclude to configuration reference
([6711525](6711525))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

Feature: Add extend-exclude config key

3 participants