Skip to content

Commit

Permalink
Add new rules
Browse files Browse the repository at this point in the history
  • Loading branch information
quoc-huynh-cosee committed Dec 17, 2024
1 parent e541fc9 commit 6a65812
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 6 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 0.7.0

* Add new [core](./lib/core.yaml) rules
* [`annotate_redeclares`](https://dart.dev/tools/linter-rules/annotate_redeclares).
* [`document_ignores`](https://dart.dev/tools/linter-rules/annotate_redeclares).
* [`invalid_runtime_check_with_js_interop_types`](https://dart.dev/tools/linter-rules/invalid_runtime_check_with_js_interop_types).
* [`use_truncating_division`](https://dart.dev/tools/linter-rules/use_truncating_division).
* [`unintended_html_in_doc_comment`](https://dart.dev/tools/linter-rules/unintended_html_in_doc_comment).
* Add new [package](./lib/package.yaml) rules
* [`missing_code_block_language_in_doc_comment`](https://dart.dev/tools/linter-rules/missing_code_block_language_in_doc_comment).
* [`unnecessary_library_name`](https://dart.dev/tools/linter-rules/unnecessary_library_name).
* Removed unnecessary metrics
* [`prefer-commenting-analyzer-ignores`](https://dcl.apps.bancolombia.com/docs/rules/dart/prefer-commenting-analyzer-ignores).

## 0.6.0

* Replace [dart_code_metrics](https://pub.dev/packages/dart_code_metrics) with [dart_code_linter](https://pub.dev/packages/dart_code_linter).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To install the package, add the following to your `pubspec.yaml` file:

```yaml
dev_dependencies:
cosee_lints: ^0.6.0
cosee_lints: ^0.7.0
```
Then, add an include in `analysis_options.yaml`.<br>
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.6.0"
version: "0.7.0"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -305,4 +305,4 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.5.0 <4.0.0"
dart: ">=3.6.0 <4.0.0"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ publish_to: none
version: 1.0.0+1

environment:
sdk: '>=3.0.0 <4.0.0'
sdk: ^3.6.0

dev_dependencies:
cosee_lints:
Expand Down
6 changes: 6 additions & 0 deletions lib/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ linter:
- always_put_control_body_on_new_line
- always_put_required_named_parameters_first
- annotate_overrides
- annotate_redeclares
- avoid_bool_literals_in_conditional_expressions
- avoid_catches_without_on_clauses
- avoid_catching_errors
Expand Down Expand Up @@ -99,11 +100,13 @@ linter:
- curly_braces_in_flow_control_structures
- deprecated_consistency
- directives_ordering
- document_ignores
- empty_catches
- empty_constructor_bodies
- eol_at_end_of_file
- exhaustive_cases
- file_names
- invalid_runtime_check_with_js_interop_types
- implementation_imports
- implicit_call_tearoffs
- join_return_with_assignment
Expand All @@ -112,6 +115,7 @@ linter:
- library_private_types_in_public_api
- lines_longer_than_80_chars
- matching_super_parameters
- missing_code_block_language_in_doc_comment
- missing_whitespace_between_adjacent_strings
- no_leading_underscores_for_library_prefixes
- no_leading_underscores_for_local_identifiers
Expand Down Expand Up @@ -170,6 +174,7 @@ linter:
- type_init_formals
- type_literal_in_constant_pattern
- unawaited_futures
- unintended_html_in_doc_comment
- unnecessary_await_in_return
- unnecessary_brace_in_string_interps
- unnecessary_breaks
Expand Down Expand Up @@ -207,6 +212,7 @@ linter:
- use_super_parameters
- use_test_throws_matchers
- use_to_and_as_if_applicable
- use_truncating_division
- void_checks

# Pub rules
Expand Down
1 change: 0 additions & 1 deletion lib/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ dart_code_linter:
- no-equal-then-else
- no-object-declaration
- prefer-async-await
- prefer-commenting-analyzer-ignores
- prefer-correct-test-file-name
- prefer-correct-type-name
- prefer-enums-by-name
Expand Down
2 changes: 2 additions & 0 deletions lib/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ linter:
- diagnostic_describe_all_properties
- library_annotations
- library_names
- missing_code_block_language_in_doc_comment
- package_api_docs
- package_prefixed_library_names
- public_member_api_docs
- slash_for_doc_comments
- unnecessary_library_directive
- unnecessary_library_name
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Lint rules and metrics for Dart and Flutter used internally at cose
repository: https://github.com/cosee/cosee_lints
homepage: https://pub.dev/publishers/cosee.biz/packages
issue_tracker: https://github.com/cosee/cosee_lints/issues
version: 0.6.0
version: 0.7.0
topics:
- lints

Expand Down

0 comments on commit 6a65812

Please sign in to comment.