logd_linters 0.1.3
logd_linters: ^0.1.3 copied to clipboard
Custom lint rules for the logd logging library. Surfaces arena lifecycle constraints, formatter/decorator purity invariants, and consumer usage best-practices as static analysis warnings with IDE quick-fixes.
Changelog #
0.1.3: Handler Missing Dispose Rule & Quick-Fix #
This release introduces static analysis rule C6 (logd_handler_missing_dispose) with an automated IDE quick-fix to detect un-disposed AsyncHandler instances.
-
New Lint Rule (Group C) #
- Handler Missing Dispose (
logd_handler_missing_dispose): Fires when anAsyncHandleris instantiated in a scope without a corresponding call todispose(), preventing abandoned worker isolates and open IPC control ports. - Automated Quick-Fix: Added IDE quick-fix to automatically insert
await handler.dispose();before the instance goes out of scope.
- Handler Missing Dispose (
0.1.2: Automation of Code-Style & Arena Lifecycle Rules (Quick-Fixes) #
This release focuses on improving the developer experience by introducing automated IDE quick-fixes for core validation warnings.
-
Automated Quick-Fixes (DartFix) #
- Metadata Set Deduplication: Added a fix for
logd_metadata_set_duplicatethat automatically removes duplicate entries frommetadataset literals. - LogEngine Lifecycle Safety: Added a fix for
logd_missing_release_in_enginethat automatically wrapsexecutemethod bodies intry-finallyand invokesreleaseRecursivein thefinallyblock to protect the object pool. - Purity Enforcers (Immutability): Added fixes for
logd_decorator_not_immutableandlogd_formatter_not_immutableto automatically prepend the@immutableannotation (inserting the requiredpackage:meta/meta.dartimport if missing) and convert mutable fields tofinal.
- Metadata Set Deduplication: Added a fix for
0.1.1: Licensing Cleanup #
This patch release completes the package packaging requirements.
-
Package Quality #
- License File: Populated the package
LICENSEfile.
- License File: Populated the package
0.1.0: Initial Custom Lint Release #
Initial release of logd_linters, establishing the AST-based validation suite for logd.
-
Rules Library (12 Rules, 4 Quick-Fixes) #
- Arena Lifecycle (Group A): Introduced rules preventing pool-leak and use-after-free bugs (
logd_document_retained_across_cycles,logd_missing_release_in_engine,logd_checkout_without_release). - Formatter/Decorator Purity (Group B): Enforces physical-vs-semantic rendering boundaries (
logd_formatter_performs_string_rendering,logd_decorator_not_immutable,logd_formatter_not_immutable). - Consumer Usage (Group C): Prevents engine misconfiguration, duplicate metadata arguments, and print sinks in production (
logd_avoid_print_sink_in_production,logd_logtag_use_bitmask,logd_log_buffer_not_sunk,logd_handler_missing_engine,logd_metadata_set_duplicate). - Logger Config (Group D): Guards the logger inheritance system against unconfigured freeze attempts (
logd_freeze_on_unconfigured_logger).
- Arena Lifecycle (Group A): Introduced rules preventing pool-leak and use-after-free bugs (