docs: scope markdownlint around active repository docs - #42
Conversation
📝 WalkthroughWalkthrough마크다운린트 정책을 정의하고 시행하기 위한 설정 파일, 문서, 테스트를 추가합니다. 레거시 계획 파일을 린팅 대상에서 제외하는 설정을 도입하고, 유지 관리자를 위한 정책 지침을 문서화하며, 정책 준수 여부를 검증하는 테스트를 구현합니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/test_markdownlint_policy.py (1)
17-27: 레거시 예외 검증을 “정확 문자열” 기준으로 강화해 주세요.현재는 부분 문자열 검사라 정책 문구 일부가 빠져도 테스트가 통과할 수 있습니다. 6개 레거시 항목을 모두 정확히 확인하는 쪽이 회귀 방지에 더 안전합니다.
제안 수정안
def test_contributing_documents_markdownlint_scope() -> None: text = Path("CONTRIBUTING.md").read_text(encoding="utf-8").lower() + legacy_notes = ( + "git-flow-design", + "git-flow", + "newsdom-design", + "newsdom-implementation", + "quality-gate-design", + "quality-gate", + ) for expected in ( "markdownlint", "legacy", "agents.md", "architecture.md", "contributing.md", "docs/**/*.md", - "git-flow-design", - "newsdom-implementation", - "quality-gate", ): assert expected in text + for note in legacy_notes: + assert f"`{note}`" in text🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/test_markdownlint_policy.py` around lines 17 - 27, The test currently iterates over the tuple named expected and likely checks each value via substring membership which allows partial matches; update the assertion in tests/test_markdownlint_policy.py to verify exact string matches for all six legacy entries by comparing sets (or using equality checks) between the expected tuple (or set(expected)) and the actual policy list (or the subset of legacy entries) so that each of the six strings ("legacy", "agents.md", "architecture.md", "contributing.md", "docs/**/*.md", "git-flow-design", "newsdom-implementation", "quality-gate", "markdownlint" if included) is matched exactly rather than via partial/substring matching (reference the variable expected and the test function that iterates over it).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@tests/test_markdownlint_policy.py`:
- Around line 17-27: The test currently iterates over the tuple named expected
and likely checks each value via substring membership which allows partial
matches; update the assertion in tests/test_markdownlint_policy.py to verify
exact string matches for all six legacy entries by comparing sets (or using
equality checks) between the expected tuple (or set(expected)) and the actual
policy list (or the subset of legacy entries) so that each of the six strings
("legacy", "agents.md", "architecture.md", "contributing.md", "docs/**/*.md",
"git-flow-design", "newsdom-implementation", "quality-gate", "markdownlint" if
included) is matched exactly rather than via partial/substring matching
(reference the variable expected and the test function that iterates over it).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b7a13671-0656-460e-8d5d-8a53f19b93b5
📒 Files selected for processing (4)
.markdownlint-cli2.jsoncCONTRIBUTING.mddocs/workflow/git-flow.mdtests/test_markdownlint_policy.py
Summary
.markdownlint-cli2.jsoncpolicy that keeps active maintainer/published docs linted while excluding only the six legacy planning files tracked in Track legacy markdownlint debt in historical planning docs #41CONTRIBUTING.mdand wrapdocs/workflow/git-flow.mdso active workflow docs stay inside the linted setVerification
uv run pytest tests/test_markdownlint_policy.py -qnpx -y markdownlint-cli2@0.18.1 "AGENTS.md" "ARCHITECTURE.md" "CONTRIBUTING.md" "docs/**/*.md"uv run pytest --cov=src/newsdom_api --cov-branch --cov-report=term-missing --cov-fail-under=100uv run mkdocs build --strictGit Flow target
chore/security-manual-hardeningwhile PR ci: expand CodeQL coverage and tighten repo guardrails #35 remains review-blocked by issue Resolve reviewer-capacity mismatch with protected-branch approval policy #36Summary by CodeRabbit
릴리스 노트
설명서
작업