Skip to content

docs: scope markdownlint around active repository docs - #42

Merged
seonghobae merged 1 commit into
chore/security-manual-hardeningfrom
chore/markdownlint-scope-policy
Apr 10, 2026
Merged

docs: scope markdownlint around active repository docs#42
seonghobae merged 1 commit into
chore/security-manual-hardeningfrom
chore/markdownlint-scope-policy

Conversation

@seonghobae

@seonghobae seonghobae commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a repo-local .markdownlint-cli2.jsonc policy 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 #41
  • document the maintained markdownlint scope in CONTRIBUTING.md and wrap docs/workflow/git-flow.md so active workflow docs stay inside the linted set
  • add regression tests for the markdownlint policy configuration and contributor-facing scope description

Verification

  • uv run pytest tests/test_markdownlint_policy.py -q
  • npx -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=100
  • uv run mkdocs build --strict

Git Flow target

Summary by CodeRabbit

릴리스 노트

  • 설명서

    • Git Flow 워크플로우 문서를 더 읽기 쉽도록 포맷팅 및 문장 구조 조정
  • 작업

    • 마크다운 린팅 정책을 정의하고 관련 구성 파일 추가
    • 마크다운 린팅 정책 준수 여부를 자동으로 검증하는 테스트 추가

@coderabbitai

coderabbitai Bot commented Apr 10, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

마크다운린트 정책을 정의하고 시행하기 위한 설정 파일, 문서, 테스트를 추가합니다. 레거시 계획 파일을 린팅 대상에서 제외하는 설정을 도입하고, 유지 관리자를 위한 정책 지침을 문서화하며, 정책 준수 여부를 검증하는 테스트를 구현합니다.

Changes

코호트 / 파일(s) 요약
마크다운린트 설정
.markdownlint-cli2.jsonc
6개의 레거시 계획 마크다운 파일을 린팅 제외 목록에 추가하는 설정 파일 신규 추가.
문서 및 정책
CONTRIBUTING.md, docs/workflow/git-flow.md
마크다운린트 정책 실행 지침 추가 및 깃 플로우 문서의 줄 바꿈 개선.
테스트 검증
tests/test_markdownlint_policy.py
린트 정책 준수 여부 확인 및 설정 파일 유효성을 검증하는 테스트 신규 추가.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 마크다운의 정책을 정하고,
레거시 계획은 조용히 빼주고,
테스트로 확인하니 든든하네!
문서는 깔끔하고, 설정은 명확하니,
정책 있는 프로젝트가 최고야! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed 제목은 저장소의 활성 문서 주변에서 markdownlint를 범위 지정하는 주요 변경 사항을 명확하고 간결하게 요약합니다.
Description check ✅ Passed 설명은 대부분 완전하지만 필수 섹션 일부가 부분적으로만 채워져 있습니다. Git Flow 대상이 명시되어 있지만 표준 형식과 다릅니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/markdownlint-scope-policy

Comment @coderabbitai help to get the list of available commands and usage tips.

@seonghobae

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 10, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot 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.

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between 737696b and 7fa1b7f.

📒 Files selected for processing (4)
  • .markdownlint-cli2.jsonc
  • CONTRIBUTING.md
  • docs/workflow/git-flow.md
  • tests/test_markdownlint_policy.py

@seonghobae
seonghobae merged commit 1af74b0 into chore/security-manual-hardening Apr 10, 2026
10 checks passed
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.

1 participant