fcheck 0.8.1 copy "fcheck: ^0.8.1" to clipboard
fcheck: ^0.8.1 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.8.1 - 2026-02-02 #

Added #

  • ⏱️ Execution Timing: Added elapsed time display in the footer showing how long the analysis took to run
  • 📊 Performance Visibility: Footer now shows "fCheck completed (X.XXs)" to help users track analysis performance
  • 🎯 JSON Compatibility: Timing display is automatically suppressed in JSON output mode to maintain clean format

0.8.0 - 2026-02-02 #

Major Performance Optimization #

  • 🚀 Unified Analysis Architecture: Implemented single-pass file traversal with delegate pattern, eliminating redundant file operations and AST parsing
  • 📈 67-77% Performance Improvement: Analysis now runs 67-77% faster by performing one file discovery and one AST parse per file shared across all analyzers
  • 🔄 Delegate Pattern: All analyzers (HardcodedString, MagicNumber, SourceSort, Layers, Secrets) now work from shared parsed file context
  • 🎯 Zero Breaking Changes: All existing functionality preserved with dramatic performance improvements

🏗️ Architecture Refactoring #

  • 📁 Reorganized Analyzer Structure: Moved all analyzers to src/analyzers/ directory for better organization
  • 🔧 AnalyzerRunner: New unified analysis engine replaces individual analyzer traversals
  • 📋 AnalysisFileContext: Shared file context eliminates redundant I/O operations
  • 🎨 Cleaner Codebase: Removed old individual analyzer strategy, fully migrated to unified approach

🔍 Secret Detection #

  • 🛡️ Advanced Secret Analyzer: Comprehensive secret detection rules
  • 🔑 Multiple Secret Types: AWS keys, GitHub PATs, Stripe keys, Bearer tokens, Private keys, Email PII, High entropy strings
  • 📊 Entropy-Based Detection: Advanced entropy calculation for unknown secret patterns
  • 🎯 Improved Accuracy: Better false positive reduction with configurable thresholds

🧹 Code Quality Improvements #

  • One Class Per File: Fixed violations in analyzer files by proper separation
  • 📝 Documentation: Added comprehensive documentation for all new unified analysis components

Changed #

  • Default Analysis Method: analyze() now uses unified high-performance approach automatically
  • 🗂️ File Organization: Restructured analyzer directories for better maintainability
  • 📊 Result Processing: Optimized result aggregation with type-safe handling

0.7.3 - 2026-02-01 #

Added #

  • 🔍 Enhanced pubspec.yaml Detection: Implemented parent directory traversal to find pubspec.yaml when analyzing from subdirectories, ensuring project name and version are always available regardless of analysis starting point
  • 📊 Improved SVG Folder Display: Enhanced folder-based SVG visualization to show project name, version, and input folder information instead of generic "." root folder
  • 🎨 Smart Folder Title Formatting: Implemented intelligent title display - shows only "Project vVersion" when folder name matches project name, or multi-line format "Folder\nProject vVersion" when they differ

Changed #

  • 📁 Folder Name Extraction: Improved folder name detection logic using proper path handling to ensure accurate folder names in SVG outputs
  • 🎯 SVG Text Rendering: Enhanced SVG text rendering with proper multi-line support using <tspan> elements for better visual hierarchy

0.7.2 - 2026-01-31 #

Changed #

  • 🛡️ Default Localization Filtering: Automatically hide generated localization files (app_localizations_*.dart) from analysis and dependency graphs by default while keeping the main entry point to avoid cyclic dependency noise.
  • 🧹 Code Cleanup: Removed magic number violations across the codebase by introducing named constants for better maintainability.

0.7.1 - 2026-01-31 #

Added #

  • 🎨 SVG Style Improvements: Enhanced CSS styles for SVG exports
  • 🏷️ Badge Tooltips: Improved tooltip text for better clarity
  • 📁 Folder Layout: Refined virtual sub-folder logic for folder dependency graphs
  • 📝 Code Documentation: Updated internal comments for better maintainability

0.7.0 - 2026-01-30 #

Breaking change #

  • Unified Ignore Directive System: Replaced inconsistent ignore patterns with a standardized // ignore: fcheck_<domain> format across all analysis domains

Added #

  • 🎯 Generic Ignore Pattern: New standardized format // ignore: fcheck_<domain> for all ignore directives
  • 🔧 One Class Per File Ignore: Support for // ignore: fcheck_one_class_per_file to skip one-class-per-file rule for individual files
  • 🧮 Magic Number Ignore: Enhanced support for // ignore: fcheck_magic_numbers with consistent pattern matching
  • 📝 Hardcoded String Ignore: Improved // ignore: fcheck_hardcoded_strings directive handling
  • 🏗️ Layers Ignore: Added // ignore: fcheck_layers for layer architecture violations
  • 📚 Comprehensive Documentation: Updated all ignore directive examples and documentation

0.6.2 - 2026-01-29 #

Added #

  • 🧮 Magic Number Ignore: Support for // fcheck - ignore magic numbers comment directive to skip magic number analysis for individual files.

0.6.1 - 2026-01-29 #

Added #

  • 🏷️ Tooltip Consistency: Standardized all edge tooltips to use "Source ▶ Target" format across all graph export formats

Changed #

  • Performance: Reduced code duplication and improved maintainability of edge rendering logic

0.6.0 - 2026-01-29 #

Added #

  • 🔺 Triangular Directional Badges: New BadgeModel class with triangular badges that indicate dependency direction (incoming blue pointing west, outgoing green pointing east)
  • 📐 Enhanced Badge Design: Triangular badges with rounded corners, improved text positioning, and better visual alignment with dependency edges
  • 📚 Comprehensive Documentation: Added detailed DartDoc comments to BadgeModel class and all its methods
  • 🔄 Edge Alignment Fix: Updated SVG edge rendering to properly connect to triangular badge centers instead of old circular badge positions

Changed #

  • 🎯 Badge System Refactor: Complete refactor from circular badges to directional triangular badges with improved visual design
  • Performance Improvements: Optimized badge rendering and edge calculations for better SVG generation

0.5.2 - 2026-01-29 #

Added #

  • 🧮 Magic Number Detection: New feature to detect numeric literals that should be expressed as named constants to make intent clearer

Changed #

  • 🔧 Replaced the build_runner-based version builder with a simple bash script that generates lib/src/models/version.dart from pubspec.yaml.

Added #

  • you can optionally add // fcheck: ignore-one-class-per-file to a file to ignore the one-class-per-file rule

0.5.1 - 2026-01-28 #

Changed #

  • 🔧 Replaced the build_runner-based version builder with a simple bash script that generates lib/src/models/version.dart from pubspec.yaml.

Added #

  • you can optionally add // fcheck: ignore-one-class-per-file to a file to ignore the one-class-per-file rule

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
6
likes
0
points
2k
downloads

Publisher

verified publishervteam.com

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

Topics

#analysis #architecture #code-style #lint #validation

License

unknown (license)

Dependencies

analyzer, args, glob, path, yaml

More

Packages that depend on fcheck