team_guard 1.0.19
team_guard: ^1.0.19 copied to clipboard
Custom lint plugin to block forbidden Flutter widgets across team projects.
1.0.19 #
- Refactor and streamline README documentation structure on pub.dev, prioritizing setup and installation upfront, followed by detailed feature workflows and CLI guides.
1.0.18 #
- Fast Inspection CLI (
dart run team_guard:check): Instantly audit the entire codebase and print a formatted ASCII table of forbidden elements, lines, approved replacements, and severity levels. - Bulk Automated Migration CLI (
dart run team_guard:migrate): Automatically replace forbidden widgets with approved replacements across all files with automatic import addition and--dry-runpreview support. - Setup Diagnostics CLI (
dart run team_guard:doctor): Health check tool that validatesteam_guard.yamlsyntax,analysis_options.yamlplugins, dependencies, and verifies that replacement classes exist. - Batch Quick Fix in IDE ("Fix all in file"): One-click quick fix option in IDE to fix all forbidden widgets in the current file simultaneously.
- Custom Policy Reasons: Support
reasonproperty inteam_guard.yamlto explain why a widget, class, or function is restricted directly in IDE problem messages. - Function Restrictions (
print->debugPrint): Support restricting top-level functions such asprintwithwarningseverity and automated Quick Fix todebugPrint. - Fix Bug A (False-positive
textdetection): Prevent false-positive detections on lowercase variables, parameters, fields, methods, comments, and strings namedtextby enforcing AST element resolution and case-sensitive identifier checks. - Fix Bug B (PDF package compatibility): Full compatibility with PDF-generation packages (e.g.
package:pdf/widgets.dart) by verifying that guarded UI widgets resolve to genuine Flutter framework widgets (package:flutter). - Enhanced Quick Fix: Reliably replace restricted widgets and add approved replacement imports in a single action, prevent duplicate imports when the import already exists, and preserve all widget arguments and children.
- Prefix & Aliased Access: Accurately detect prefixed accesses such as
fl.Colors.redand replace aliased widgets cleanly. - Safe Generated File Handling: Automatically skip analysis on generated files (
.g.dart,.freezed.dart,.mocks.dart,.gen.dart, and.dart_tool). - Guard Configuration Validation: Gracefully handle missing or malformed
team_guard.yamlfiles and report clear, actionable diagnostics for invalid entries or severity settings. - Unified CLI Router (
dart run team_guard <command>): Runcheck,migrate,doctor,init, andsetupthrough standard subcommands. - Comprehensive Test Suite: 34 automated regression, unit, and integration tests ensuring 100% test pass rate.
1.0.17 #
- Simplify README setup instructions to use
dart run team_guard:setupas the primary command instead of documenting separate init/lint commands.
1.0.16 #
- Update
team_guard:initscaffolding to skip generating replacement files when a file with the same name already exists anywhere underlib/. - Avoid creating
lib/coreunless at least one new replacement file actually needs to be generated. - Refresh README to document the new duplicate-skip behavior and latest install version.
1.0.15 #
- Change generated Flutter color-class templates to use
static const Color ... = Color(...)fields directly. - Update README examples to match the generated
AppColorsshape and latest install version.
1.0.14 #
- Update default generated
team_guard.yamltemplate to include:widgets:Text,ElevatedButtonclasses:Colors,Dio,GetIt,Cubit
- Improve generated color helper template to keep internal tokens flexible (
intorColor) while exposingColorgetters for direct Flutter widget usage. - Refresh README to document the updated color pattern and latest install version.
1.0.13 #
- Publish follow-up release with the latest lint/fix and scaffolding updates from
1.0.12.
1.0.12 #
- Enforce class restrictions in type references (
NamedType) such as:extends Cubit<MyState>implements Cubit<MyState>- type annotations and generic arguments using restricted classes
- Keep constructor checks/fixes and avoid duplicate diagnostics for
InstanceCreationExpression. - Add tolerant class-name matching in config (
GetIt,get_it,getitare treated equivalently). - Update README with examples for restricting classes like
Dio,GetIt, andCubit. - Add a minimal policy example (
Text,ElevatedButton,Colors,Dio) and clarify mixedint/Colorusage in color templates.
1.0.11 #
- Enforce class restrictions in constructor usage as well as prefixed access.
- Apply the same symbol lookup in quick-fix for both
widgetsandclasses. - Improve
team_guard:initscaffolding in Flutter projects:- generate richer starter templates for text-like replacement widgets
- generate color palette starter templates for color-like helper classes
- Update README with regeneration behavior (existing files are not overwritten) and starter template examples.
1.0.10 #
- Add
dart run team_guard:setupcommand to runteam_guard:initthencustom_lintin one step. - Update README setup flow to prefer single-command setup while keeping manual steps documented.
1.0.9 #
- Add
custom_lintto runtime dependencies sodart run custom_lintis available after installingteam_guard. - Improve quick-fix import behavior:
- accept
importvalues in both package-path form and full Dart import statement form - auto-detect replacement imports from
lib/when a replacement class is found in exactly one file
- accept
- Enhance
dart run team_guard:init:- scaffold missing replacement files in
lib/corefromteam_guard.yaml - keep init idempotent by skipping files that already exist
- scaffold missing replacement files in
- Refresh README for setup, auto-import, and init scaffolding flow.
1.0.8 #
- Lower minimum Dart SDK constraint to
>=3.0.0 <4.0.0. - Update README:
- document that
team_guard.yamlis generated automatically bydart run team_guard:init - remove
infofrom supported severity values (warning,erroronly) - refresh install snippet to
team_guard: ^1.0.8
- document that
1.0.7 #
- Add uninstall command to README:
flutter pub remove team_guard custom_lint
1.0.6 #
- Update docs and examples to use
severity: errorby default. - Update generated default
team_guard.yamltemplate to useseverity: error.
1.0.5 #
- Improve pub score compliance:
- Add Dartdoc for public API entrypoints.
- Shorten package description in
pubspec.yaml. - Replace deprecated analyzer API usage in lint/fix implementation.
- Broaden analyzer compatibility constraint to
>=8.4.0 <12.0.0.
1.0.4 #
- Add
dart run team_guard:initcommand to generateteam_guard.yamldirectly. - Auto-configure
analysis_options.yamlto includeanalyzer.plugins: [custom_lint]when missing. - Refresh README setup flow and add an updated full example in
example/team_guard_example.dart.
1.0.3 #
- Clarify
importfield format in docs/config template: use package path only (not a Dartimport '...';statement).
1.0.2 #
- Rewrite README with complete setup steps, correct team_guard.yaml configuration, and troubleshooting for IDE visibility/generation.
1.0.1 #
- Update README with explicit custom lint run command (dart run custom_lint).
1.0.0 #
- Initial version.