clean_code_lints 0.3.2
clean_code_lints: ^0.3.2 copied to clipboard
Opinionated lint rules for clean architecture and clean code in Dart and Flutter projects.
0.3.2 #
- Documentation fixes, no code changes:
- Fix the install snippet in the README — it combined the scalar shorthand
(
clean_code_lints: ^0.1.0) with a nesteddiagnostics:block, which is invalid YAML. It now uses the nested form with aversion:key. - Correct the Compatibility section: the supported Dart floor is 3.10
(matching the
sdk: ">=3.10.0"constraint), not 3.9. - Update stale
v0.1.0version references.
- Fix the install snippet in the README — it combined the scalar shorthand
(
0.3.1 #
- Widen dependency constraints to
analyzer: >=11.0.0 <15.0.0andanalysis_server_plugin: >=0.3.11 <0.4.0.analysis_server_pluginpinsanalyzerto an exact version, and each pairing requires a specific Dart SDK, so the previous^14.1.0/^0.3.20pins made the plugin unresolvable on Dart < 3.11 (including Flutter 3.38 / Dart 3.10, the documented minimum) and conflicted with every other analysis-server plugin in a sharedplugins:context (peers sit on analyzer 12–13). With the wide ranges, pub selects the pairing that matches the consumer's SDK and co-resolves with other plugins. Analyzer 10.x is deliberately excluded: the plugin loads there but silently reports no diagnostics. - Add
src/ast_compat.dartand rewritehardcoded_spacing,single_letter_parameter, andhungarian_notationagainst AST APIs that are stable across the whole range, recognising the reshaped named-argument node structurally (the approach used by dart_code_linter). Rules no longer reference version-specific classes such asRegularFormalParameteror theargumentExpressiongetter. - Verified (analyze + full test suite) against analyzer 11.0.0, 12.1.0, 13.0.0, and 14.1.0.
0.3.0 #
- Upgrade
analyzerto^14.1.0. The^14.0.0constraint conflict noted in 0.2.0 has been resolved upstream, so the package now runs on analyzer 14.x. - Upgrade
analysis_server_pluginto^0.3.20. - Bump the
testdev dependency to^1.31.0.
0.2.0 #
- Upgrade
analyzerto^13.3.0(latest resolvable;^14.0.0blocked by an upstream constraint conflict betweenanalysis_server_plugin 0.3.19andanalyzer_pluginviadart_style). - Upgrade
analysis_server_pluginto^0.3.18. - Upgrade
lintsto^6.1.0.
0.1.0 #
- Initial release. 19 lint rules, grouped by family:
- Size & shape:
file_too_long,function_too_long,class_too_long,build_method_too_long,too_many_function_arguments. - Naming:
single_letter_parameter,hungarian_notation. - Layered architecture:
domain_layer_imports,presentation_imports_storage,feature_isolation. - Widget hygiene:
widget_level_try_catch,widget_build_method. - Hardcoded literals:
hardcoded_color,hardcoded_spacing,hardcoded_endpoint. - Clean code:
no_print_in_production,avoid_dynamic,missing_await,enum_exhaustive_switch.
- Size & shape: