Permission Template Regexp not working


(Maciej Ptak) #1


Template for a good bug report:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension) SonarQube 6.7 (build 33306)

I have 2 templates for projects: first is default one without any regexp
Second one is “SFDC-Local*”

When I am creating new project project Keys are made like this “SFDC-Local:branch-name”
and they are not automatically assinged to second permission template.

May I know why it’s like this?

I have also checked options with ProjectKeys=“Sonar.Local:branch-name” and regexp=“Sonar.Local*” - that was also not working.


(G Ann Campbell) #2


You’re using bash regex, not “standard” regex. Try SFDC-Local.*


(Nicolas Bontoux) #3

Hi Maciej,

FYI, a useful tool whenever working with regex:

That allows you to validate your approach, independently of any specific tool (like SonarQube).

If we take your example here, we can see that the regex you mentioned does not yield a full match on the entire project key:

(Maciej Ptak) #4

Hi there,

You are right!
Sorry I was so used to bash then I forgot to check other options.

Thank you!