linear-b / gitstream

/:\ gitStream - Workflow automation for your git repo. Use YAML to auto-assign reviewers, auto-merge PRs, automatic PR labeler, and more.
https://gitstream.cm
Apache License 2.0
245 stars 28 forks source link

Detect formatting-only changes in JVM languages with `isFormattingChange` #482

Open tresat opened 2 months ago

tresat commented 2 months ago

Is your feature request related to a problem? Please describe. I'd like gitStream to properly detect formatting-only changes (whitespace, indentation fixes, etc.) to JVM language files like Java, Kotlin, Groovy. The check is currently limited to only a few languages as described here https://docs.gitstream.cm/filter-functions/#isformattingchange.

Describe the solution you'd like isFormattingChange to support JVM languages.

Describe alternatives you've considered Dropping this automation from our project.

Additional context Perhaps the minifier used for Android could be used to implement this: https://www.guardsquare.com/proguard?

BenLloydPearson commented 2 months ago

Thanks for the suggestion! This is a great idea and is something that we want to do for a wide range of languages.

However, the challenge is that we have to implement a new engine to check this for each language. We solved Python and JavaScript first because that's what gitStream is built with so we didn't have to make major changes to support them.

I'll update this issue with any further details we have about supporting new languages with isFormattingChange.