diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dfc336..5718e89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Switch from pedantic to the [official Dart lint rules](https://pub.dev/packages/lints) + ## [2.4.0] - 2023-04-05 ### Added diff --git a/analysis_options.yaml b/analysis_options.yaml index 8ee9089..599c85c 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,7 +1,7 @@ -# https://www.dartlang.org/guides/language/analysis-options -# Use Google internal analysis options from -# https://pub.dartlang.org/packages/pedantic -include: package:pedantic/analysis_options.yaml +# https://dart.dev/tools/analysis#the-analysis-options-file +# Use official Dart lint rules from +# https://pub.dev/documentation/lints/latest/#recommended-lints +include: package:lints/recommended.yaml analyzer: language: @@ -15,6 +15,5 @@ linter: rules: control_flow_in_finally: true empty_statements: true - throw_in_finally: true unnecessary_this: false - omit_local_variable_types: false + constant_identifier_names: false diff --git a/lib/src/expression.dart b/lib/src/expression.dart index f97508c..6616a65 100644 --- a/lib/src/expression.dart +++ b/lib/src/expression.dart @@ -872,7 +872,7 @@ class Variable extends Literal { Expression derive(String toVar) => name == toVar ? Number(1.0) : Number(0.0); @override - String toString() => '$name'; + String toString() => name; @override dynamic evaluate(EvaluationType type, ContextModel context) => diff --git a/lib/src/functions.dart b/lib/src/functions.dart index e5c0cfd..10469dd 100644 --- a/lib/src/functions.dart +++ b/lib/src/functions.dart @@ -93,7 +93,7 @@ class CompositeFunction extends MathFunction { MathFunction gDF; final Expression gD = g.derive(toVar); - if (!(gD is MathFunction)) { + if ((gD is! MathFunction)) { // Build function again.. gDF = CustomFunction('d${g.name}', g.args, gD); } else { diff --git a/pubspec.yaml b/pubspec.yaml index 855b9e9..6cf069a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,7 @@ dependencies: vector_math: ^2.1.0 dev_dependencies: - pedantic: ^1.11.0 + lints: ^2.1.1 test: ^1.16.7 environment: diff --git a/test/expression_test_set.dart b/test/expression_test_set.dart index 1ae03f3..eea6462 100644 --- a/test/expression_test_set.dart +++ b/test/expression_test_set.dart @@ -1,3 +1,5 @@ +// ignore_for_file: unused_local_variable + part of math_expressions_test; /// Contains methods to test the math expression implementation.