0

Is there any way to bypass the rule

"Rename this method to match the regular expression: [A-Z][a-zA-Z0-9]++"

for the Global.asax.cs, specifically for the for the Application_ methods/events? We don't want to minimize the amount of files that are skipped completely.

public class MvcApplication : System.Web.HttpApplication
{
    protected void Application_Start()
    {
timmkrause
  • 3,367
  • 4
  • 32
  • 59

1 Answers1

1

You can define a narrow exclusion pattern for this rule on this exact file, please follow instruction in SonarQube's manual.

Mithfindel
  • 4,553
  • 1
  • 23
  • 32
  • Thanks! So as close as I can get is the file level, right? It is not possible to exclude specific patterns inside the file except ignoring them inline via using the ignoring start and end blocks. – timmkrause Apr 24 '15 at 06:17
  • Unfortunately Sonar does not accept my pattern(s). Ruley key pattern: squid:S00100 / File path pattern: **/Global.asax.cs. I also tried **/**/Global.asax.cs as a file pattern. – timmkrause Apr 24 '15 at 10:09