I started a fork of Compose Rules

After leaving Twitter, and given there was nobody left on the Android team with access to the twitter/compose-rules repository to make changes or approve anything (and the current team isn't likely to continue with it), I decided to continue working on the project as I was before, but this time in my own fork inside of my own GitHub account.

GitHub - mrmans0n/compose-rules: Static checks to aid with a healthy adoption of Compose. Maintained fork of the Twitter Compose rules.
Static checks to aid with a healthy adoption of Compose. Maintained fork of the Twitter Compose rules. - GitHub - mrmans0n/compose-rules: Static checks to aid with a healthy adoption of Compose. Ma…

I do the same as I did before, basically lead the project, but now it's not tied to any corporation. It'll keep being updated for new detekt and ktlint vestions, new rules will be added, bug fixes will be made, etc. You know the gist, the project will live on, just under a new roof.

And how do I migrate my project?

The process to migrate to these rules coming from the Twitter ones is simple.

1. Change the project coordinates in your gradle build scripts

For Detekt, com.twitter.compose.rules:detekt:$version becomes io.nlopez.compose.rules:detekt:$version

For Ktlint, com.twitter.compose.rules:ktlint:$version becomes io.nlopez.compose.rules:ktlint:$version.

2. Update $version to the latest

The most current version is shown by this image (which takes the data from maven central):

Alternatively, you can see the current version in the project releases page.

3. If you are using Detekt:

You have to update the config file (e.g. detekt.yml) so that the rule set name TwitterCompose becomes Compose instead. Keep in mind that there are a lot of new rules in this repo that weren't in Twitter's, so you'd be better copying over from the example configuration.

4. You're done!

It should all work the same, but with more rules and the existing ones should work better / be more precise.