code_craft_lints 1.1.1
code_craft_lints: ^1.1.1 copied to clipboard
A powerful Dart analyzer plugin enforcing clean architecture, indentation limits, and strict class modifiers with automated quick fixes.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.1.1 - 2026-08-20 #
Documentation #
- Updated
analysis_options.yamlconfiguration inREADME.mdand examples to document granulardiagnosticsrule management usingcode_craft_lints: ^1.1.1. - Added documentation for project-wide rule toggling via
analysis_options.yaml.
1.1.0 - 2026-08-19 #
Added #
- Added
max_two_level_of_indentationrule to enforce a maximum of 2 levels of indentation per function body.
Changed #
- Replaced
one_level_of_indentationrule withmax_two_level_of_indentation. - Refactored
_indentationLevelcalculation to compute AST nesting levels using non-recursive switch-expression pattern matching (FunctionDeclaration = 0, FunctionBody = 1, Blocks under FunctionBody = 2, Nested control flow = 3+). - Updated example project, analysis configuration, test suite, and documentation for the new indentation rule.
Removed #
- Removed deprecated
one_level_of_indentationrule.
1.0.1 - 2026-08-19 #
Fixed #
- Fixed analyzer plugin path resolution in example project.
- Added comprehensive example project and documentation.
1.0.0 - 2026-08-19 #
Added #
- Initial release of
code_craft_lintsanalysis server plugin. - Lint Rules:
prefer_ternary: Enforces ternary operators for simple single-statement returns and assignments instead of verboseif/elseblocks.pure_contract_class: Enforces theabstract interface classdeclaration for pure contract classes without implementations or instance fields.final_implementation_class: Enforcesfinal classorbase classmodifiers on concrete implementation classes to prevent unintentional inheritance.one_level_of_indentation: Enforces Object Calisthenics indentation rule (maximum 1 level of control-flow indentation per function).one_statement_per_block: Enforces that control blocks contain at most one statement to promote concise function decomposition.
- Automated Fixes (
dart fix --apply):Convert to ternary operatorforprefer_ternary.Add 'interface' modifierforpure_contract_class.Add 'final' modifierforfinal_implementation_class.Add 'base' modifierforfinal_implementation_class.