Extension of cppcheck rules is possible by using [sonar instal dir]/extensions/rules/cppcheck. See Extending Rules in C++ Analysers on how to create the rules
<name>Buffer 'var' is being written before its old content has been used</name>
Buffer 'var' is being written before its old content has been used.
Just tell valgrind to generate XML output. The 'tool' option isn't necessary as 'memcheck' is the default one. Make sure the binaries contain debug info.