Enable and some lints (dart-lang/pubspec_parse#57)
Ignored violations in generated code
diff --git a/pkgs/pubspec_parse/analysis_options.yaml b/pkgs/pubspec_parse/analysis_options.yaml
index 581ed8a..39be54a 100644
--- a/pkgs/pubspec_parse/analysis_options.yaml
+++ b/pkgs/pubspec_parse/analysis_options.yaml
@@ -50,8 +50,7 @@
- prefer_asserts_in_initializer_lists
- prefer_const_constructors
- prefer_const_declarations
- # Need to update json_serializable to generate an ignore for this lint
- #- prefer_expression_function_bodies
+ - prefer_expression_function_bodies
- prefer_final_locals
- prefer_function_declarations_over_variables
- prefer_initializing_formals
@@ -62,6 +61,7 @@
- prefer_relative_imports
- prefer_typing_uninitialized_variables
- prefer_void_to_null
+ - provide_deprecation_message
- sort_pub_dependencies
- test_types_in_equals
- throw_in_finally
@@ -74,4 +74,5 @@
- unnecessary_parenthesis
- unnecessary_statements
- unnecessary_string_interpolations
+ - use_string_buffers
- void_checks
diff --git a/pkgs/pubspec_parse/build.yaml b/pkgs/pubspec_parse/build.yaml
index 874c975..aa3ea69 100644
--- a/pkgs/pubspec_parse/build.yaml
+++ b/pkgs/pubspec_parse/build.yaml
@@ -12,3 +12,10 @@
checked: true
create_to_json: false
field_rename: snake
+
+ # The end-user of a builder which applies "source_gen|combining_builder"
+ # may configure the builder to ignore specific lints for their project
+ source_gen|combining_builder:
+ options:
+ ignore_for_file:
+ - prefer_expression_function_bodies
diff --git a/pkgs/pubspec_parse/lib/src/dependency.g.dart b/pkgs/pubspec_parse/lib/src/dependency.g.dart
index 4e137fa..37352b3 100644
--- a/pkgs/pubspec_parse/lib/src/dependency.g.dart
+++ b/pkgs/pubspec_parse/lib/src/dependency.g.dart
@@ -1,5 +1,7 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: prefer_expression_function_bodies
+
part of 'dependency.dart';
// **************************************************************************
diff --git a/pkgs/pubspec_parse/lib/src/pubspec.g.dart b/pkgs/pubspec_parse/lib/src/pubspec.g.dart
index eb062b8..c29a221 100644
--- a/pkgs/pubspec_parse/lib/src/pubspec.g.dart
+++ b/pkgs/pubspec_parse/lib/src/pubspec.g.dart
@@ -1,5 +1,7 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: prefer_expression_function_bodies
+
part of 'pubspec.dart';
// **************************************************************************
diff --git a/pkgs/pubspec_parse/pubspec.yaml b/pkgs/pubspec_parse/pubspec.yaml
index a148e7f..2940ce3 100644
--- a/pkgs/pubspec_parse/pubspec.yaml
+++ b/pkgs/pubspec_parse/pubspec.yaml
@@ -21,6 +21,8 @@
json_serializable: ^3.0.0
path: ^1.5.1
pedantic: ^1.4.0
+ # Needed because we are configuring `combining_builder`
+ source_gen: ^0.9.5
stack_trace: ^1.9.2
test: ^1.0.0
test_descriptor: ^1.0.3