Skip to content

Commit

Permalink
Enable Dart 3.4 lints (#305)
Browse files Browse the repository at this point in the history
* Enable missing_code_block_language_in_doc_comment and unnecessary_library_name

* Bump dart version

* Add changelog entry for leancode_lint v13

* Release leancode_lint v13

* Bump dart version for leancode_lint CI
  • Loading branch information
shilangyu authored Jun 10, 2024
1 parent 8338dbf commit 3e8232e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/leancode_lint-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.3
sdk: 3.4

- name: Publish and release
uses: leancodepl/mobile-tools/.github/actions/pub-release@pub-release-v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/leancode_lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
include:
- version: 3.19.x
- version: 3.22.x

defaults:
run:
Expand Down
7 changes: 7 additions & 0 deletions packages/leancode_lint/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 13.0.0

- Bump minimum Dart version to 3.4
- Enable the following lints:
- [`unnecessary_library_name`](https://dart.dev/tools/linter-rules/unnecessary_library_name)
- [`missing_code_block_language_in_doc_comment`](https://dart.dev/tools/linter-rules/missing_code_block_language_in_doc_comment)

# 12.1.0

- Treat `HookWidget` as a new hook context. This should remove some false positives in `avoid_conditional_hooks` and catch new cases in `hook_widget_does_not_use_hooks`.
Expand Down
4 changes: 4 additions & 0 deletions packages/leancode_lint/lib/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ analyzer:
library_names: warning
library_prefixes: warning
literal_only_boolean_expressions: warning
missing_code_block_language_in_doc_comment: warning
no_adjacent_strings_in_list: warning
no_duplicate_case_values: warning
no_leading_underscores_for_library_prefixes: warning
Expand Down Expand Up @@ -151,6 +152,7 @@ analyzer:
unnecessary_lambdas: warning
unnecessary_late: warning
unnecessary_library_directive: warning
unnecessary_library_name: warning
unnecessary_new: warning
unnecessary_null_aware_assignments: warning
unnecessary_null_aware_operator_on_extension_on_nullable: warning
Expand Down Expand Up @@ -291,6 +293,7 @@ linter:
lines_longer_than_80_chars: false
literal_only_boolean_expressions: true
matching_super_parameters: false
missing_code_block_language_in_doc_comment: true
missing_whitespace_between_adjacent_strings: false
no_adjacent_strings_in_list: true
no_default_cases: false
Expand Down Expand Up @@ -382,6 +385,7 @@ linter:
unnecessary_lambdas: true
unnecessary_late: true
unnecessary_library_directive: true
unnecessary_library_name: true
unnecessary_new: true
unnecessary_null_aware_assignments: true
unnecessary_null_aware_operator_on_extension_on_nullable: true
Expand Down
4 changes: 2 additions & 2 deletions packages/leancode_lint/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: leancode_lint
version: 12.1.0
version: 13.0.0
homepage: https://github.com/leancodepl/flutter_corelibrary/tree/master/packages/leancode_lint
repository: https://github.com/leancodepl/flutter_corelibrary
description: Robust, high-quality lint rules used at LeanCode.
Expand All @@ -9,7 +9,7 @@ topics:
- lints

environment:
sdk: ">=3.3.0 <4.0.0"
sdk: ">=3.4.0 <4.0.0"

dependencies:
analyzer: ^6.4.1
Expand Down

0 comments on commit 3e8232e

Please sign in to comment.