Skip to content

Commit

Permalink
add more lints to package:dart_flutter_team_lints (#71)
Browse files Browse the repository at this point in the history
* add more lints to package:dart_flutter_team_lints

* require dart 2.19.0

* regen mono_repo; update corpus for new lints

* generally require 2.19

* more mono_repo regenerate
  • Loading branch information
devoncarew authored Feb 21, 2023
1 parent bd558ac commit ed58317
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 96 deletions.
143 changes: 56 additions & 87 deletions .github/workflows/dart.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkgs/blast_repo/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A tool to bulk validate and fix GitHub repos.
publish_to: none

environment:
sdk: ^2.18.0
sdk: ^2.19.0

dependencies:
args: ^2.3.1
Expand Down
1 change: 1 addition & 0 deletions pkgs/corpus/bin/deps.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.

/// Outputs information in CSV format for all the dependents of a given package.
library;

import 'dart:io';

Expand Down
2 changes: 1 addition & 1 deletion pkgs/corpus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A tool to calculate the API usage for a package.
publish_to: none

environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=2.19.0 <3.0.0'

dependencies:
analyzer: ^5.0.0
Expand Down
12 changes: 12 additions & 0 deletions pkgs/dart_flutter_team_lints/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 1.0.0

- Added `collection_methods_unrelated_type`.
- Added `combinators_ordering`.
- Added `dangling_library_doc_comments`.
- Added `implicit_call_tearoffs`.
- Added `library_annotations`.
- Added `unnecessary_library_directive`.
- Added `unreachable_from_main`.
- Added `use_string_in_part_of_directives`.
- Require Dart `2.19.0`.

## 0.1.0

- Turn on `strict-casts: true`.
Expand Down
8 changes: 8 additions & 0 deletions pkgs/dart_flutter_team_lints/lib/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ linter:
- avoid_shadowing_type_parameters
- avoid_types_as_parameter_names
- camel_case_extensions
- combinators_ordering
- curly_braces_in_flow_control_structures
- directives_ordering
- empty_catches
- file_names
- library_annotations
- lines_longer_than_80_chars
- omit_local_variable_types
- prefer_asserts_in_initializer_lists
Expand All @@ -39,20 +41,26 @@ linter:
- prefer_typing_uninitialized_variables
- sort_pub_dependencies
- unnecessary_lambdas
- unnecessary_library_directive
- unnecessary_overrides
- unnecessary_parenthesis
- unnecessary_statements
- use_is_even_rather_than_modulo
- use_string_in_part_of_directives

# correctness
- always_declare_return_types
- avoid_catching_errors
- avoid_dynamic_calls
- await_only_futures
- collection_methods_unrelated_type
- dangling_library_doc_comments
- hash_and_equals
- implicit_call_tearoffs
- no_duplicate_case_values
- only_throw_errors
- throw_in_finally
- type_annotate_public_apis
- unawaited_futures
- unreachable_from_main
- unrelated_type_equality_checks
5 changes: 3 additions & 2 deletions pkgs/dart_flutter_team_lints/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: dart_flutter_team_lints
description: An analysis rule set used by the Dart and Flutter teams.
version: 0.1.0
version: 1.0.0
repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/dart_flutter_team_lints

environment:
sdk: '>=2.17.0 <3.0.0'
sdk: '>=2.19.0 <3.0.0'

dependencies:
lints: ^2.0.0

dev_dependencies:
checks: ^0.2.0
test: ^1.0.0
yaml: ^3.0.0
Loading

0 comments on commit ed58317

Please sign in to comment.