Closed leojosefm closed 6 years ago
Hi. This is a solvable problem as I’m doing exactly this. I’m on mobile right now so this is a preliminary response. I’ll try to follow up later by clarifying this project’s readme.md and responding to Ann’s answer in this stackoverflow question:
The very end of Ann’s answer has the information that you seek. Sonarqube by default ignores files whose extensions aren’t named by any of its language plugins (text counts as a language). Typically each plugin’s global configuration page let’s you adjust the list of extensions that are assigned to it. Each unique file extension can be “owned” by at most 1 plugin BUT once any plugin names an extension Sonar quits excluding it from scans and all plugins then have the opportunity to include it in scans.
So you have two options:
I prefer this one for its predictability: A) Using the configuration webpage to configure the text plugin’s extension list to include both extensions.
B) Per Ann’s comment configure Sonarqube to include all files regardless of extension.
Hello, Thank you for the response. When creating the rule using template, there is a a column called "File pattern" . The default value was **/*.properties
which I did not notice. When I changed it to **/*.txt
, it worked. Seems like the issue is solved.
Regarding list of extension in configuration webpage, .txt and .properties are already present.
I have two files in the directory same content, one with .txt and one with .properties. I have a rule Simple Regex Match (\W\W\W\Wtab\sQDF). Ideally it should give 2 code smells 1 from each file. But only 1 bug from .properties is showing up