Error on parsing file .flow files

Hello,
I’m trying to scan the whole project containing different languages (html, css, js, xml, flow, dockerfiles).

When running the SonarQubeAnalyze@7 task in Azure Pipeline, the analysis works correctly until it reaches the .flow files, indicating a parsing error. However, after verification, the flow-files are valid and contain no syntax errors. It should be noted that .flow files are of the XML type.

Please view the file attached to this topic: pipeline.log (2.9 KB)

  • Enterprise Edition v10.7 (96327)
  • Run Code Analysis task v7.1.1

I was not able to find an answer in the Community :

Hi,

Welcome to the community!

Would you be able to provide a reproducer .flow file?

 
Thx,
Ann

Hello! Here is an example.
Cases.flow.txt (2.3 KB)
Consider to rename the file by removing the .txt extension. You can also try to use any valid XML file with .flow extension.
In the meantime, I think I know why this error occurs. It’s because the ABAP Sensor (which by default processes .abap, .ab4, .flow or .asprog) is detecting syntax errors.
So in the project settings, I removed .flow from the ABAP and added it to the XML suffixes.

I will also try to override Global properties by Analysis / Command line parameters

      - task: SonarQubePrepare@7
        displayName: 'SonarQube: Prepare analysis'
        inputs:
          SonarQube: 'SonarQube-ServiceConnection'
          scannerMode: CLI
          extraProperties: |
            sonar.sources=src/
            sonar.projectKey=myproject
            sonar.projectVersion=$(Build.BuildNumber)
            sonar.lang.patterns.xml=**/*.xml,**/*.xsd,**/*.xsl,**/*.config,**/*.flow
            sonar.lang.patterns.apex=**/*.abap,**/*.ab4,**/*.asprog

Hi,

Thanks for the sample file! I’ve flagged this for the language experts.

 
Ann

Hello @Aslan,

Thanks for reaching out, and following up with the progress of your investigation.

As you correctly identified, it seems there is competition for the .flow extension. Currently, the default setup considers them to be Abap files, ending up in parsing failures.

The solution is indeed to update the configuration, to remove it from Abap, and adding it to XML.

A good way to go could be to update the configuration in the administration part of the server.

Cheers,
Quentin

2 Likes