swift-argument-parser icon indicating copy to clipboard operation
swift-argument-parser copied to clipboard

[GSoC] Add API for disabling interactive mode

Open KeithBird opened this issue 2 years ago • 1 comments

Solution to the issue #462.

This PR is used to track progress and view differences to make discussions easier.

Checklist

  • [x] I've added at least one test that validates that my change is working, if appropriate
  • [x] I've followed the code style of the rest of the project
  • [x] I've read the Contribution Guidelines
  • [x] I've updated the documentation if necessary

KeithBird avatar Aug 08 '22 12:08 KeithBird

https://github.com/apple/swift-argument-parser/blob/df9ee6676cd5b3bf5b330ec7568a5644f547201b/Sources/ArgumentParser/Parsable%20Types/ParsableArguments.swift#L77

When ParsableArguments is converted to ParsableCommand, it is difficult to set the configuration parameters, but testing requires turning off interactive mode. So I've set the interaction mode to turn off by default for now. @natecook1000

KeithBird avatar Aug 08 '22 12:08 KeithBird

One question about the new wrapper type for you. Let's also try to watch out for whitespace-only changes - makes it a bit harder to review. 👍

My apologies. You can turn on Hide whitespace which is hard to find. Can we manage formats automatically using SwiftFormat and some configuration files? Manual formatting is a little tricky when there are a lot of files that have been slightly modified.

KeithBird avatar Aug 14 '22 03:08 KeithBird

I'd forgotten about that setting, thanks! I need to think about adding a dependency - it would be nice to have the formatting handled.

natecook1000 avatar Aug 16 '22 05:08 natecook1000

I think the TCA has done a good job of this. Please let me know if I can help. @natecook1000

KeithBird avatar Aug 16 '22 05:08 KeithBird