comment_lint 0.1.0
comment_lint: ^0.1.0 copied to clipboard
A custom lint tool for enforcing comment style in Dart files.
example/README.md
Comment Lint Examples #
This directory contains example files demonstrating proper and improper comment formatting.
Files #
lib/good_comments.dart
- Examples of properly formatted commentslib/bad_comments.dart
- Examples that will be flagged by the linter
Testing the Linter #
Check comment style: #
# From the example directory
dart run comment_lint --check lib
# Or from the parent directory
dart run comment_lint --check example/lib
Fix comment style: #
# Preview changes
dart run comment_lint --dry-run lib
# Apply fixes
dart run comment_lint lib
Expected Output #
Running the linter on bad_comments.dart
should find several violations:
- Uppercase header with period
- Missing periods on comments
- Missing blank lines after comments
- Incorrect periods after colons
Running the linter on good_comments.dart
should find no violations.