-
Notifications
You must be signed in to change notification settings - Fork 507
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
Disabling default patterns if the option --patterns-from-stdin
is given
#1801
Disabling default patterns if the option --patterns-from-stdin
is given
#1801
Conversation
Instead, they will now only be added in `FileUtils.fileSequence()`. Better anyway to only add them in one place so it's easier to keep track of it and have a better overview.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tnx for your contribution. Please address the review remarks.
ktlint/src/main/kotlin/com/pinterest/ktlint/internal/KtlintCommandLine.kt
Show resolved
Hide resolved
ktlint/src/main/kotlin/com/pinterest/ktlint/internal/KtlintCommandLine.kt
Show resolved
Hide resolved
ktlint/src/main/kotlin/com/pinterest/ktlint/internal/FileUtils.kt
Outdated
Show resolved
Hide resolved
…lt-patterns-if-read-patterns-from-stdin' into pr/1801 # Conflicts: # CHANGELOG.md # ktlint/src/main/kotlin/com/pinterest/ktlint/internal/FileUtils.kt # ktlint/src/main/kotlin/com/pinterest/ktlint/internal/KtlintCommandLine.kt # ktlint/src/test/kotlin/com/pinterest/ktlint/SimpleCLITest.kt
…terns are now specified via the "patterns" parameter when needed.
This didn't work out as I expected. There is no need for the fileSequence to receive two different lists of patterns. I have modified your solution. Can you have a look at my changes? |
Yes, to be honest I also didn't like that solution, I just didn't know how to properly change I'd say like this it's ready to be merged. |
Merged. Tnx for the collaboration. |
Description
Simple change to not add the default patterns if the CLI option
--patterns-from-stdin
is given.This PR fixes issue #1793.
Checklist
CHANGELOG.md
is updated