How do I add custom rules for data types separately?

3 ビュー (過去 30 日間)
Mounika
Mounika 2023 年 2 月 9 日
回答済み: Anirban 2023 年 2 月 10 日
Hello Team,
Instead of using typedef for declaring int /float/pointer , how Can I add custom rules for Int /float/pointer separately in the custom rules section . Also for Char datatype where Can I add custom rules?
  2 件のコメント
Jan
Jan 2023 年 2 月 9 日
At least I do not know, what you are talking about. Maybe it helps if you mention the topic or explain, what you try to do where with which tools.
the cyclist
the cyclist 2023 年 2 月 9 日
@Mounika, I just want to mention that there are very few questions about Polyspace in this forum, so this question might not get as many responses as questions about base MATLAB or more common toolboxes do.
You can always contact MathWorks support if you need to.

サインインしてコメントする。

回答 (1 件)

Anirban
Anirban 2023 年 2 月 10 日
Custom rules in the Type definitions category only apply to typedef-s. All typedef-s of integer types are flagged by a different rule from typedef-s of floating point types (rule 3.1 vs rule 3.2). In this sense, the custom rules are already separated. Can you give an example of what you would like to see?
If you want to simply flag basic types such as char, int, etc., there is a MISRA C:2012 directive for that, and a Polyspace Bug Finder checker to detect violations of this directive. Maybe this is what you want?

タグ

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by