Skip to content

Commit

Permalink
fix: No warnings in test directory (#70)
Browse files Browse the repository at this point in the history
* fix: No warnings in test directory

* doc: selfreview

* doc:Add exclusion of _test.dart

* doc: revise commit

* doc: Delete test-related comments

* fix: Changed from lint_test to test

* fix: Change from test to lint_test

* fix: Correction of directory location

* fix: avoid_harded_color true

* fix: selfreview

* Update packages/altive_lints/example/test/avoid_hardcoded_japanese_test.dart

Co-authored-by: Ryunosuke Muramatsu <[email protected]>

* fix: Correction.

---------

Co-authored-by: Ryunosuke Muramatsu <[email protected]>
  • Loading branch information
boywithdv and riscait authored Oct 29, 2024
1 parent bce2f10 commit 02d2fa8
Show file tree
Hide file tree
Showing 16 changed files with 13 additions and 23 deletions.
4 changes: 0 additions & 4 deletions packages/altive_lints/example/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ linter:
# Disabled so that you don't have to write a doc since it is an `example`.
- public_member_api_docs: false

custom_lint:
rules:
# Disabled so that you can use hard-coded colors since it is an `example`.
- avoid_hardcoded_color: false
1 change: 1 addition & 0 deletions packages/altive_lints/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ dependencies:
dev_dependencies:
altive_lints:
path: ../
clock: ^1.1.2
custom_lint: ^0.6.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Check the `avoid_hardcoded_japanese` rule.
//
// It should exclude warnings for the entire `test` directory.

const hiragana = 'あいうえお';

const katakana = 'アイウエオ';

const kanji = '漢字';
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ class AvoidHardcodedJapanese extends DartLintRule {
ErrorReporter reporter,
CustomLintContext context,
) {
if (resolver.source.uri.pathSegments.contains('test')) {
return;
}
if (resolver.source.shortName.endsWith('_test.dart')) {
return;
}
Expand Down
5 changes: 0 additions & 5 deletions packages/altive_lints/lint_test/analysis_options.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions packages/altive_lints/lint_test/pubspec.yaml

This file was deleted.

0 comments on commit 02d2fa8

Please sign in to comment.