Skip to content

Commit

Permalink
Add new lint rule: consider_making_a_member_private_rule.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
4akloon committed Apr 18, 2024
1 parent 7f08163 commit 5a97539
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import 'package:analyzer/error/listener.dart';
import 'package:custom_lint_builder/custom_lint_builder.dart';
import 'package:solid_lints/src/models/rule_config.dart';
import 'package:solid_lints/src/models/solid_lint_rule.dart';

class ConsiderMakingAMemberPrivateRule extends SolidLintRule {
static const lintName = 'consider_making_a_member_private';

ConsiderMakingAMemberPrivateRule._(super.config);

factory ConsiderMakingAMemberPrivateRule.createRule(
CustomLintConfigs configs) {
final rule = RuleConfig(
configs: configs,
name: lintName,
problemMessage: (_) => "Consider making a member private",
);

return ConsiderMakingAMemberPrivateRule._(rule);
}

@override
void run(
CustomLintResolver resolver,
ErrorReporter reporter,
CustomLintContext context,
) {
// TODO: Implement the rule
}
}

0 comments on commit 5a97539

Please sign in to comment.