Skip to content

Delete FlutterCommand.intArg(), which is not used anywhere#122124

Merged
auto-submit[bot] merged 1 commit intoflutter:masterfrom
bartekpacia:refactor/remove_unused_intarg
Mar 8, 2023
Merged

Delete FlutterCommand.intArg(), which is not used anywhere#122124
auto-submit[bot] merged 1 commit intoflutter:masterfrom
bartekpacia:refactor/remove_unused_intarg

Conversation

@bartekpacia
Copy link
Member

@bartekpacia bartekpacia commented Mar 7, 2023

This PR removes dead code.

What's interesting is that it has a bug in it, so it probably was never used :) The correct implementation would be:

  /// Gets the parsed command-line option named [name] as an `int`.
  int? intArg(String name) {
    if (!argParser.options.containsKey(name)) {
      return null;
    }

    final value = argResults![name] as String?;
    if (value == null) {
      return null;
    }

    return int.tryParse(value);
  }

List which issues are fixed by this PR. You must list at least one issue.

Sorry, I think this is such a small change that it doesn't require one. But if I really must, I'll do, of course :)

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

…odebase

It also has a bug in it, so it doesn't actually work.
@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 7, 2023
Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jmagman
Copy link
Member

jmagman commented Mar 8, 2023

What's interesting is that it has a bug in it, so it probably was never used

See #101595 for context.

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 8, 2023
@auto-submit auto-submit bot merged commit f8524ea into flutter:master Mar 8, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 8, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 8, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 8, 2023
@bartekpacia bartekpacia deleted the refactor/remove_unused_intarg branch March 9, 2023 12:45
hannah-hyj pushed a commit to hannah-hyj/flutter that referenced this pull request Mar 11, 2023
…odebase (flutter#122124)

Delete `FlutterCommand.intArg()`, which is not used anywhere
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants