33This file provides guidance to AI coding assistants when working with code in
44this repository.
55
6- ## pydoclint Project Conventions
6+ ## 1. pydoclint Project Conventions
77
8- ### Code Style
8+ ### 1.1. Code Style
99
1010- Use camelCase for function and variable names (not snake_case)
1111
12- ### Branch Naming
12+ ### 1.2. Branch Naming
1313
1414- Format: ` yyyy-mm-dd-What-this-branch-does `
1515
16- ### Commit Messages & PR Titles
16+ ### 1.3. Commit Messages & PR Titles
1717
1818- Use action verbs (imperative mood), not past tense
1919- Good: "Add feature", "Fix bug"
2020- Bad: "Added feature", "Fixed bug"
2121
22- ## Development Commands
22+ ## 2. Development Commands
2323
24- ### Testing
24+ ### 2.1. Testing
2525
2626- ` pytest --tb=long . ` - Run all tests with detailed traceback
2727- ` tox ` - Run full test suite across multiple Python versions
2828- ` tox -e py311 ` - Run tests on specific Python version (py39, py310, py311,
2929 py312, py313)
3030
31- ### Code Quality
31+ ### 2.2. Code Quality
3232
3333- ` mypy pydoclint/ ` - Type checking
3434- ` muff format --diff --config=muff.toml pydoclint tests ` - Format checking
@@ -37,7 +37,7 @@ this repository.
3737- ` pydoclint --config=pyproject.toml . ` - Self-check using pydoclint
3838- ` pre-commit run -a ` - Run all pre-commit hooks
3939
40- ### Specialized Tox Commands
40+ ### 2.3. Specialized Tox Commands
4141
4242- ` tox -e mypy ` - Type checking only
4343- ` tox -e muff ` - Format checking only
@@ -47,7 +47,7 @@ this repository.
4747- ` tox -e flake8-docstrings ` - Docstring style checks
4848- ` tox -e pre-commit ` - Pre-commit hooks (skips muff formatter)
4949
50- ### Running a Single Test
50+ ### 2.4. Running a Single Test
5151
5252Use pytest with specific test file or test function:
5353
@@ -56,12 +56,12 @@ pytest tests/test_main.py
5656pytest tests/test_main.py::test_function_name
5757```
5858
59- ## Architecture Overview
59+ ## 3. Architecture Overview
6060
6161Pydoclint is a Python docstring linter that checks docstring sections against
6262function signatures. The core architecture consists of:
6363
64- ### Main Components
64+ ### 3.1. Main Components
6565
6666- ** main.py** : CLI entry point using Click, handles command-line options and
6767 orchestrates linting
@@ -72,7 +72,7 @@ function signatures. The core architecture consists of:
7272 sources
7373- ** baseline.py** : Baseline functionality for gradual adoption
7474
75- ### Utils Package Structure
75+ ### 3.2. Utils Package Structure
7676
7777- ** arg.py/argList.py** : Function argument representation and handling
7878- ** doc.py** : Docstring parsing and representation
@@ -86,21 +86,21 @@ function signatures. The core architecture consists of:
8686 function bodies
8787- ** visitor_helper.py** : Helper functions for the main visitor
8888
89- ### Supported Docstring Styles
89+ ### 3.3. Supported Docstring Styles
9090
9191- ** Numpy** : numpydoc format
9292- ** Google** : Google-style docstrings
9393- ** Sphinx** : Sphinx/reStructuredText format
9494
95- ### Key Features
95+ ### 3.4. Key Features
9696
9797- Fast AST-based analysis (thousands of times faster than darglint)
9898- Supports type hint checking against docstring parameter types
9999- Class attribute documentation checking
100100- Baseline mode for gradual adoption in existing codebases
101101- Both standalone CLI and flake8 plugin modes
102102
103- ### Test Structure
103+ ### 3.5. Test Structure
104104
105105- ` tests/data/ ` contains test cases organized by docstring style (google,
106106 numpy, sphinx, edge_cases)
0 commit comments