Hi Bert, I tried to locate the attachment but could not find it. I don´t know if it was blocked or something but it was not in the last email.

I´m on traveling foot this week but after looking over the comments you sent things can definitely be simplified. The remap to new rules will be much easier with you suggested approach of concatenating Pc-lint id and MISRA rule id.

Thanks a lot for your time guys I have learnt a lot! Really appreciate it.

Regards
Johan

From: Bert [mailto:notifications@github.com]
Sent: den 20 maj 2013 11:16
To: SonarCommunity/sonar-cxx
Cc: Esbjörner Johan
Subject: Re: [sonar-cxx] Remap Pc-lint MISRA 2004 rules into unique Sonar rules. (#30)


In sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/pclint/CxxPCLintSensor.java:

>            && !StringUtils.isEmpty(id) && !StringUtils.isEmpty(msg);

>        }

> +

> +            /**

> +            Removes the dot in the rule number and adds a big offset

> +            to make sure the key ID is not already used by other PC-lint rules.

> +            **/

> +            private String mapMisraRulesToUniqueSonarRules(String msg){

The rule key and configkey attributes are strings and therefore it is not necessary to use numbers for it. I used the numbers for PCLint because it is defined this way in http://www.gimpel.com/html/pub90/msg.txt.

For the MISRA 2004 rules the notation dd.dd and for MICSRA C++ 2008 dd-dd-dd is also fine.
Did you see the attachment from my former e-mail - sorry I did not use github to pulish it.

I feel using offset for this rules shall be avoided.

—
Reply to this email directly or view it on GitHub<https://github.com/SonarCommunity/sonar-cxx/pull/30/files#r4294073>.
The information contained in this e-mail message is privileged and
confidential and is for the exclusive use of the addressee. The person
who receives this message and who is not the addressee, one of his
employees or an agent entitled to hand it over to the addressee, is
informed that he may not use, disclose or reproduce the contents
thereof, and is kindly asked to notify the sender and delete the e-mail
immediately.