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

Add support to disable particular rules via extension property #280

Merged
merged 2 commits into from
Sep 12, 2019

Conversation

Tapchicoma
Copy link
Collaborator

Closes #267.

@Tapchicoma Tapchicoma changed the title Add disabled rules Add support to disable particular rules via extension property Sep 10, 2019
@@ -147,6 +150,12 @@ abstract class BaseKtlintCheckTask(
enabledReports
.map { it.asArgument() }
.forEach { argsWriter.println(it) }
disabledRules
.get()
.fold("") { acc, rule -> "$acc,$rule" }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want joinToString or something here. You can pass a seperator.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right! Totally forgot about it 🤦‍♂️

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in force-pushed update.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
@JLLeitschuh
Copy link
Owner

Formatting violation:
https://travis-ci.org/JLLeitschuh/ktlint-gradle/builds/583185013#L1258-L1259

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
Copy link
Owner

@JLLeitschuh JLLeitschuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Tapchicoma Tapchicoma merged commit cf5cfac into JLLeitschuh:master Sep 12, 2019
@Tapchicoma Tapchicoma deleted the add-disabled-rules branch September 12, 2019 07:37
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

Successfully merging this pull request may close these issues.

Support --disabled_rules
2 participants