SonarQube 6.7.5 Not Indexing xml files starting with "." (Period)

Version 6.7.5 (build 38563)

SonarQube does not index xml files starting with “.” Example below. Not sure if there is a feature or a bug? It did pick up the .NAME.xml files previously.

13:37:48.202 DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl
13:37:48.209 DEBUG: Initializers :
13:37:48.211 INFO: Index files
13:37:48.214 INFO: Included sources:
13:37:48.214 INFO: *newname.xml
13:37:48.375 DEBUG: 'newname.xml' indexed with language 'xml'
13:37:49.163 INFO: 1 file indexed

13:38:17.090 DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl
13:38:17.098 DEBUG: Initializers :
13:38:17.100 INFO: Index files
13:38:17.102 INFO: Included sources:
13:38:17.103 INFO: *newname.xml
13:38:17.975 INFO: 0 files indexed

Any Help would be appreciated.


I’m guessing these are before and after log excerpts. But before and after what event?


The first one was using newname.xml, which was indexed. The second one was using .newname.xml, which was not indexed.

Both were just running SonarQube Scanner.

I think that is your question?


Previous to what?


In the previous version of BitBucket. We recently updated to the latest LTS version.

Hi George,

I confirm, I can reproduce with files of different languages, not only xml.
In debug mode, sonar-scanner does not report line “… indexed with language …” for all files starting with a ‘.

But it’s more a feature than a bug, there’s a filter in sonar-scanner file indexer:

So let’s challenge this feature: Why do you want to analyse files starting with a period? On Unix file systems, it means hidden files. Maintaining source code in hidden files seems to be a corner case, do you have a counterexample?

Thanks for clarifying the issue!

We are using SonarQube to scan Adobe AEM Projects/Code. These include many files starting with a period.

.content.xml is an example, .content.xml file is used by sling framework to understand the node type definition when it reads data from JCR. (This is specific to the Adobe Experience Manager CMS, or any use of a Java Content Repository - Jackrabbit as an example)

There are other files and we were using SonarQube to ensure the xml was valid. I am not sure how many it takes to make this a real case.