Skip to content

Commit e1acb39

Browse files
Exclude generated files (#8)
* Exclude generated files * Reformat * Update changelog, set version to 0.0.8
1 parent 0845809 commit e1acb39

File tree

3 files changed

+48
-24
lines changed

3 files changed

+48
-24
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.0.8
2+
3+
- Exclude generated files
4+
15
## 0.0.7
26

37
- Add more useful DCM rules.

lib/analysis_options.yaml

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
11
analyzer:
2+
exclude:
3+
# General generated files
4+
- '**/*.g.dart'
5+
- '**/*.gr.dart'
6+
7+
# Flutter
8+
- 'lib/generated_plugin_registrant.dart'
9+
10+
# mockito
11+
- '**/*.mocks.dart'
12+
13+
# freezed
14+
- '**/*.freezed.dart'
15+
16+
# protobuf
17+
- '**/*.pb.dart'
18+
19+
# test_coverage
20+
- test/.test_coverage.dart
21+
222
# Dart Code Metrics plugin (https://dartcodemetrics.dev/) provides many additional rules
323
# that helped to automate some pieces of our internal team code style based on the best
424
# industry practices.
@@ -20,10 +40,10 @@ dart_code_metrics:
2040
metrics:
2141
# NIST 500-235 item 2.5
2242
cyclomatic-complexity: 10
23-
43+
2444
# McConnell, S. (2004), Chapter 7.5: High-Quality Routines: How To Use Routine Parameters. Code Complete, Second Edition, Redmond, WA, USA: Microsoft Press. 174-180
2545
number-of-parameters: 7
26-
46+
2747
# McConnell, S. (2004), Chapter 7.4: High-Quality Routines: How Long Can a Routine Be?. Code Complete, Second Edition, Redmond, WA, USA: Microsoft Press. 173-174
2848
source-lines-of-code: 200
2949

@@ -72,8 +92,8 @@ linter:
7292
- avoid_empty_else
7393
- avoid_escaping_inner_quotes
7494
- avoid_field_initializers_in_const_classes
75-
# available in later releases
76-
# - avoid_final_parameters
95+
# available in later releases
96+
# - avoid_final_parameters
7797
- avoid_function_literals_in_foreach_calls
7898
- avoid_implementing_value_types
7999
- avoid_init_to_null
@@ -101,8 +121,8 @@ linter:
101121
- cancel_subscriptions
102122
- close_sinks
103123
- comment_references
104-
# available in later releases
105-
# - conditional_uri_does_not_exist
124+
# available in later releases
125+
# - conditional_uri_does_not_exist
106126
- constant_identifier_names
107127
- control_flow_in_finally
108128
- curly_braces_in_flow_control_structures
@@ -130,9 +150,9 @@ linter:
130150
- literal_only_boolean_expressions
131151
- no_adjacent_strings_in_list
132152
- no_duplicate_case_values
133-
# available in later releases
134-
# - no_leading_underscores_for_library_prefixes
135-
# - no_leading_underscores_for_local_identifiers
153+
# available in later releases
154+
# - no_leading_underscores_for_library_prefixes
155+
# - no_leading_underscores_for_local_identifiers
136156
- no_logic_in_create_state
137157
- no_runtimeType_toString
138158
- non_constant_identifier_names
@@ -151,11 +171,11 @@ linter:
151171
- prefer_constructors_over_static_methods
152172
- prefer_contains
153173
- prefer_equal_for_default_values
154-
# Not used, as the default app template has a single statement return code generated.
155-
# While this could be beneficial for Dart projects and maintaining code style, we are unaware
156-
# of any substantial evidence that improves code when using expression function body
157-
# vs single statement return. We are considering including this in Dart only lints.
158-
# - prefer_expression_function_bodies
174+
# Not used, as the default app template has a single statement return code generated.
175+
# While this could be beneficial for Dart projects and maintaining code style, we are unaware
176+
# of any substantial evidence that improves code when using expression function body
177+
# vs single statement return. We are considering including this in Dart only lints.
178+
# - prefer_expression_function_bodies
159179
- prefer_final_fields
160180
- prefer_final_in_for_each
161181
- prefer_final_locals
@@ -180,16 +200,16 @@ linter:
180200
- public_member_api_docs
181201
- recursive_getters
182202
- require_trailing_commas
183-
# available in later releases
184-
# - secure_pubspec_urls
203+
# available in later releases
204+
# - secure_pubspec_urls
185205
- sized_box_for_whitespace
186-
# available in later releases
187-
# - sized_box_shrink_expand
206+
# available in later releases
207+
# - sized_box_shrink_expand
188208
- slash_for_doc_comments
189209
- sort_child_properties_last
190-
# We tend to use class organization close to standard Java convention, where fields come first.
191-
# Martin, R. C. & Coplien, J. O. (2013), Chapter 10: Classes. Clean code: a handbook of agile software craftsmanship , Prentice Hall , Upper Saddle River, NJ [etc.] . 136
192-
# - sort_constructors_first
210+
# We tend to use class organization close to standard Java convention, where fields come first.
211+
# Martin, R. C. & Coplien, J. O. (2013), Chapter 10: Classes. Clean code: a handbook of agile software craftsmanship , Prentice Hall , Upper Saddle River, NJ [etc.] . 136
212+
# - sort_constructors_first
193213
- sort_pub_dependencies
194214
- sort_unnamed_constructors_first
195215
- test_types_in_equals
@@ -217,8 +237,8 @@ linter:
217237
- unrelated_type_equality_checks
218238
- unsafe_html
219239
- use_build_context_synchronously
220-
# available in later releases
221-
# - use_decorated_box
240+
# available in later releases
241+
# - use_decorated_box
222242
- use_full_hex_values_for_flutter_colors
223243
- use_function_type_syntax_for_parameters
224244
- use_if_null_to_convert_nulls_to_bools

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: solid_lints
22
description: Lints for Dart and Flutter based on software industry standards and best practices.
3-
version: 0.0.7
3+
version: 0.0.8
44
homepage: https://github.com/solid-software/solid_lints/
55

66
environment:

0 commit comments

Comments
 (0)