Which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
I am using Sonarqube * Enterprise Edition * Version 8.9.3 (build 48735)
What are you trying to achieve
I am trying to add some our specific coding rule for C
Actually beside common rule as in Built-in rule of Cfamily plugin we need to add some specific rule to scan our source code. So I just have some below questions:
-
Is it possible to create/write new own rules and add to the built-in rule or we can ask someone for helping us to do that
-
In case possible please let me know steps to do that
I would like to give you an example to help you understand better my mean.
Below example I want my function should return our internal defined return value my_status_t instead of normal return value true/false
// Don't do:
bool do_something()
{
my_status_t my_status;
// [...]
my_status = do_anything(var);
// [...]
if (my_status == STATUS_OK) {
return true;
} else {
return false;
}
}
// Instead do:
my_status_t do_something()
{
my_status_t my_status;
// [...]
my_status = do_anything(var);
// [...]
return my_status;
}
Thank you !