December 19, 2017

When running static analysis there is a good chance of getting a false positive or simply allowed violation in this particular case. Most of the tools have a way to ignore violations by specifying a special annotation next to the code like this:

## no critic $foo = '';

The problem with this approach is that you have to change your code (even if it's just a comment) in order to "fix" it. Also sometimes it is desirable to ignore the violation just for some time until the company has resources to fix it correctly (pay their technical debt).

In Kritika from now on it is possible to "resolve" the violation without modifying your code. Next to the violation there is a special link "Resolve" and by clicking on it you will be presented with a form where you can specify the scope, precision and a comment why it is "resolved".

Resolution scope

The "resolution" of the violation can be done within the project or within this current file. Of course if you want to ignore the violation for the whole project it is better to just disable the violation in your Profile. But if you want to make this "resolution" temporary then go ahead and resolve it.

Resolution precision

The "resolution" of the violation can be content-oriented which means it will resolve the violations which are caused by exactly the same code. This code can be moved anywhere and it will be still "resolved". So the file change or code "tiding" will not affect the "resolution".

Resolution expiration

Most of the time you want to temporarily ignore the violation, but you don't want to forget to fix it later when time allows. By specifying expiration date this can be easily achieved.

Sign Up and try it yourself!