Skip to content

Commit

Permalink
Merge pull request #81 from fkleon/pedantic-to-lints
Browse files Browse the repository at this point in the history
Switch from pedantic to the official Dart lint rules
  • Loading branch information
fkleon authored Jul 16, 2023
2 parents 7c9e52e + 7574998 commit 9166582
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion lib/src/expression.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down
2 changes: 1 addition & 1 deletion lib/src/functions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions test/expression_test_set.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: unused_local_variable

part of math_expressions_test;

/// Contains methods to test the math expression implementation.
Expand Down

0 comments on commit 9166582

Please sign in to comment.