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

chore: add ktlint in Travis #640

Closed
wants to merge 4 commits into from
Closed

Conversation

nikit19
Copy link
Member

@nikit19 nikit19 commented Oct 14, 2018

Fixes #639

@nikit19 nikit19 force-pushed the ktlint branch 3 times, most recently from c06f48a to 478e503 Compare October 14, 2018 11:07
@nikit19
Copy link
Member Author

nikit19 commented Oct 14, 2018

@iamareebjamal Please review

@iamareebjamal
Copy link
Member

Don't disable the wildcard imports check, we'll fix it in upcoming commits

@nikit19
Copy link
Member Author

nikit19 commented Oct 14, 2018

@iamareebjamal updated. Please revie

app/build.gradle Outdated
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.github.shyiko.ktlint.Main"
args "src/**/*.kt"
Copy link
Member

Choose a reason for hiding this comment

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

Add --android before src

app/build.gradle Outdated
description = "Fix Kotlin code style deviations."
main = "com.github.shyiko.ktlint.Main"
classpath = configurations.ktlint
args "-F", "src/**/*.kt"
Copy link
Member

Choose a reason for hiding this comment

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

Same here

@nikit19
Copy link
Member Author

nikit19 commented Oct 14, 2018

Updated

app/build.gradle Outdated
@@ -137,12 +137,12 @@ task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.github.shyiko.ktlint.Main"
args "src/**/*.kt"
args "--androidsrc/**/*.kt"
Copy link
Member

Choose a reason for hiding this comment

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

There should be a space after android

Try running this locally

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated. The task keeps running, it never completes

@iamareebjamal
Copy link
Member

Build is failing

@nikit19
Copy link
Member Author

nikit19 commented Oct 16, 2018

@iamareebjamal yes it will fail. As far as I know only way of making the build pass is adding those comments for wildcard imports. This is a bug in the library that has still not been solved
pinterest/ktlint#48

Do you know any other alternative ?

@iamareebjamal
Copy link
Member

OK, will see

@iamareebjamal
Copy link
Member

Superseded by #769

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.

2 participants