- http://www.mathworks.com/help/codeprover/custom-coding-rules.html
- http://www.mathworks.com/help/codeprover/ug/contents-of-custom-coding-rules-file.html
Polyspace: different custom rules for variables depending other factors
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have been looking about the customization options that Polyspace offers regarding adding new rules, and I have seen that there is a possibility to add custom rules to check; for example, all global variables start with a capital letter.
This feels a little too limited for the scope of my project and I was wondering if there is a possibility to add different custom rules for variables depending on other factors, for example a rule that checks that the variable name starts with an "i" if the type is "int" and another rule that checks that the variable name starts with "u" if the type is "unsigned".
Thanks a lot!
0 commentaires
Réponse acceptée
Harsh
le 6 Juin 2025
I understand that you are looking to apply Polyspace custom naming rules based on variable type.
Currently, in the existing versions of Polyspace, it is not possible to detect a specified pattern only for a particular datatype, as you described. While some partial support exists (e.g., setting a pattern for all integer types), we cannot target a single, specific integer type.
This means that within our custom coding rules, we won't be able to differentiate between types like short and integer. For more details, please refer to the following:
I hope this helps, thanks!
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Run Settings dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!