mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 15:42:20 +00:00
[analyzer] enable implicit-casts: false for several projects
Change-Id: Idd7ed77756d93a94f637dcc4abd7e0403a2f6d81 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112703 Commit-Queue: Devon Carew <devoncarew@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
20407e28db
commit
f53388b50d
|
@ -1,4 +1,7 @@
|
|||
analyzer:
|
||||
# This currently finds ~1,200 implicit-casts issues when enabled.
|
||||
# strong-mode:
|
||||
# implicit-casts: false
|
||||
exclude:
|
||||
- test/mock_packages/**
|
||||
|
||||
|
|
10
pkg/analysis_server_client/analysis_options.yaml
Normal file
10
pkg/analysis_server_client/analysis_options.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
analyzer:
|
||||
#strong-mode:
|
||||
# implicit-casts: false
|
||||
|
||||
linter:
|
||||
rules:
|
||||
- empty_constructor_bodies
|
||||
- empty_statements
|
||||
- unnecessary_brace_in_string_interps
|
||||
- valid_regexps
|
|
@ -99,7 +99,7 @@ class _Handler with NotificationHandler, ConnectionHandler {
|
|||
if (errorCount == 0) {
|
||||
print('No issues found.');
|
||||
} else {
|
||||
print('Found ${errorCount} errors/warnings/hints');
|
||||
print('Found $errorCount errors/warnings/hints');
|
||||
}
|
||||
errorCount = 0;
|
||||
print('--------- ctrl-c to exit ---------');
|
||||
|
|
|
@ -32,13 +32,14 @@ class JenkinsSmiHash {
|
|||
}
|
||||
|
||||
/// Combines together two hash codes.
|
||||
static int hash2(a, b) => finish(combine(combine(0, a), b));
|
||||
static int hash2(int a, int b) => finish(combine(combine(0, a), b));
|
||||
|
||||
/// Combines together three hash codes.
|
||||
static int hash3(a, b, c) => finish(combine(combine(combine(0, a), b), c));
|
||||
static int hash3(int a, int b, int c) =>
|
||||
finish(combine(combine(combine(0, a), b), c));
|
||||
|
||||
/// Combines together four hash codes.
|
||||
static int hash4(a, b, c, d) =>
|
||||
static int hash4(int a, int b, int c, int d) =>
|
||||
finish(combine(combine(combine(combine(0, a), b), c), d));
|
||||
|
||||
int _hash = 0;
|
||||
|
|
10
pkg/analysis_tool/analysis_options.yaml
Normal file
10
pkg/analysis_tool/analysis_options.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
analyzer:
|
||||
strong-mode:
|
||||
implicit-casts: false
|
||||
|
||||
linter:
|
||||
rules:
|
||||
- empty_constructor_bodies
|
||||
- empty_statements
|
||||
- unnecessary_brace_in_string_interps
|
||||
- valid_regexps
|
|
@ -1,3 +1,8 @@
|
|||
analyzer:
|
||||
# This currently finds ~4,500 implicit-casts issues when enabled.
|
||||
# strong-mode:
|
||||
# implicit-casts: false
|
||||
|
||||
linter:
|
||||
rules:
|
||||
- empty_constructor_bodies # pedantic
|
||||
|
|
|
@ -194,8 +194,10 @@ class WrappedCompilationUnitElement implements CompilationUnitElement {
|
|||
.accept(visitor); // ignore: deprecated_member_use_from_same_package
|
||||
|
||||
@override
|
||||
String computeDocumentationComment() =>
|
||||
wrappedUnit.computeDocumentationComment();
|
||||
String computeDocumentationComment() {
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
return wrappedUnit.computeDocumentationComment();
|
||||
}
|
||||
|
||||
@deprecated
|
||||
@override
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
include: package:pedantic/analysis_options.1.8.0.yaml
|
||||
|
||||
analyzer:
|
||||
strong-mode:
|
||||
implicit-casts: false
|
||||
|
||||
linter:
|
||||
rules:
|
||||
directives_ordering: true
|
||||
|
|
|
@ -52,7 +52,7 @@ class Options {
|
|||
pedanticFixes = results[pedanticOption] as bool,
|
||||
requiredFixes = results[requiredOption] as bool,
|
||||
sdkPath = _getSdkPath(),
|
||||
serverSnapshot = results[_serverSnapshot],
|
||||
serverSnapshot = results[_serverSnapshot] as String,
|
||||
showHelp = results[_helpOption] as bool || results.arguments.isEmpty,
|
||||
targets = results.rest,
|
||||
useColor = results.wasParsed(_colorOption)
|
||||
|
|
Loading…
Reference in a new issue