Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add low_readability_numeric_literals lint rule and quick fix #210

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

ronnnnn
Copy link
Member

@ronnnnn ronnnnn commented Dec 31, 2024

Add LowReadabilityNumericLiterals lint rule to check for numeric literals with 5 or more digits without digit separators.

  • Lint Rule Implementation

    • Add LowReadabilityNumericLiterals class in packages/nilts/lib/src/lints/low_readability_numeric_literals.dart.
    • Implement run method to check for 5+ digit integers without separators.
    • Implement getFixes method to provide a quick fix.
    • Define _AddDigitSeparators class to add digit separators to 5+ digit integers.
  • Integration

    • Add LowReadabilityNumericLiterals to the list of lint rules in packages/nilts/lib/nilts.dart.
  • Testing

    • Add test cases for LowReadabilityNumericLiterals lint rule in packages/nilts_test/test/lints/low_readability_numeric_literals.dart.
  • Documentation

    • Update packages/nilts/README.md to include low_readability_numeric_literals in the list of lint rules.
    • Provide an overview and details for low_readability_numeric_literals.

For more details, open the Copilot Workspace session.

@ronnnnn ronnnnn added the feat New feature or request label Dec 31, 2024
@ronnnnn ronnnnn force-pushed the add-low-readability-numeric-literals branch from d39a922 to b2c5c8f Compare December 31, 2024 14:29
@ronnnnn ronnnnn merged commit 764ec8a into main Dec 31, 2024
5 checks passed
@ronnnnn ronnnnn deleted the add-low-readability-numeric-literals branch December 31, 2024 14:34
@github-actions github-actions bot mentioned this pull request Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant