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
rx2130 opened this Issue Feb 21, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@rx2130

rx2130 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

This comment has been minimized.

Show comment
Hide comment
@jpsim

jpsim Mar 10, 2017

Collaborator

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.

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.

@jpsim jpsim added the enhancement label Mar 10, 2017

@codytwinton

This comment has been minimized.

Show comment
Hide comment
@codytwinton

codytwinton Jun 8, 2017

Contributor

@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?

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

This comment has been minimized.

Show comment
Hide comment
@marcelofabri

marcelofabri Jul 15, 2017

Collaborator

Closed by @codytwinton in #1613 🎉

Collaborator

marcelofabri commented Jul 15, 2017

Closed by @codytwinton in #1613 🎉

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