enable and fix a number of additional lints
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 5db81fc..a568bec 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -3,19 +3,21 @@
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
- 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
- #- cascade_invocations
- comment_references
- constant_identifier_names
- control_flow_in_finally
@@ -29,19 +31,30 @@
- 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
#- non_constant_identifier_names
- 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
@@ -49,6 +62,9 @@
- unnecessary_getters_setters
- unnecessary_lambdas
- unnecessary_null_aware_assignments
+ - unnecessary_overrides
- 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 4375ffd..502fe9c 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 instead.')
double normalizeLength() => normalize();
/// Normalized copy of this.
diff --git a/lib/src/vector_math/vector3.dart b/lib/src/vector_math/vector3.dart
index 376e727..7f2531f 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 instead.')
double normalizeLength() => normalize();
/// Normalizes copy of this.
diff --git a/lib/src/vector_math/vector4.dart b/lib/src/vector_math/vector4.dart
index 384220c..9133eaf 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 instead.')
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 9f12d71..778dac1 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 instead.')
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 6ab723d..674e0a3 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 instead.')
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 eb2b643..38fb933 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 instead.')
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 7823566..ded0a57 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 bce808a..2e57021 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('lib/src/vector_math_64/');
final libraryFile = File('lib/vector_math_64.dart');
@@ -37,7 +37,7 @@
}
}
-Future<Null> _processFile(String inputFileName) async {
+Future<void> _processFile(String inputFileName) async {
final inputFile = File(inputFileName);
final input = await inputFile.readAsString();