- 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 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Harsh
2025-6-6
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!