Lint Step Setup


I want to run only a few specific lint check before building and signing my app. If lint found an error everything should fail.

I added an additional lintOptions section to my app/build.gradle but it seems to be ignored

lintOptions {
check ‘StringFormatCount’, ‘StringFormatInvalid’, ‘StringFormatMatches’
checkReleaseBuilds true
xmlReport false
abortOnError true

If I run ./gradlew app:lintProductionRelease on my local machine everything works as expected, but not on bitrise.
Is there any way to only run these 3 checks and abort if there are errors?

Thanks a lot

no one can help ??

How are running lint on bitrise (using which step)?
IMHO the easiest way to achieve the same results as locally is to use Gradle Runner step and specify app:lintProductionRelease in its gradle_task input .

Hi @koral ,

I tried two ways:

  1. gradle_task exactly as i run it on my local machine
  2. lint_task

I want to achive, that

  1. only specific lint rules are checked
  2. that the build fails if lint detect errors

Thanks a lot

Hi @mgursch!

Unfortunately, the existing Lint step would not allow you for this kind of flexibility. Feel free to fork the step and bend it to your use case! :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.