Selective feedback
Do not apply coloring and hampering equally to all functions. Exclude (or include) functions explicitly by through regular expressions.
A reg ex can be applied to the fully qualified name of a function (ie. including namespaces):
{ namespace { "." namespace } "." } classname "." functionname, e.g. myapp.mymodule.myclass.myfunction
Or the reg ex can be applied to the file path of the source code file:
"/" { foldername { "/" foldername } "/" } filename, e.g. /mysln/myproj/myfolder/myfile.cs
Using such patterns e.g. test code can be excluded from the feedback. Or code in legacy modules can be excluded.
Inclusin/exclusion patterns can be registered in the config file, e.g.
{
"groups": [
{
"excludeModules": "test_[[:alnum:]]*\.[[:alnum:]]*$", // alle Funktionen in Klassen, die mit "test_" beginnen
"excludeFiles": "Tests\.cs", // alle Funktionen in Dateien, die auf "Tests.cs" enden
"methodTooLongLimits": [
{
"lines": 5,
...
},
...
]
},
...
]
}
groups define functions to apply the same metrics to for feedback. There can be several groups in each config.