You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace yardstick and yard-junk with yard-lint for docs
Removed yardstick and yard-junk dependencies, configuration, and tasks in favor of using yard-lint for documentation linting and coverage enforcement. Updated documentation, Rakefile, CI workflow, and Gemfile accordingly. This simplifies documentation quality checks and unifies the workflow around yard-lint.
Copy file name to clipboardExpand all lines: .claude/docs/yard.md
+10-72Lines changed: 10 additions & 72 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,32 +29,7 @@ Every piece of public and private code must be documented. Documentation serves
29
29
30
30
## YARD Configuration
31
31
32
-
Create a `.yardstick.yml` file in your project root with 100% coverage requirements:
33
-
34
-
```yaml
35
-
threshold: 100
36
-
rules:
37
-
ApiTag::Presence:
38
-
enabled: true
39
-
ApiTag::Inclusion:
40
-
enabled: true
41
-
ApiTag::ProtectedMethod:
42
-
enabled: true
43
-
ApiTag::PrivateMethod:
44
-
enabled: true
45
-
ExampleTag:
46
-
enabled: true
47
-
ReturnTag:
48
-
enabled: true
49
-
Summary::Presence:
50
-
enabled: true
51
-
Summary::Length:
52
-
enabled: false
53
-
Summary::Delimiter:
54
-
enabled: true
55
-
Summary::SingleLine:
56
-
enabled: false
57
-
```
32
+
The configuration file is located at `.yard-lint.yml` in the root of the project.
58
33
59
34
## Basic Documentation Structure
60
35
@@ -460,64 +435,26 @@ end
460
435
461
436
## Quality Enforcement
462
437
463
-
Our project enforces 100% documentation coverage using the `yardstick` gem and maintains documentation quality with the `yard:junk` task. This ensures that all code is thoroughly documented, maintainable, and easy for developers to use.
438
+
This project uses `yard-lint` to enforce documentation standards and coverage.
464
439
465
440
### How it Works
466
441
467
-
1.**Configuration**: A `.yardstick.yml` file in the project root sets the documentation coverage threshold to 100% and defines specific documentation rules.
468
-
469
-
2.**Measurement**: The `yardstick_measure` Rake task measures the current documentation coverage against the configured rules. Run it using:
442
+
1.**Configuration**: A `.yard-lint.yml` file in the project root defines the rules, severity, and coverage requirements.
443
+
2.**Linting**: Run `yard-lint` to check for documentation issues.
470
444
471
445
```bash
472
-
bundle execrake yardstick_measure
446
+
bundle execyard-lint lib/
473
447
```
474
448
475
-
This task generates a detailed report in`measurements/report.txt` that lists all documentation issues that need to be addressed.
449
+
This command will output any documentation issues found.
476
450
477
-
3. **Verification**: The `verify_measurements`Rake task checks if the coverage meets the 100% threshold. Run it using:
451
+
3. **Rake Integration**: A Rake task is provided for convenience.
478
452
479
453
```bash
480
-
bundle exec rake verify_measurements
454
+
bundle exec rake yard:lint
481
455
```
482
456
483
-
This task will fail if coverage is below 100%, displaying the current coverage percentage and indicating that documentation improvements are needed.
484
-
485
-
4. **Review Report**: Always check the contents of `measurements/report.txt` after running measurement tasks. This file contains specific details about:
486
-
- Missing method documentation
487
-
- Incomplete parameter descriptions
488
-
- Missing return value documentation
489
-
- Missing examples
490
-
- Incorrect API tags
491
-
492
-
Each line in the report shows the file, line number, method, and specific issue that needs to be addressed to achieve 100% documentation compliance.
493
-
494
-
### Rake Integration
495
-
496
-
The `Rakefile` integrates `yardstick` into our development workflow. The `qa` task, which runs a full suite of tests and checks, includes the documentation verification step.
Continuous Integration (CI) automatically enforces our documentation standard on every commit by running:
515
-
516
-
```bash
517
-
bundle exec rake verify_measurements
518
-
```
519
-
520
-
This prevents any code with incomplete documentation from being merged.
457
+
4. **CI Integration**: The CI pipeline runs `yard-lint` on every commit to ensure that all code is well-documented.
521
458
522
459
## Best Practices
523
460
@@ -600,3 +537,4 @@ For complex examples, use proper formatting:
600
537
```
601
538
602
539
This documentation standard ensures that your Ruby projects maintain professional-quality documentation that supports both development and maintenance activities while providing excellent IDE integration and user experience.
0 commit comments