Enable and fix some more lints
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 9c0b683..bf1d5fc 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -9,14 +9,18 @@
linter:
rules:
- avoid_bool_literals_in_conditional_expressions
+ - avoid_catching_errors
- avoid_classes_with_only_static_members
- avoid_function_literals_in_foreach_calls
+ - avoid_private_typedef_functions
+ - avoid_redundant_argument_values
- avoid_renaming_method_parameters
- avoid_returning_null_for_future
- avoid_returning_null_for_void
- avoid_returning_this
- avoid_single_cascade_in_expression_statements
- avoid_unused_constructor_parameters
+ - avoid_void_async
- await_only_futures
- camel_case_types
- cancel_subscriptions
@@ -33,18 +37,29 @@
- join_return_with_assignment
- list_remove_unrelated_type
- literal_only_boolean_expressions
+ - missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
+ - no_runtimeType_toString
- only_throw_errors
- overridden_fields
- package_api_docs
- package_names
- package_prefixed_library_names
+ - prefer_asserts_in_initializer_lists
- prefer_const_constructors
+ - prefer_expression_function_bodies
- prefer_final_locals
+ - prefer_function_declarations_over_variables
- prefer_initializing_formals
+ - prefer_inlined_adds
- prefer_interpolation_to_compose_strings
+ - prefer_is_not_operator
- prefer_null_aware_operators
+ - prefer_relative_imports
- prefer_typing_uninitialized_variables
+ - prefer_void_to_null
+ - provide_deprecation_message
+ - sort_pub_dependencies
- test_types_in_equals
- throw_in_finally
- unnecessary_await_in_return
@@ -54,4 +69,6 @@
- unnecessary_null_aware_assignments
- unnecessary_parenthesis
- unnecessary_statements
+ - unnecessary_string_interpolations
+ - use_string_buffers
- void_checks
diff --git a/lib/src/vector_math/vector2.dart b/lib/src/vector_math/vector2.dart
index 3eda468..a74d55c 100644
--- a/lib/src/vector_math/vector2.dart
+++ b/lib/src/vector_math/vector2.dart
@@ -168,7 +168,7 @@
/// Normalize this. Returns length of vector before normalization.
/// DEPRECATED: Use [normalize].
- @deprecated
+ @Deprecated('Use normalize() insteaed.')
double normalizeLength() => normalize();
/// Normalized copy of this.
diff --git a/lib/src/vector_math/vector3.dart b/lib/src/vector_math/vector3.dart
index 2f8811e..d9abe44 100644
--- a/lib/src/vector_math/vector3.dart
+++ b/lib/src/vector_math/vector3.dart
@@ -180,7 +180,7 @@
/// Normalize this. Returns length of vector before normalization.
/// DEPRCATED: Use [normalize].
- @deprecated
+ @Deprecated('Use normalize() insteaed.')
double normalizeLength() => normalize();
/// Normalizes copy of this.
diff --git a/lib/src/vector_math/vector4.dart b/lib/src/vector_math/vector4.dart
index 3075296..15a6cfc 100644
--- a/lib/src/vector_math/vector4.dart
+++ b/lib/src/vector_math/vector4.dart
@@ -204,7 +204,7 @@
/// Normalizes this. Returns length of vector before normalization.
/// DEPRCATED: Use [normalize].
- @deprecated
+ @Deprecated('Use normalize() insteaed.')
double normalizeLength() => normalize();
/// Normalizes copy of this.
diff --git a/lib/src/vector_math_64/vector2.dart b/lib/src/vector_math_64/vector2.dart
index 06aeb30..a3a4229 100644
--- a/lib/src/vector_math_64/vector2.dart
+++ b/lib/src/vector_math_64/vector2.dart
@@ -168,7 +168,7 @@
/// Normalize this. Returns length of vector before normalization.
/// DEPRECATED: Use [normalize].
- @deprecated
+ @Deprecated('Use normalize() insteaed.')
double normalizeLength() => normalize();
/// Normalized copy of this.
diff --git a/lib/src/vector_math_64/vector3.dart b/lib/src/vector_math_64/vector3.dart
index b341a51..e2e0ff5 100644
--- a/lib/src/vector_math_64/vector3.dart
+++ b/lib/src/vector_math_64/vector3.dart
@@ -180,7 +180,7 @@
/// Normalize this. Returns length of vector before normalization.
/// DEPRCATED: Use [normalize].
- @deprecated
+ @Deprecated('Use normalize() insteaed.')
double normalizeLength() => normalize();
/// Normalizes copy of this.
diff --git a/lib/src/vector_math_64/vector4.dart b/lib/src/vector_math_64/vector4.dart
index 9514983..50976a9 100644
--- a/lib/src/vector_math_64/vector4.dart
+++ b/lib/src/vector_math_64/vector4.dart
@@ -204,7 +204,7 @@
/// Normalizes this. Returns length of vector before normalization.
/// DEPRCATED: Use [normalize].
- @deprecated
+ @Deprecated('Use normalize() insteaed.')
double normalizeLength() => normalize();
/// Normalizes copy of this.
diff --git a/lib/src/vector_math_geometry/filters/color_filter.dart b/lib/src/vector_math_geometry/filters/color_filter.dart
index 823c18b..c25f586 100644
--- a/lib/src/vector_math_geometry/filters/color_filter.dart
+++ b/lib/src/vector_math_geometry/filters/color_filter.dart
@@ -17,8 +17,10 @@
MeshGeometry filter(MeshGeometry mesh) {
MeshGeometry output;
if (mesh.getAttrib('COLOR') == null) {
- final attributes = <VertexAttrib>[...mesh.attribs]
- ..add(VertexAttrib('COLOR', 4, 'float'));
+ final attributes = <VertexAttrib>[
+ ...mesh.attribs,
+ VertexAttrib('COLOR', 4, 'float'),
+ ];
output = MeshGeometry.resetAttribs(mesh, attributes);
} else {
output = MeshGeometry.copy(mesh);
diff --git a/lib/vector_math_geometry.dart b/lib/vector_math_geometry.dart
index 6dc17e7..b2f20b2 100644
--- a/lib/vector_math_geometry.dart
+++ b/lib/vector_math_geometry.dart
@@ -10,8 +10,8 @@
import 'dart:math' as math;
import 'dart:typed_data';
-import 'package:vector_math/vector_math.dart';
-import 'package:vector_math/vector_math_lists.dart';
+import 'vector_math.dart';
+import 'vector_math_lists.dart';
part 'src/vector_math_geometry/mesh_geometry.dart';
diff --git a/lib/vector_math_lists.dart b/lib/vector_math_lists.dart
index 0c19993..fdb0968 100644
--- a/lib/vector_math_lists.dart
+++ b/lib/vector_math_lists.dart
@@ -7,7 +7,7 @@
import 'dart:math' as math;
import 'dart:typed_data';
-import 'package:vector_math/vector_math.dart';
+import 'vector_math.dart';
part 'src/vector_math_lists/scalar_list_view.dart';
part 'src/vector_math_lists/vector_list.dart';
diff --git a/tool/generate_vector_math_64.dart b/tool/generate_vector_math_64.dart
index c060f94..03eee72 100644
--- a/tool/generate_vector_math_64.dart
+++ b/tool/generate_vector_math_64.dart
@@ -8,13 +8,13 @@
import 'package:path/path.dart' as p;
-Future<Null> main() async {
+Future<void> main() async {
await generateVectorMath64();
print('Generated vector_math_64');
}
-Future<Null> generateVectorMath64() async {
+Future<void> generateVectorMath64() async {
final Directory directory = Directory('lib/src/vector_math_64/');
final File libraryFile = File('lib/vector_math_64.dart');
@@ -37,7 +37,7 @@
}
}
-Future<Null> _processFile(String inputFileName) async {
+Future<void> _processFile(String inputFileName) async {
final File inputFile = File(inputFileName);
final String input = await inputFile.readAsString();