Skip to content

fix(bloc_lint): don't split digits in prefer_file_naming_conventions - #4910

Open
uveshm003 wants to merge 1 commit into
felangel:masterfrom
uveshm003:fix/bloc-lint-file-naming-digits
Open

uveshm003 wants to merge 1 commit into
felangel:masterfrom
uveshm003:fix/bloc-lint-file-naming-digits

Conversation

@uveshm003

Copy link
Copy Markdown

Status

READY

Breaking Changes

NO

Description

toSnakeCase treats any character where toUpperCase() == character as uppercase, which includes digits. So Oauth2Cubit is expected in oauth_2_cubit.dart, and prefer_file_naming_conventions flags oauth2_cubit.dart, the name the VS Code extension generates for it.

Fix: only insert _ before characters that actually have a lowercase form. Added a test for Oauth2Cubit in oauth2_cubit.dart. It fails before the change and passes after. dart test in packages/bloc_lint passes.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@uveshm003
uveshm003 requested a review from felangel as a code owner November 8, 2026 12:25

This branch has not been deployed

No deployments
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