The blame-notifier utility is meant for automating the process of notifying developers who have committed the code in the repository for which the PVS-Studio analyzer has issued warnings. The analyzer report is passed to the blame-notifier with specification of additional parameters; the utility finds files that triggered warnings and generates an HTML-report for each "guilty" developer. It is also possible to send a full report: it will contain all warnings related to each "guilty" developer.
The blame-notifier utility is available only if you have an Enterprise license. To order the license, please, write to us.
Note. The utility's name differs under different platforms. Under Windows it has the name BlameNotifier.exe, under Linux and macOS - blame-notifier. If we aren't talking about the utility for a specific OS, the name "blame-notifier" is used to avoid duplication in this document.
The blame-notifier utility on Linux and macOS requires .NET Core Runtime 3.1.
The BlameNotifier utility can be found in the PVS-Studio installation directory ("C:\Program Files (x86)\PVS-Studio\" by default).
For debian-based systems:
wget -q -O - https://files.viva64.com/etc/pubkey.txt | \
sudo apt-key add -
sudo wget -O /etc/apt/sources.list.d/viva64.list \
https://files.viva64.com/etc/viva64.list
sudo apt-get update
sudo apt-get install blame-notifier
For yum-based systems:
wget -O /etc/yum.repos.d/viva64.repo \
https://files.viva64.com/etc/viva64.repo
yum update
yum install blame-notifier
For zypper-based systems:
wget -q -O /tmp/viva64.key https://files.viva64.com/etc/pubkey.txt
sudo rpm --import /tmp/viva64.key
sudo zypper ar -f https://files.viva64.com/rpm viva64
sudo zypper update
sudo zypper install blame-notifier
Installation:
brew install viva64/pvs-studio/blame-notifier
Update:
brew upgrade blame-notifier
Use the "--help" flag to display basic information about the utility:
blame-notifier --help
An example of using the blame-notifier utility (in one line):
blame-notifier path/to/PVS-Studio.log
--VCS Git
--recipientsList recipients.txt
--server ... --sender ... --login ... --password ...
Here's a quick description of the utility's parameters:
When using the utility, at least one of the flags, via which the list of reports recipients is set, has to be specified: '--recipientsList' or '--vcsBasedRecipientsList'.
If necessary, these flags can be used jointly.
File format with a list of report recipients:
# Recipients of the full report
username_1 *email_1
...
username_N *email_N
# Recipients of individually assigned warnings
username_1 email_1
...
username_N email_N
You can comment on the line with the symbol "#". For full report recipients, you need to add the "*" symbol at the beginning or end of an email address. The full report will include all warnings sorted by developers.
The filtering masks look like this: MessageType:MessageLevels.
"MessageType" can take one of the following values: GA, OP, 64, CS, MISRA, Fail.
"MessageLevels" can take a value of 1 to 3.
A combination of different masks through ";" is possible (without spaces), for example:
--analyzer=GA:1,2;64:1
In this case, general-analysis warnings (GA) of 1 and 2 levels, and 64-bit warnings of the 1 level will be handled.