cloudstream icon indicating copy to clipboard operation
cloudstream copied to clipboard

Add linting to library

Open Luna712 opened this issue 1 month ago • 0 comments

This explicitly adds the com.android.lint plugin as well, but doesn't apply it in the library project, which means it does absolutely nothing right now. It was only added to simplify migration to new com.android.kotlin.multiplatform.library, which does require this explicitly or it won't be applied at all. When using that plugin alongside the android lint plugin, it also can apply linting to JVM and other KMP targets, which currently it can not do. In addition to that, this setups linting, fixing existing issues, and applying some basic rules in a lint.xml file.

By doing it like this (alongside what we do for the app module already), this will eventually allow us to failOnError, and setup our own custom declarations for what should fail a build and better apply it when making pull requests for example (plus would be testable and ensured it already passes when build passes locally).

It would allow us to better ensure we follow proper API support for example by failing if using an API not available on the minSdk without conditionals (the NewAPI lint) would help to better validate backward compatibility to the minSdk as well.

It could also ensure certain code standards beyond just what was mentioned.

Luna712 avatar Dec 05 '25 23:12 Luna712