Adding mergerules command to generate a merged rule file for Clang rules#2382
Adding mergerules command to generate a merged rule file for Clang rules#2382guwirth merged 1 commit intoSonarOpenCommunity:masterfrom
Conversation
|
Hi @aallrd, thanks for your contribution, I will have a look to it. Regards, |
|
The automated reading and creation of new rule files cannot be fully automated. Manual corrections are often necessary for the final version of the rule files. The automatically created file "clangtidy_merged.xml" can therefore probably not be used 1:1. @aallrd Or what experience have you made? |
|
I compared the list of clangtidy rules (keys) from three files:
Here is the diff of rules between the 2.0.7.3119 release JAR and my clangtidy_merged.xml: The added misc and modernize are expected because we kept them in our LLVM/Clang fork while they are gone upstream. From this comparison I would say the function did a correct job merging the files and created a valid and suitable clangtidy_merged.xml for production. What are the manual corrections you are doing on your side on the clangtidy.xml file? |
|
@aallrd in the past I had to adapt some keys and descriptions manually after creating xml files from a new Clang version. After executing your script and comparing the result with clangtidy.xml you should see the differences. Your script extension is definitely an improvement and I will merge it. Thanks again for that! |
Hello,
I would like to contribute this
mergerulesfunction used to create a clangtidy_merged.xml file merging the output of the generate_clangtidy_resources script:It was mentioned in #2378 that this process was manual and I needed a way to have it automated.
This change is