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

Baseline (for big old projects) #220

Closed
aleien opened this issue Jun 4, 2018 · 4 comments
Closed

Baseline (for big old projects) #220

aleien opened this issue Jun 4, 2018 · 4 comments

Comments

@aleien
Copy link

aleien commented Jun 4, 2018

Hello (:

Is it possible to generate baseline file (list all current issues as ignored and only perform check on new ones)? Or should we use script to get list of changes and run ktlint on them using "args"?
Also is there any limit on how many paths could be listed in "args"?

Thank you in advance.

@shyiko
Copy link
Collaborator

shyiko commented Jun 4, 2018

Is it possible to generate baseline file (list all current issues as ignored and only perform check on new ones)?

no

Or should we use script to get list of changes and run ktlint on them using "args"? Also is there any limit on how many paths could be listed in "args"?

cd project-dir/
ktlint -F # auto-correct

@aleien
Copy link
Author

aleien commented Jun 5, 2018

Thanks for fast response.
Yeah, I understand that you can autocorrect everything at once (: But if you have big project with 10 developers working on it at once it usually will be difficult to merge these changes.

If I write script that will list me all file paths that were changed in one pull-request, can I provide these paths to ktlint? Is there any limit for how much explicit paths can I give ktlint to analyze?

@shyiko
Copy link
Collaborator

shyiko commented Jun 5, 2018

Sure. To my knowledge, there is no limit other than OS-specific "max length of args" (e.g. getconf ARG_MAX on *nix) (additional shell-specific restrictions might apply).

@shyiko shyiko closed this as completed Jun 5, 2018
@amrfarid140
Copy link

amrfarid140 commented Jan 21, 2021

Looks like this got added after all #707

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

No branches or pull requests

3 participants