Swiftformat: --exclude doesn't work with relative directory

Created on 13 Apr 2021  路  2Comments  路  Source: nicklockwood/SwiftFormat

I may be missing the obvious here, but commands like this wouldn't work for me:

swiftformat ../../../MyProject/ --exclude ../../../MyProject/Pods/ --lint

While this works:

swiftformat ../../../MyProject/ --exclude ~/prj/ios/MyProject/Pods/ --lint

I'm pretty sure I didn't make any human error here, as ls ../../../MyProject gives me the expected result. I can't see it from the open issues; could anyone confirm if it's a real issue please? I'm on 0.47.12 68cac6de69aafb44b60ae49a919600966b0dcabe.

bug fixed in develop

All 2 comments

@superarts this looks like a bug - paths containing ../ aren't correct matched. I'll fix it asap.

Thanks! I am using a combination of pwd and NSString's standardizingPath as a workaround.

Was this page helpful?
0 / 5 - 0 ratings