Skip to main content

All Questions

Tagged with
1 vote
1 answer
121 views

Sonar rule for interfaces only RSPEC-1213

I want to modify / make the rule target only public interfaces (not public classes etc). Is this possible ? Im using this rule in Java code but its too strict for my project and I would love to know ...
user2188158's user avatar
0 votes
1 answer
74 views

How can I define a cppdepend rule as code smell rule?

I created a new rule on cppdepend. My cdproj document included the new line as follows <Query Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView=&...
UserEsp's user avatar
  • 416
-1 votes
1 answer
2k views

How to write custom rule to prevent some method call in SonarQube?

Suppose i have one class A and it has three method met1,met2 and met3 i want to build a custom rule where if someone calls met3 it should throw some custom message showing as non compliant solution in ...
sameer kr bhardwaj's user avatar
1 vote
0 answers
763 views

SonarQube Java rule for checking debug/trace logging level

I'm trying to write a customized java rule to check if the debug/trace log levels are enabled. If the log level check has been forgotten, the rule should report an issue. import org.apache.juli....
Nik's user avatar
  • 11
2 votes
1 answer
1k views

SonarQube - Java - Force local variables to be effectively final

I am using SonarQube and i can't find any rule for Java that would report reassignment of local variables (optionally also method parameters or class fields, but not in setters of course), or, in ...
Kamil Bęben's user avatar
  • 1,162
1 vote
0 answers
131 views

How to create rule for method invocation

I'm creating a rule to check if two methods get invoked. It will get non-compliant if sendRedirect() method gets invoked after the getParameter() method. String location = req.getParameter("url"); ...
Joshua Jetomo's user avatar
0 votes
1 answer
500 views

how to create rule (HTTP request redirections should not be open to forging attacks - RSPEC-5146) java plugin

The rule is only available in commercial and I would like to create a custom rule about HTTP request directions Code below is the compliant and non-compliant protected void doGet(...
Joshua Jetomo's user avatar
3 votes
1 answer
809 views

What do I missed to apply for sonarqube custom rules using fxcop?

I want to apply for my own sonarqube custom rule using fxcop. SonarScan succeeded with MSBuild, but sonarqube did not reflect the rule! I referenced this url - https://github.com/DanielHWe/sonar-...
Steve Kim's user avatar
1 vote
1 answer
49 views

Using operator 'and' or 'or' to check if elements exists

I'm a newbie on XPath. I discovered XPath because I need to make rules to SonarQube to analize my PL/SQL code. I'm trying to check if the where clause contains some of these operators: !=, <>. ...
Welton Leão Machado's user avatar
0 votes
1 answer
138 views

Same profile SonarQube ignore some rules in the new instance

I face an issue, if you can guide me please, I have exported a QualityProfile "Sonar way" from an instance SonarQube Version 6.5 (build 27846) - LGPL v3 to be imported in the same version. The ...
Hatim's user avatar
  • 1,156
0 votes
1 answer
1k views

how to scan java properties file in sonarqube [closed]

I am writing custom rules using SonarQube to scan properties and config files. Can you please guide me how to write this custom code.
sorab's user avatar
  • 341
1 vote
0 answers
275 views

How to create custom rules for html in SonarQube?

I need to add some custom rule for html into sonarqube 6.4 Thanks to suggest me some custom html plugin if already available or you can suggest me how can i create custom plugin for html.
Jogani Hiren's user avatar
2 votes
0 answers
105 views

Exclude specific rules SonarQube

Is it possible to exclude all of "SonarQube community edition server" rules except OWASP related ones?
nikolas's user avatar
  • 37
2 votes
0 answers
74 views

Rule Sonar to respect tree structure project

I'm starting working with Sonar to validate my mobile projects and now i'm learning about custom rules. I'm trying create a rule to check if the path of file is correctly.. Its is possible? ...
Caio Sanchez Christino's user avatar
1 vote
1 answer
1k views

How to get value of a variable in SonarQube (custom-rules )?

I started working on sonar custom-rule recently so I am new to it. While programming I was not able to access the value of a variable. .g. Consider this simple example // Input program file public ...
R-Coder's user avatar
  • 11

15 30 50 per page