enable no_literal_bool_comparisons lint (#126647)
This commit is contained in:
committed by
GitHub
parent
b45f9b36e8
commit
5e1ba701ed
@@ -809,7 +809,7 @@ Future<void> _runFrameworkTests() async {
|
||||
final List<String> tests = Directory(path.join(flutterRoot, 'packages', 'flutter', 'test'))
|
||||
.listSync(followLinks: false)
|
||||
.whereType<Directory>()
|
||||
.where((Directory dir) => dir.path.endsWith('widgets') == false)
|
||||
.where((Directory dir) => !dir.path.endsWith('widgets'))
|
||||
.map<String>((Directory dir) => path.join('test', path.basename(dir.path)) + path.separator)
|
||||
.toList();
|
||||
printProgress('${green}Running packages/flutter tests$reset for $cyan${tests.join(", ")}$reset');
|
||||
|
||||
@@ -99,7 +99,7 @@ class CodesignCommand extends Command<void> {
|
||||
);
|
||||
}
|
||||
|
||||
if (argResults!['verify'] as bool != true) {
|
||||
if (!(argResults!['verify'] as bool)) {
|
||||
throw ConductorException(
|
||||
'Sorry, but codesigning is not implemented yet. Please pass the '
|
||||
'--$kVerify flag to verify signatures.',
|
||||
|
||||
@@ -128,7 +128,7 @@ class NextContext extends Context {
|
||||
stdio.printStatus('These must be applied manually in the directory '
|
||||
'${state.engine.checkoutPath} before proceeding.\n');
|
||||
}
|
||||
if (autoAccept == false) {
|
||||
if (!autoAccept) {
|
||||
final bool response = await prompt(
|
||||
'Are you ready to push your engine branch to the repository '
|
||||
'${state.engine.mirror.url}?',
|
||||
@@ -146,7 +146,7 @@ class NextContext extends Context {
|
||||
'You must validate pre-submit CI for your engine PR, merge it, and codesign',
|
||||
'binaries before proceeding.\n',
|
||||
].join('\n'));
|
||||
if (autoAccept == false) {
|
||||
if (!autoAccept) {
|
||||
// TODO(fujino): actually test if binaries have been codesigned on macOS
|
||||
final bool response = await prompt(
|
||||
'Has CI passed for the engine PR and binaries been codesigned?',
|
||||
@@ -236,7 +236,7 @@ class NextContext extends Context {
|
||||
);
|
||||
}
|
||||
|
||||
if (autoAccept == false) {
|
||||
if (!autoAccept) {
|
||||
final bool response = await prompt(
|
||||
'Are you ready to push your framework branch to the repository '
|
||||
'${state.framework.mirror.url}?',
|
||||
@@ -276,7 +276,7 @@ class NextContext extends Context {
|
||||
previousCheckoutLocation: state.engine.checkoutPath,
|
||||
);
|
||||
final String engineHead = await engine.reverseParse('HEAD');
|
||||
if (autoAccept == false) {
|
||||
if (!autoAccept) {
|
||||
final bool response = await prompt(
|
||||
'Are you ready to tag commit $frameworkHead as ${state.releaseVersion}\n'
|
||||
'and push to remote ${state.framework.upstream.url}?',
|
||||
@@ -302,7 +302,7 @@ class NextContext extends Context {
|
||||
previousCheckoutLocation: state.framework.checkoutPath,
|
||||
);
|
||||
final String headRevision = await framework.reverseParse('HEAD');
|
||||
if (autoAccept == false) {
|
||||
if (!autoAccept) {
|
||||
// dryRun: true means print out git command
|
||||
await framework.pushRef(
|
||||
fromRef: headRevision,
|
||||
@@ -332,7 +332,7 @@ class NextContext extends Context {
|
||||
'The current status of packaging builds can be seen at:\n'
|
||||
'\t$kLuciPackagingConsoleLink',
|
||||
);
|
||||
if (autoAccept == false) {
|
||||
if (!autoAccept) {
|
||||
final bool response = await prompt(
|
||||
'Have all packaging builds finished successfully and post release announcements been completed?');
|
||||
if (!response) {
|
||||
@@ -373,7 +373,7 @@ class NextContext extends Context {
|
||||
force: force,
|
||||
);
|
||||
} on GitException catch (exception) {
|
||||
if (exception.type == GitExceptionType.PushRejected && force == false) {
|
||||
if (exception.type == GitExceptionType.PushRejected && !force) {
|
||||
throw ConductorException(
|
||||
'Push failed because the working branch named '
|
||||
'${pbRepository.workingBranch} already exists on your mirror. '
|
||||
|
||||
@@ -176,7 +176,7 @@ Future<void> _runABTest({
|
||||
|
||||
abTest.addBResult(localEngineResult);
|
||||
|
||||
if (silent != true && i < runsPerTest) {
|
||||
if (!silent && i < runsPerTest) {
|
||||
section('A/B results so far');
|
||||
print(abTest.printSummary());
|
||||
}
|
||||
@@ -186,7 +186,7 @@ Future<void> _runABTest({
|
||||
final File jsonFile = _uniqueFile(resultsFile);
|
||||
jsonFile.writeAsStringSync(const JsonEncoder.withIndent(' ').convert(abTest.jsonMap));
|
||||
|
||||
if (silent != true) {
|
||||
if (!silent) {
|
||||
section('Raw results');
|
||||
print(abTest.rawResults());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user