Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autocorrect reformat indent tab vs space #1327

Closed
ghost opened this issue Feb 21, 2017 · 3 comments
Closed

autocorrect reformat indent tab vs space #1327

ghost opened this issue Feb 21, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Feb 21, 2017

I'm running swiftlint autocorrect --format to reformat the Swift files. But the linter was indenting using space while I'm using tab. Reading the source code I found the linter useTabs: false in the AutoCorrectCommand. But I don't know how to make that useTabs: true without cloning and recompile the code.

Is there any way user could change the useTabs in the autocorrect format config?

Thanks!

@jpsim
Copy link
Collaborator

jpsim commented Mar 10, 2017

SwiftLint doesn't yet expose a way to format with tabs rather than spaces, but you could make a PR to add that option to AutoCorrectOptions: https://github.com/realm/SwiftLint/blob/master/Source/swiftlint/Commands/AutoCorrectCommand.swift

I'd be happy to review that.

@codytwinton
Copy link
Contributor

codytwinton commented Jun 8, 2017

@jpsim Would this be added as a stand alone option for autocorrect, or would this be a child option of the --format option? Since using tabs over spaces requires the use of the --format option, I would think it'd make sense for a child command.

If so, how can a child option be added to --format?

@marcelofabri
Copy link
Collaborator

Closed by @codytwinton in #1613 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants