[pkg] switches the default linting for pkg/ packages to dart_flutter_team_lints

Change-Id: I201b984fd8794e04bf6e0131ed4f85192f641ef4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335502
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
This commit is contained in:
Devon Carew 2023-11-11 01:52:16 +00:00 committed by Commit Queue
parent 95738fa095
commit 755aabd096
8 changed files with 13 additions and 18 deletions

View file

@ -1,11 +1 @@
include: package:lints/recommended.yaml
# analyzer:
# language:
# strict-casts: true
linter:
rules:
depend_on_referenced_packages: true
directives_ordering: true
sort_pub_dependencies: true
include: package:dart_flutter_team_lints/analysis_options.yaml

View file

@ -0,0 +1 @@
include: package:lints/recommended.yaml

View file

@ -0,0 +1 @@
include: package:lints/recommended.yaml

View file

@ -0,0 +1 @@
include: package:lints/recommended.yaml

View file

@ -143,7 +143,7 @@ final finalizerAddress = () {
return finalizerStub.cast<Void>();
}();
class PeerData extends Struct {
base class PeerData extends Struct {
external Pointer<Void> close;
external Pointer<Void> munmap;
external Pointer<Void> free;

View file

@ -4,7 +4,7 @@ name: mmap
publish_to: none
environment:
sdk: '>=2.14.0 <3.0.0'
sdk: ^3.0.0
# Use 'any' constraints here; we get our versions from the DEPS file.
dependencies:

View file

@ -18,7 +18,7 @@ final sizesToTest = [
2 * kPageSize
];
main() {
void main() {
final tempDir = Directory.systemTemp.createTempSync('mmap_test');
try {
testMmapOrReadFile(tempDir);

View file

@ -23,18 +23,20 @@ void main(List<String> args) {
var options = File('${dir.path}/analysis_options.yaml');
var name = dir.path.split('/').last;
var type = 'default';
if (options.existsSync()) {
var type = '** custom **';
type = '** custom **';
var optionsContent = options.readAsStringSync();
if (optionsContent.contains('package:lints/core.yaml')) {
type = 'core';
} else if (optionsContent.contains('package:lints/recommended.yaml')) {
type = 'recommended';
} else if (optionsContent
.contains('package:dart_flutter_team_lints/analysis_options.yaml')) {
type = 'dart_flutter_team_lints';
}
print('${name.padRight(indent)}: ${type.padRight(12)} $slocDesc');
} else {
print('${name.padRight(indent)}: default $slocDesc');
}
print('${name.padRight(indent)}: ${type.padRight(23)} $slocDesc');
}
}