Jintin / Swimat

An Xcode formatter plug-in to format your swift code.
https://jintin.github.io/Swimat/
MIT License
1.65k stars 89 forks source link

Format whole project #223

Open vBoykoGit opened 4 years ago

vBoykoGit commented 4 years ago

Is it possible?

Jintin commented 4 years ago

@saagarjha I remember we can use Swimat in command line right?

saagarjha commented 4 years ago

Yeah, we do. swimat -r or find . -name *.swift | xargs swimat might be helpful.

vBoykoGit commented 4 years ago

Yeah, we do. swimat -r or find . -name *.swift | xargs swimat might be helpful.

It only formats files inside the current folder but not in the subfolders.

saagarjha commented 4 years ago

The former or the latter? I am fairly sure the second one should work since it's not our code doing path traversal…

Jintin commented 4 years ago

Do you guys think we should mention this in our README? After that I think we ok to close it?

vBoykoGit commented 4 years ago

Do you guys think we should mention this in our README? After that I think we ok to close it?

Absolutely, it would be very helpful.

Jintin commented 4 years ago

@vBoykoGit Just want to check again on the issue, does both way @saagarjha provide is working?

@saagarjha Seems you're the best people to update README on this part, would you like to help? I think both how to install and how to use is useful for most people.

saagarjha commented 4 years ago

Sure, I think adding a section describing command-line usage would probably be helpful; I'll write one.

vBoykoGit commented 4 years ago

I got

 % swimat -r                          
Finished formatting 0 files.

But there are swift files in the directory.

chenYtao commented 3 years ago

swimat -r
Finished formatting 0 files.

vBoykoGit commented 3 years ago

+++

Ehco1996 commented 3 years ago

in your project root dirctory

swimat -r .