square / cycler

Apache License 2.0
791 stars 27 forks source link

Add ktlint #37

Closed helios175 closed 3 years ago

helios175 commented 4 years ago

If your other workflow is running build, that's already running ktlint, assuming your gradle build has ktlint configured (which it probably should). What does this action do that running it from Gradle doesn't?

I didn't realize it was included there. I'll check if it's properly working. Also this thing adds the comments/warnings to the PR so it's a nice visualization. But I wasn't sure if we have a preference on how to run ktlint or how to visualize it.

helios175 commented 4 years ago

Indeed: there's no ktlint included in the other build. I can add it (although I'm afraid it'll will throw a long bunch of warnings).

zach-klippenstein commented 4 years ago

Warnings is its job, if it's giving warnings they should be fixed. And you will want to turn on "errors as warnings" as well to ensure that they fail CI. See radiography or workflow-kotlin for examples.

helios175 commented 3 years ago

Closing. Another PR will first add standard ktlint (running as part of the build) and outputting the results in text.