Collision between Flow and SonarXML for file extension *.xml

Both Flow and SonarXML plugin scans for xml file extensions.

While scanning Webmethods code , getting the below error due to collision

ERROR: Language of file ‘AH_002004_Pub_NASA/ns/ah_002004_pub_nasa/v01/changeHistory/flow.xml’ can not be decided as the file matches patterns of both sonar.lang.patterns.xml : /*.xml,/.xsd,**/.xsl and sonar.lang.patterns.flow : /*.xml,/*.ndf

Any suggestion on how to select a particular plugin

Sonar version - * Developer Edition

  • Version 8.1 (build 31237)
    Plugins - Flow and SonarXML


No idea about the Flow Plugin, but for XML you can definitely adjust the file suffixes. Checkout the project-level Administration > Languages > XML.

Thanks for the reply Colin

Yeah this is one way I can fix this. But the SonarQube we are using is an Enterprise one right now and is being used by multiple projects at the same time.

So if I change the extension for the other rule, it will affect all other projects using that rule

Is there any way in Sonar, we can keep two rules with same extensions in parallel and select the rules/quality profiles based on projects we are scanning.Like for example mentioning the rule/quality profile in te file.

This will be helpful for us.

@nilave , @colinbrown seems to have provided a solution in this post.