Skip to content

Commit 4fc1a05

Browse files
author
solid-glebvorobey
authored
Fixed docs linter issues (#179)
* Fixed analyzer issue, fixed linter * Fixed LintCode issue * Fixed LintCode issue * Fixed pubspec * Try to update analyzer version * Try to override analyzer dependency * Add import as instead of hide * Fixed tests fpr custom linter to work correctly * Fixed issue with LintCode in docs * Fix description for rules
1 parent fcc0621 commit 4fc1a05

File tree

29 files changed

+40
-40
lines changed

29 files changed

+40
-40
lines changed

lib/src/lints/avoid_debug_print_in_release/avoid_debug_print_in_release_rule.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import 'package:solid_lints/src/models/solid_lint_rule.dart';
3232
///
3333
///
3434
class AvoidDebugPrintInReleaseRule extends SolidLintRule {
35-
/// The [LintCode] of this lint rule that represents
35+
/// This lint rule represents
3636
/// the error when debugPrint is called
3737
static const lintName = 'avoid_debug_print_in_release';
3838

lib/src/lints/avoid_final_with_getter/avoid_final_with_getter_rule.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'package:analyzer/error/error.dart';
1+
import 'package:analyzer/error/error.dart' as error;
22
import 'package:analyzer/error/listener.dart';
33
import 'package:analyzer/source/source_range.dart';
44
import 'package:custom_lint_builder/custom_lint_builder.dart';
@@ -35,7 +35,7 @@ part 'fixes/avoid_final_with_getter_fix.dart';
3535
/// ```
3636
///
3737
class AvoidFinalWithGetterRule extends SolidLintRule {
38-
/// The [LintCode] of this lint rule that represents
38+
/// This lint rule represents
3939
/// the error whether we use final private fields with getters.
4040
static const lintName = 'avoid_final_with_getter';
4141

lib/src/lints/avoid_final_with_getter/fixes/avoid_final_with_getter_fix.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ class _FinalWithGetterFix extends DartFix {
66
CustomLintResolver resolver,
77
ChangeReporter reporter,
88
CustomLintContext context,
9-
AnalysisError analysisError,
10-
List<AnalysisError> others,
9+
error.AnalysisError analysisError,
10+
List<error.AnalysisError> others,
1111
) {
1212
context.registry.addMethodDeclaration((node) {
1313
if (analysisError.sourceRange.intersects(node.sourceRange)) {

lib/src/lints/avoid_global_state/avoid_global_state_rule.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import 'package:solid_lints/src/models/solid_lint_rule.dart';
3636
/// }
3737
/// ```
3838
class AvoidGlobalStateRule extends SolidLintRule {
39-
/// The [LintCode] of this lint rule that represents
39+
/// This lint rule represents
4040
/// the error whether we use global state.
4141
static const lintName = 'avoid_global_state';
4242

lib/src/lints/avoid_late_keyword/avoid_late_keyword_rule.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import 'package:solid_lints/src/utils/types_utils.dart';
4848
/// }
4949
/// ```
5050
class AvoidLateKeywordRule extends SolidLintRule<AvoidLateKeywordParameters> {
51-
/// The [LintCode] of this lint rule that represents
51+
/// This lint rule represents
5252
/// the error whether we use `late` keyword.
5353
static const lintName = 'avoid_late_keyword';
5454

lib/src/lints/avoid_non_null_assertion/avoid_non_null_assertion_rule.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import 'package:solid_lints/src/models/solid_lint_rule.dart';
3838
/// map['key']!;
3939
/// ```
4040
class AvoidNonNullAssertionRule extends SolidLintRule {
41-
/// The [LintCode] of this lint rule that represents
41+
/// This lint rule represents
4242
/// the error whether we use bang operator.
4343
static const lintName = 'avoid_non_null_assertion';
4444

lib/src/lints/avoid_returning_widgets/avoid_returning_widgets_rule.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import 'package:solid_lints/src/utils/types_utils.dart';
5252
/// ```
5353
class AvoidReturningWidgetsRule
5454
extends SolidLintRule<AvoidReturningWidgetsParameters> {
55-
/// The [LintCode] of this lint rule that represents
55+
/// This lint rule represents
5656
/// the error whether we return a widget.
5757
static const lintName = 'avoid_returning_widgets';
5858

lib/src/lints/avoid_unnecessary_type_assertions/avoid_unnecessary_type_assertions_rule.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const whereTypeMethodName = 'whereType';
4141
/// final castedD = nullableD is double;
4242
/// ```
4343
class AvoidUnnecessaryTypeAssertions extends SolidLintRule {
44-
/// The [LintCode] of this lint rule that represents
44+
/// This lint rule represents
4545
/// the error whether we use bad formatted double literals.
4646
static const lintName = 'avoid_unnecessary_type_assertions';
4747

lib/src/lints/avoid_unnecessary_type_casts/avoid_unnecessary_type_casts_rule.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'package:analyzer/dart/ast/ast.dart';
2-
import 'package:analyzer/error/error.dart';
3-
import 'package:analyzer/error/listener.dart';
2+
import 'package:analyzer/error/error.dart' as error;
3+
import 'package:analyzer/error/listener.dart' as error_listener;
44
import 'package:analyzer/source/source_range.dart';
55
import 'package:custom_lint_builder/custom_lint_builder.dart';
66
import 'package:solid_lints/src/lints/avoid_unnecessary_type_casts/visitors/avoid_unnecessary_type_casts_visitor.dart';
@@ -12,7 +12,7 @@ part 'fixes/avoid_unnecessary_type_casts_fix.dart';
1212
/// An `avoid_unnecessary_type_casts` rule which
1313
/// warns about unnecessary usage of `as` operator
1414
class AvoidUnnecessaryTypeCastsRule extends SolidLintRule {
15-
/// The [LintCode] of this lint rule that represents
15+
/// This lint rule represents
1616
/// the error whether we use bad formatted double literals.
1717
static const lintName = 'avoid_unnecessary_type_casts';
1818

@@ -33,7 +33,7 @@ class AvoidUnnecessaryTypeCastsRule extends SolidLintRule {
3333
@override
3434
void run(
3535
CustomLintResolver resolver,
36-
ErrorReporter reporter,
36+
error_listener.ErrorReporter reporter,
3737
CustomLintContext context,
3838
) {
3939
context.registry.addAsExpression((node) {

lib/src/lints/avoid_unnecessary_type_casts/fixes/avoid_unnecessary_type_casts_fix.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ class _UnnecessaryTypeCastsFix extends DartFix {
88
CustomLintResolver resolver,
99
ChangeReporter reporter,
1010
CustomLintContext context,
11-
AnalysisError analysisError,
12-
List<AnalysisError> others,
11+
error.AnalysisError analysisError,
12+
List<error.AnalysisError> others,
1313
) {
1414
context.registry.addAsExpression((node) {
1515
if (analysisError.sourceRange.intersects(node.sourceRange)) {

0 commit comments

Comments
 (0)