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

Support list of files as argument #810

Closed
gzfrancisco opened this issue Sep 8, 2016 · 4 comments
Closed

Support list of files as argument #810

gzfrancisco opened this issue Sep 8, 2016 · 4 comments
Labels
enhancement Ideas for improvements of existing features and rules.

Comments

@gzfrancisco
Copy link

I think the tool can be improved if the command can take a list of files so we can check only those files.

We can do something like:

$ swiftlint MyClass.swift AnotherClass.swift script.swift
@jpsim jpsim added the enhancement Ideas for improvements of existing features and rules. label Nov 24, 2016
@jpsim
Copy link
Collaborator

jpsim commented Nov 24, 2016

That would indeed be nice. This could be done with Commandant by using an Argument option, which would look like this:

$ swiftlint lint -- MyClass.swift AnotherClass.swift script.swift

@benasher44
Copy link
Contributor

I've started working on this in an effort to make SwiftLint work with pre-commit as part of pre-commit/pre-commit#451. I'm making decent progress, but I have a question/issue. What does rootPath mean in the context of multiple paths? Would the current working directory suffice if more than one path is specified, or would it be more appropriate to calculate nearest common ancestor of all of the paths? It seems like the latter would be better. Thoughts?

@PH9
Copy link

PH9 commented Dec 2, 2018

Is this should be close issue. It is already merged

@benasher44
Copy link
Contributor

benasher44 commented Dec 2, 2018

Ah yep this is merged. I don’t have permissions to close this though.

@jpsim jpsim closed this as completed Dec 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ideas for improvements of existing features and rules.
Projects
None yet
Development

No branches or pull requests

4 participants