fcheck 0.5.0
fcheck: ^0.5.0 copied to clipboard
A CLI tool for analyzing Flutter and Dart code quality, checking project metrics, comment ratios, class organization, hardcoded strings, and source sorting validation.
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.
0.5.0 - 2026-01-27 #
Breaking #
- ๐ฆ Library API rename:
package:fcheck/fcheck.dartnow exposesAnalyzeFolder(oldFCheckis deprecated alias). CLI flags/behavior are unchanged.
Changed #
- ๐ Docs updated to reflect the public API and current source layout.
- ๐งน Shared SVG helpers consolidated in
svg_common.dartfor both SVG generators (no CLI impact).
0.4.5 - 2026-01-27 #
Added #
- ๐ Version Display: Added
--version/-vflag to show fCheck CLI version - ๐ท๏ธ Project Metadata: Analysis reports now include the project name and version from pubspec.yaml
- ๐ฏ Enhanced CLI: Improved argument parsing with better positional vs named argument handling
0.4.4 - 2026-01-27 #
Changed #
- โ ๏ธ/โ Localization-Aware Hardcoded Strings: Hardcoded strings now surface as errors (โ with sample listings) only when a project uses localization (l10n/AppLocalizations/.arb). Non-localized projects show a caution count (โ ๏ธ) without listing individual strings.
- ๐ Docs: README documents the new localization-aware hardcoded string behavior.
0.4.3 - 2026-01-26 #
Added #
- Shared Diagram Helpers: Introduced
graph_format_utils.dartto centralize label normalization, edge counts, and empty-graph stubs used by all diagram generators.
Changed #
- Refactor: Mermaid and PlantUML generators now consume the shared helpers, reducing duplication and keeping node IDs/counters consistent.
- Docs Refresh: Update comments and README visualization options for Mermaid/PlantUML outputs.
0.4.2 - 2026-01-24 #
Fixed #
- ๐ Dependency Detection: Fixed generator import dependencies not showing in
bin/fcheck.dartby properly qualifying generator function calls with package prefixes. - ๐ SVG Visualization: Ensured all dependencies from
fcheck.dartto graph exporters (export_mermaid.dart,export_plantuml.dart,export_svg.dart) are properly displayed in the dependency graph.
Changed #
- ๐ฆ Import Structure: Updated generator imports in
bin/fcheck.dartto use proper package prefixes for better code organization and dependency tracking.
0.4.1 - 2026-01-23 #
Fixed #
-
๐ Subdirectory Analysis: Fixed package import resolution when running analysis on a subdirectory (e.g.,
lib/) by correctly identifying the project root. -
๐ SVG Layout: Optimized column-based layout to ensure consistent grouping and correct layer ordering (Layer 1 on the left).
-
๐จ SVG Z-Order: Refined drawing order (Layers -> Nodes -> Edges -> Badges -> Labels) so edges are drawn on top of nodes, but behind text.
-
โจ Visual Polish: Added outline dilate filter to node labels for superior readability against edges.
-
โจ Visual Polish: Added white shadow filter to nodes to improve legibility against background edges.
-
๐ Node Sorting: Updated intra-column sorting to prioritize Incident dependencies (Incoming descending, then Outgoing descending), and finally alphabetical.
Added #
- โจ JSON Output Mode: New
--jsonflag to output all analysis results in structured JSON format. - ๐๏ธ Robust Layering Analysis: Implemented Tarjan's SCC algorithm to correctly handle circular dependencies.
- ๐ Top-Down Layering Logic: Improved layering algorithm for consistent "cake" layout.
Changed #
- ๐ Documentation: Major improvements to
LAYOUT.mdandREADME.md. - โก Model Updates: Metrics and issues now support JSON serialization.
0.3.5 - 2026-01-21 #
Added #
- ๐ Comprehensive API documentation for all public constructors and methods
- ๐๏ธ Private constructor for
FileUtilsutility class to prevent instantiation - ๐ Enhanced documentation for
ClassVisitor.visitClassDeclarationmethod - ๐ง Added explicit constructor documentation for
HardcodedStringAnalyzer - ๐ Complete documentation for all
@overridemethods across the codebase
0.3.4 - 2026-01-21 #
Added #
- ๐ ๏ธ Global CLI executable support via
executablesconfiguration - ๐ฆ Users can now install fcheck globally:
dart pub global activate fcheck - ๐ฅ๏ธ Direct command execution:
fcheck ./path/(after global activation)
0.3.3 - 2026-01-20 #
Added #
- โจ Support for positional path arguments (e.g.,
dart run fcheck ./path/) - ๐
--input/-ioption replacing--path/-pfor better CLI design - ๐
--help/-hflag with comprehensive usage information - ๐ฏ 'Explicit option wins' logic when both named and positional arguments provided
Changed #
- ๐ CLI argument parsing to support both positional and named arguments
- ๐ Improved usage messages and help text
Fixed #
- ๐ Positional arguments now work correctly (original issue resolved)
0.3.2 - 2026-01-20 #
- โจ Added
--fix/-fflag for automatic sorting fixes - ๐ง Automatically fixes sorting issues by writing properly sorted code back to files
- Refactored sort_source.dart into separate files: source_sort_issue.dart, class_visitor.dart, member_sorter.dart, source_sort_analyzer.dart
- Added silent mode to ProjectMetrics.printReport() to suppress console output during testing
0.3.1 - 2026-01-20 #
- Improved pubspec.yaml description with detailed package information (168 characters)
- Added comprehensive documentation for all public APIs in sort_source.dart
0.3.0 - 2026-01-20 #
Added #
- โจ Source Code Sorting: New feature to check if Flutter class members are properly sorted
- ๐ Member Organization Validation: Ensures Flutter classes follow consistent member ordering
- ๐ง Automatic Member Sorting: Detects when class members need reordering for better code organization
Technical Details #
- Added
SourceSortAnalyzerclass for analyzing class member ordering - Added
MemberSorterclass for sorting class members according to Flutter best practices - Integrated sorting checks into the main analysis pipeline
- Supports proper ordering: constructors โ fields โ getters/setters โ methods โ lifecycle methods
0.2.0 - 2026-01-20 #
Changed #
- Upgraded analyzer package to ^10.0.1 for better compatibility
- Updated code to use new analyzer API methods (replaced deprecated name.lexeme with toString())
- Modified file analysis to exclude example/, test/, tool/, and build directories from production code metrics
- Migrated sort_source.dart to work with analyzer ^10.0.1 API changes
- Updated SourceSortAnalyzer to use consistent directory exclusion filtering
Fixed #
- Removed unused _classNode field from MemberSorter class
- Fixed compatibility issues with analyzer package version 10.x
- Resolved issue where example directory with intentional "bad code" was being analyzed
- Updated deprecated analyzer API usage in sort_source.dart with appropriate ignore comments
- Fixed dangling library doc comments in bin/fcheck.dart and project_metrics.dart
0.1.0 - 2026-01-20 #
Added #
- Initial release of fcheck - a Flutter/Dart code quality analysis tool
- Project structure analysis (folders, files, lines of code, comment ratios)
- One class per file rule enforcement
- Hardcoded string detection
- Command-line interface with path options
- Comprehensive test suite
- MIT license
- Repository information in pubspec.yaml
Features #
- Analyze Flutter and Dart projects for code quality metrics
- Detect violations of one class per file rule
- Identify potential hardcoded strings
- Generate detailed quality reports
- CLI support with customizable paths
Technical Details #
- Built with Dart SDK >=3.0.0 <4.0.0
- Uses analyzer package for AST parsing
- Supports both individual file and directory analysis
- Cross-platform command-line tool