square / spacecommander

Commit fully-formatted Objective-C as a team without even trying.
Other
1.13k stars 177 forks source link

.formatting-directory can now contain multiple directories #20

Closed ksuther closed 9 years ago

ksuther commented 9 years ago

common-lib.sh will now check .formatting-directory for multiple lines. This makes it easier to support the standard Xcode project format where there's one directory per target.

Ideally I'd be able to exclude individual directories or files, but this is a pretty good solution and works without any other changes.

alanf commented 9 years ago

Thanks again, this looks good overall. The README instructions should be updated as part of this change, though.

We could update this:

To format files within a single directory only (just one of these is supported at this time), specify the name of this directory in a file named .formatting-directory. Otherwise, all Objective-C files tracked in the repo will be checked.

To this:

To format files only within selected directories, specify the name each directory in a file named .formatting-directory, separated by newlines (and without whitespace escaped). Otherwise, all Objective-C files tracked in the repo will be checked.

Thanks, it's nice to be able to remove the aside about how only one directory is supported!

ksuther commented 9 years ago

Updated, thanks for the suggestions!

alanf commented 9 years ago

LGTM, thanks @ksuther!