Skip to content

Commit 091fc34

Browse files
authored
[ffigen] Switch to package:dart_flutter_team_lints (#1277)
1 parent d71cb00 commit 091fc34

File tree

13 files changed

+78
-12
lines changed

13 files changed

+78
-12
lines changed

pkgs/ffigen/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
built-in methods, or with types declared elsewhere in the generated bindings.
3030
- Add `include-unused-typedefs` to allow generating typedefs that are not
3131
referred to anywhere, the default option is `false`.
32+
- Use `package:dart_flutter_team_lints`.
3233

3334
## 12.0.0
3435

pkgs/ffigen/analysis_options.yaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# for details. All rights reserved. Use of this source code is governed by a
33
# BSD-style license that can be found in the LICENSE file.
44

5-
include: package:lints/recommended.yaml
5+
include: package:dart_flutter_team_lints/analysis_options.yaml
66

77
analyzer:
88
errors:
@@ -19,15 +19,27 @@ analyzer:
1919
language:
2020
strict-casts: true
2121
strict-inference: true
22+
strict-raw-types: false #TODO(https://github.com/dart-lang/native/issues/1281): Fix.
2223

2324
linter:
2425
rules:
25-
# Enabled.
2626
dangling_library_doc_comments: true
2727
directives_ordering: true
2828
prefer_final_locals: true
2929
prefer_final_in_for_each: true
3030
use_super_parameters: true
31-
32-
# Disabled.
33-
constant_identifier_names: false
31+
always_declare_return_types: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix
32+
avoid_dynamic_calls: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix
33+
comment_references: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix
34+
constant_identifier_names: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix
35+
library_annotations: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix
36+
lines_longer_than_80_chars: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix
37+
omit_local_variable_types: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix.
38+
only_throw_errors: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix
39+
prefer_asserts_in_initializer_lists: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix
40+
prefer_const_constructors: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix.
41+
prefer_relative_imports: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix
42+
prefer_single_quotes: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix.
43+
type_annotate_public_apis: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix
44+
unnecessary_parenthesis: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix
45+
unreachable_from_main: false # TODO(https://github.com/dart-lang/native/issues/1281): Fix

pkgs/ffigen/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ dependencies:
3232

3333
dev_dependencies:
3434
coverage: ^1.8.0
35+
dart_flutter_team_lints: ^2.0.0
3536
json_schema: ^5.1.1
36-
lints: ^2.0.1
3737
meta: ^1.11.0
3838
objective_c: ^1.0.0
3939
test: ^1.16.2

pkgs/objective_c/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
by the ffigen bindings for a protocol.
1313
- Make all of the code-genned structs and enums public so they can be reused by
1414
user bindings.
15+
- Use `package:dart_flutter_team_lints`.
1516

1617
## 1.0.1
1718

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
include: package:flutter_lints/flutter.yaml
1+
include: package:dart_flutter_team_lints/analysis_options.yaml
22

33
analyzer:
4+
errors:
5+
todo: ignore
46
exclude:
57
- tool/data/extra_methods.dart
68
language:
79
strict-casts: true
810
strict-inference: true
11+
strict-raw-types: true
12+
13+
linter:
14+
rules:
15+
avoid_dynamic_calls: false # TODO(https://github.com/dart-lang/native/issues/1280): Fix
16+
combinators_ordering: false # TODO(https://github.com/dart-lang/native/issues/1280): Fix.
17+
comment_references: false # TODO(https://github.com/dart-lang/native/issues/1280): Fix
18+
directives_ordering: false # TODO(https://github.com/dart-lang/native/issues/1280): Fix
19+
library_annotations: false # TODO(https://github.com/dart-lang/native/issues/1280): Fix
20+
omit_local_variable_types: false # TODO(https://github.com/dart-lang/native/issues/1280): Fix
21+
prefer_single_quotes: false # TODO(https://github.com/dart-lang/native/issues/1280): Fix
22+
sort_pub_dependencies: false # TODO(https://github.com/dart-lang/native/issues/1280): Fix

pkgs/objective_c/example/pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ packages:
219219
dependency: transitive
220220
description:
221221
name: vm_service
222-
sha256: "360c4271613beb44db559547d02f8b0dc044741d0eeb9aa6ccdb47e8ec54c63a"
222+
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
223223
url: "https://pub.dev"
224224
source: hosted
225-
version: "14.2.3"
225+
version: "14.2.4"
226226
yaml:
227227
dependency: transitive
228228
description:

pkgs/objective_c/pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# BSD-style license that can be found in the LICENSE file.
44

55
name: objective_c
6-
description: "A library to access Objective C from Flutter that acts as a support library for package:ffigen."
6+
description: 'A library to access Objective C from Flutter that acts as a support library for package:ffigen.'
77
version: 1.1.0-wip
88
repository: https://github.com/dart-lang/native/tree/main/pkgs/objective_c
99

@@ -26,6 +26,7 @@ dependencies:
2626

2727
dev_dependencies:
2828
coverage: ^1.8.0
29+
dart_flutter_team_lints: ^2.0.0
2930
ffigen: ^12.0.0
3031
flutter_test:
3132
sdk: flutter

pkgs/swiftgen/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
## 0.0.1-wip
2+
3+
- Initial version.

pkgs/swiftgen/analysis_options.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
include: package:dart_flutter_team_lints/analysis_options.yaml
2+
3+
analyzer:
4+
language:
5+
strict-casts: true
6+
strict-inference: true
7+
strict-raw-types: true

pkgs/swiftgen/pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# BSD-style license that can be found in the LICENSE file.
44

55
name: swiftgen
6-
description: "A tool for generating bindings that allow interop between Dart and Swift code."
6+
description: 'A tool for generating bindings that allow interop between Dart and Swift code.'
77
version: 0.0.1-wip
88
repository: https://github.com/dart-lang/native/tree/main/pkgs/swiftgen
99

@@ -20,6 +20,7 @@ dependencies:
2020
ffi: ^2.1.0
2121

2222
dev_dependencies:
23+
dart_flutter_team_lints: ^2.0.0
2324
ffigen: ^11.0.0
2425
test: ^1.21.1
2526

0 commit comments

Comments
 (0)