https://kotlinlang.org logo
#android
Title
# android
j

James Coggan

11/17/2017, 9:53 PM
@spirosoik worked fine on our system, we also implemented Deteck for Kotlin static analysis
s

spirosoik

11/18/2017, 9:27 AM
@James Coggan could you give me some more details? Eg. how did you exclude kotlin to not run with findbugs? for example in our case we have a java
domain
module and this is the only part which seems to fail
btw @James Coggan does detekt works good for you? Any feedback?
j

James Coggan

11/18/2017, 10:58 AM
it works ok, it doesnt detect as much as PMD+checksyle+findbugs
for findBugs we did this:
Copy code
findbugs {
    excludeFilter = rootProject.file('static-analysis/findbugs-rules/exclude.xml')
    exclude testSources
    includeVariants onlyDebugVariant
  }
and this is our exclude file:
Copy code
<FindBugsFilter>

  <Match>
    <Or>
      <Class name="~.*\.R\$.*" />
      <Class name="~.*Test" />
      <Class name="~.*\.Manifest\$.*" />
      <Source name="~.*kt" />
    </Or>
  </Match>

  <!-- Ignore Butterknife bind views -->
  <Match>
    <Class name="~.*Displayer" />
    <Bug pattern="UR_UNINIT_READ" />
  </Match>

  <Match>
    <Bug pattern="SE_NO_SERIALVERSIONID" />
  </Match>

</FindBugsFilter>
as you can see it has the
~.*kt
in there
s

spirosoik

11/18/2017, 11:53 AM
yes I see we have the same
Finally I made it work James. thanks for helping.
j

James Coggan

11/18/2017, 5:55 PM
amazing