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

Add a "Development" guide

Open natecook1000 opened this issue 5 years ago • 3 comments

The guide should cover pull request and testing expectations, coding style (re: this note), and any platform-specific requirements.

natecook1000 avatar Mar 02 '20 18:03 natecook1000

I covered the PR part of this issue in https://github.com/apple/swift-argument-parser/pull/53 . What remains is:

  • Testing expectation
  • Coding style

Did I miss anything now?

Regarding Coding style: in Swift Crypto we have a sanity script (relevant lines), being run by CI, which invokes swiftformat (nicklockwood/SwiftFormat) - with this config, and reports failure if the output of swiftformat does not equal the committed code - effectively ensuring proper formating. At least that is one part of coding style that might be automated.

Sajjon avatar Mar 03 '20 10:03 Sajjon

@natecook1000 What do you think about swiftformat and/or possibly swiftlint for code style?

I can't remember why Nick Lookwoods (excellent repo) was used instead of Apple's own swiftformat in swift-crypto. Maybe @tomerd or Lukasa knows?

Sajjon avatar Mar 05 '20 23:03 Sajjon

Still working on getting CI set up for this project — once that's in place we can look at adding steps to it. I'd love to have a linter take care of this, but we'll need a first round to get to a state where we could use it going forward. Do you want to see if a lenient set of rules could get us passing without too much churn?

natecook1000 avatar Mar 06 '20 04:03 natecook1000