fcheck 0.5.0 copy "fcheck: ^0.5.0" to clipboard
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.dart now exposes AnalyzeFolder (old FCheck is 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.dart for both SVG generators (no CLI impact).

0.4.5 - 2026-01-27 #

Added #

  • ๐Ÿ“‹ Version Display: Added --version / -v flag 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.dart to 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.dart by properly qualifying generator function calls with package prefixes.
  • ๐Ÿ”— SVG Visualization: Ensured all dependencies from fcheck.dart to 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.dart to 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 --json flag 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.md and README.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 FileUtils utility class to prevent instantiation
  • ๐Ÿ“– Enhanced documentation for ClassVisitor.visitClassDeclaration method
  • ๐Ÿ”ง Added explicit constructor documentation for HardcodedStringAnalyzer
  • ๐Ÿ“‹ Complete documentation for all @override methods across the codebase

0.3.4 - 2026-01-21 #

Added #

  • ๐Ÿ› ๏ธ Global CLI executable support via executables configuration
  • ๐Ÿ“ฆ 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/-i option replacing --path/-p for better CLI design
  • ๐Ÿ“š --help/-h flag 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 / -f flag 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 SourceSortAnalyzer class for analyzing class member ordering
  • Added MemberSorter class 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
2
likes
0
points
351
downloads

Publisher

unverified uploader

Weekly Downloads

A CLI tool for analyzing Flutter and Dart code quality, checking project metrics, comment ratios, class organization, hardcoded strings, and source sorting validation.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer, args, glob, path, yaml

More

Packages that depend on fcheck