detekt/detekt

Detekt-cli Scan report based on baseline is inaccurate

Aperta

#4234 aperta il 5 nov 2021

 (9 commenti) (0 reazioni) (0 assegnatari)Kotlin (834 fork)batch import
bugformattinghelp wanted

Metriche repository

Star
 (6942 stelle)
Metriche merge PR
 (Merge medio 4g 9h) (65 PR mergiate in 30 g)

Descrizione

Expected Behavior

In my way ,I scan the base-code smells ,and apply the patch.diff in check workspace. And then generate report based on detekt-base.xml By expected,the Report should report the smells in correct diff lines

Observed Behavior

When the patch has new lines or delete lines,the diff reports is wrong,because the line numbers of smells in detekt-base.xml has already changed

Steps to Reproduce

  1. Scan to generate detekt-base.xml
  2. modify the code by add or delete some lines
  3. scan to generate report based on detekt-base.xml

Context

This problem make incremental scan reports inaccurate

Your Environment

  • Version of detekt used: v1.18.1
  • Version of Gradle used (if applicable): Gradle 6.7.1
  • Gradle scan link (add --scan option when running the gradle task):
  • Operating System and version: Ubuntu 16.04
  • Link to your project (if it's a public repository):

Guida contributor