Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-61607

Make number of context lines in FullTextFingerprint configurable

      Currently, fingerprinting of files in order to detect new warnings (see FullTextFingerprint) uses a constant of 3 lines above and below a warning (see FullTextFingerprint). It would be helpful to make this property configurable.

          [JENKINS-61607] Make number of context lines in FullTextFingerprint configurable

          Jayanth added a comment - - edited

          Hey i wanted to work on this issue but I am getting a bit confused navigating through the flow. Are these the right files (other than FullTexFingerprint) to look at to get started : ScanForIssuesStep , IssuesRecorder and IssuesScanner. Also i am using the devenv for setup and testing , do i need to make some extra configurations ? 

          Jayanth added a comment - - edited Hey i wanted to work on this issue but I am getting a bit confused navigating through the flow. Are these the right files (other than FullTexFingerprint) to look at to get started : ScanForIssuesStep  , IssuesRecorder  and IssuesScanner . Also i am using the devenv  for setup and testing , do i need to make some extra configurations ? 

          Ulli Hafner added a comment - - edited

          Thanks for taking care of this issue!

          There are three steps required for this feature:

          1. You need to create an additional constructor in the class FullTextFingerprint in the analysis-model project that takes the hard-coded value as an argument.  
          2. You need to look at the IssuesScanner class that instantiates the finger printer in the warnings plugin: Here you need to invoke the new constructor (line 368). 
          3. You need to provide the configuration of the value: we should provide a tool based configuration in ReportScanningTool
             

          Ulli Hafner added a comment - - edited Thanks for taking care of this issue! There are three steps required for this feature: You need to create an additional constructor in the class FullTextFingerprint in the analysis-model project that takes the hard-coded value as an argument.   You need to look at the IssuesScanner class that instantiates the finger printer in the warnings plugin: Here you need to invoke the new constructor (line 368).  You need to provide the configuration of the value: we should provide a tool based configuration in ReportScanningTool  

          Jayanth added a comment - - edited

          Im having issues with deploying the changed dependencies ( analysis-model ) . After changing the FullTextFingerprint class and running the go.sh script (using JDK 21) , the script successfully runs and the container starts normally. When i make changes to the warnings-ng-plugin module and update the POM.xml to target the new analysis-model.jar, the maven compiler plugin does not let me use my newly compiled .jar as it expects version 55 ( JDK 11 ). When i try compiling the analysis-model with JDK 11 it does not allow me to compile even if i skip the Enforcer and maven compiler plugin ( Error states that minimum JDK 17 is required ) creating a never ending cycle. I tried manipulating the .jars directly in the docker volume but then the fingerprinting has errors .

          Can you please guide me on how to resolve this ? Thank you!

          Jayanth added a comment - - edited Im having issues with deploying the changed dependencies ( analysis-model ) . After changing the FullTextFingerprint class and running the go.sh script (using JDK 21) , the script successfully runs and the container starts normally. When i make changes to the warnings-ng-plugin module and update the POM.xml to target the new analysis-model.jar, the maven compiler plugin does not let me use my newly compiled .jar as it expects version 55 ( JDK 11 ). When i try compiling the analysis-model with JDK 11 it does not allow me to compile even if i skip the Enforcer and maven compiler plugin ( Error states that minimum JDK 17 is required ) creating a never ending cycle. I tried manipulating the .jars directly in the docker volume but then the fingerprinting has errors . Can you please guide me on how to resolve this ? Thank you!

            jay_vts Jayanth
            drulli Ulli Hafner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: