Skip to content

Commit c84b345

Browse files
committed
Enable and fix some more lints
1 parent c2f830a commit c84b345

File tree

11 files changed

+33
-14
lines changed

11 files changed

+33
-14
lines changed

analysis_options.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@ analyzer:
99
linter:
1010
rules:
1111
- avoid_bool_literals_in_conditional_expressions
12+
- avoid_catching_errors
1213
- avoid_classes_with_only_static_members
1314
- avoid_function_literals_in_foreach_calls
15+
- avoid_private_typedef_functions
16+
- avoid_redundant_argument_values
1417
- avoid_renaming_method_parameters
1518
- avoid_returning_null_for_future
1619
- avoid_returning_null_for_void
1720
- avoid_returning_this
1821
- avoid_single_cascade_in_expression_statements
1922
- avoid_unused_constructor_parameters
23+
- avoid_void_async
2024
- await_only_futures
2125
- camel_case_types
2226
- cancel_subscriptions
@@ -33,18 +37,29 @@ linter:
3337
- join_return_with_assignment
3438
- list_remove_unrelated_type
3539
- literal_only_boolean_expressions
40+
- missing_whitespace_between_adjacent_strings
3641
- no_adjacent_strings_in_list
42+
- no_runtimeType_toString
3743
- only_throw_errors
3844
- overridden_fields
3945
- package_api_docs
4046
- package_names
4147
- package_prefixed_library_names
48+
- prefer_asserts_in_initializer_lists
4249
- prefer_const_constructors
50+
- prefer_expression_function_bodies
4351
- prefer_final_locals
52+
- prefer_function_declarations_over_variables
4453
- prefer_initializing_formals
54+
- prefer_inlined_adds
4555
- prefer_interpolation_to_compose_strings
56+
- prefer_is_not_operator
4657
- prefer_null_aware_operators
58+
- prefer_relative_imports
4759
- prefer_typing_uninitialized_variables
60+
- prefer_void_to_null
61+
- provide_deprecation_message
62+
- sort_pub_dependencies
4863
- test_types_in_equals
4964
- throw_in_finally
5065
- unnecessary_await_in_return
@@ -54,4 +69,6 @@ linter:
5469
- unnecessary_null_aware_assignments
5570
- unnecessary_parenthesis
5671
- unnecessary_statements
72+
- unnecessary_string_interpolations
73+
- use_string_buffers
5774
- void_checks

lib/src/vector_math/vector2.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class Vector2 implements Vector {
168168

169169
/// Normalize this. Returns length of vector before normalization.
170170
/// DEPRECATED: Use [normalize].
171-
@deprecated
171+
@Deprecated('Use normalize() insteaed.')
172172
double normalizeLength() => normalize();
173173

174174
/// Normalized copy of this.

lib/src/vector_math/vector3.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class Vector3 implements Vector {
180180

181181
/// Normalize this. Returns length of vector before normalization.
182182
/// DEPRCATED: Use [normalize].
183-
@deprecated
183+
@Deprecated('Use normalize() insteaed.')
184184
double normalizeLength() => normalize();
185185

186186
/// Normalizes copy of this.

lib/src/vector_math/vector4.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class Vector4 implements Vector {
204204

205205
/// Normalizes this. Returns length of vector before normalization.
206206
/// DEPRCATED: Use [normalize].
207-
@deprecated
207+
@Deprecated('Use normalize() insteaed.')
208208
double normalizeLength() => normalize();
209209

210210
/// Normalizes copy of this.

lib/src/vector_math_64/vector2.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class Vector2 implements Vector {
168168

169169
/// Normalize this. Returns length of vector before normalization.
170170
/// DEPRECATED: Use [normalize].
171-
@deprecated
171+
@Deprecated('Use normalize() insteaed.')
172172
double normalizeLength() => normalize();
173173

174174
/// Normalized copy of this.

lib/src/vector_math_64/vector3.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class Vector3 implements Vector {
180180

181181
/// Normalize this. Returns length of vector before normalization.
182182
/// DEPRCATED: Use [normalize].
183-
@deprecated
183+
@Deprecated('Use normalize() insteaed.')
184184
double normalizeLength() => normalize();
185185

186186
/// Normalizes copy of this.

lib/src/vector_math_64/vector4.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class Vector4 implements Vector {
204204

205205
/// Normalizes this. Returns length of vector before normalization.
206206
/// DEPRCATED: Use [normalize].
207-
@deprecated
207+
@Deprecated('Use normalize() insteaed.')
208208
double normalizeLength() => normalize();
209209

210210
/// Normalizes copy of this.

lib/src/vector_math_geometry/filters/color_filter.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ class ColorFilter extends GeometryFilter {
1717
MeshGeometry filter(MeshGeometry mesh) {
1818
MeshGeometry output;
1919
if (mesh.getAttrib('COLOR') == null) {
20-
final attributes = <VertexAttrib>[...mesh.attribs]
21-
..add(VertexAttrib('COLOR', 4, 'float'));
20+
final attributes = <VertexAttrib>[
21+
...mesh.attribs,
22+
VertexAttrib('COLOR', 4, 'float'),
23+
];
2224
output = MeshGeometry.resetAttribs(mesh, attributes);
2325
} else {
2426
output = MeshGeometry.copy(mesh);

lib/vector_math_geometry.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ library vector_math_geometry;
1010
import 'dart:math' as math;
1111
import 'dart:typed_data';
1212

13-
import 'package:vector_math/vector_math.dart';
14-
import 'package:vector_math/vector_math_lists.dart';
13+
import 'vector_math.dart';
14+
import 'vector_math_lists.dart';
1515

1616
part 'src/vector_math_geometry/mesh_geometry.dart';
1717

lib/vector_math_lists.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ library vector_math_lists;
77

88
import 'dart:math' as math;
99
import 'dart:typed_data';
10-
import 'package:vector_math/vector_math.dart';
10+
import 'vector_math.dart';
1111

1212
part 'src/vector_math_lists/scalar_list_view.dart';
1313
part 'src/vector_math_lists/vector_list.dart';

0 commit comments

Comments
 (0)