Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[various] Remove unnecessary null checks #4060

Merged
merged 9 commits into from
May 22, 2023
Prev Previous commit
Next Next commit
Fix tool warnings
  • Loading branch information
stuartmorgan committed May 22, 2023
commit 3dae0723d09bf690149394d01944c3f8ccaf9940
4 changes: 2 additions & 2 deletions script/tool/lib/src/common/xcode.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class Xcode {
final List<String> args = <String>[
_xcodeBuildCommand,
...actions,
if (workspace != null) ...<String>['-workspace', workspace],
if (scheme != null) ...<String>['-scheme', scheme],
...<String>['-workspace', workspace],
...<String>['-scheme', scheme],
if (configuration != null) ...<String>['-configuration', configuration],
...extraFlags,
];
Expand Down
3 changes: 0 additions & 3 deletions script/tool/lib/src/federation_safety_check_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,6 @@ class FederationSafetyCheckCommand extends PackageLoopingCommand {

Future<bool> _changeIsCommentOnly(
GitVersionFinder git, String repoPath) async {
if (git == null) {
return false;
}
final List<String> diff = await git.getDiffContents(targetPath: repoPath);
final RegExp changeLine = RegExp(r'^[+-] ');
// This will not catch /**/-style comments, but false negatives are fine
Expand Down
1 change: 0 additions & 1 deletion script/tool/lib/src/publish_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ Safe to ignore if the package is deleted in this commit.
required String tag,
required _RemoteInfo remote,
}) async {
assert(remote != null && tag != null);
if (!getBoolArg(_dryRunFlag)) {
final io.ProcessResult result = await (await gitDir).runCommand(
<String>['push', remote.name, tag],
Expand Down