| 1 | import "package:analysis_server_plugin/plugin.dart"; |
| 2 | import "package:analysis_server_plugin/registry.dart"; |
| 3 | import "package:cw_custom_lints/http_force_proxy/http_force_proxy_rule.dart"; |
| 4 | import "package:cw_custom_lints/modal_top_bar_semantics/modal_top_bar_semantics_rule.dart"; |
| 5 | import "package:cw_custom_lints/modern_button_semantics/modern_button_semantics_rule.dart"; |
| 6 | import "package:cw_custom_lints/money_amount_to_string/money_amount_to_string_fix.dart"; |
| 7 | import "package:cw_custom_lints/money_amount_to_string/money_amount_to_string_rule.dart"; |
| 8 | import "package:cw_custom_lints/print_verbose/print_verbose_fix.dart"; |
| 9 | import "package:cw_custom_lints/print_verbose/print_verbose_rule.dart"; |
| 10 | import "package:cw_custom_lints/restricted_imports/restricted_imports_rule.dart"; |
| 11 | |
| 12 | final plugin = CwCustomLintsPlugin(); |
| 13 | |
| 14 | class CwCustomLintsPlugin extends Plugin { |
| 15 | @override |
| 16 | String get name => "cw_custom_lints"; |
| 17 | |
| 18 | @override |
| 19 | void register(PluginRegistry registry) { |
| 20 | registry.registerWarningRule(PrintVerboseRule()); |
| 21 | registry.registerWarningRule(RestrictedImportsRule()); |
| 22 | registry.registerWarningRule(HttpForceProxyRule()); |
| 23 | registry.registerWarningRule(ModernButtonSemanticsRule()); |
| 24 | registry.registerWarningRule(ModalTopBarSemanticsRule()); |
| 25 | registry.registerWarningRule(MoneyAmountToStringRule()); |
| 26 | |
| 27 | registry.registerFixForRule(PrintVerboseRule.code, ReplaceWithPrintV.new); |
| 28 | registry.registerFixForRule(MoneyAmountToStringRule.code, ReplaceWithMoneyToString.new); |
| 29 | registry.registerFixForRule( |
| 30 | MoneyAmountToStringRule.code, |
| 31 | ReplaceWithMoneyToStringInBaseUnit.new, |
| 32 | ); |
| 33 | } |
| 34 | } |