规则2.3:一个项目不包含未使用的Typedef声明
“ 规则2.3:一个项目不包含未使用的Typedef声明:如果声明但未使用类型,那么对于审阅者而言,如果类型是多余的,则尚不清楚它是错误的。 “ 通过AutoSar在MATLAB SIMULINK中生成代码后,我使用Misra规则检查和Polyspace代码供供供您检查生成的代码。 Misra是否可以从列表中删除RTE .H文件并检查其余库和代码? (我不想检查rte.h文件。但是如何?)
"Rule 2.3: A project shall not contains unused typedef declarations: If a type is declared but not used, then it is unclear to a reviewer if the type is redundant or it has been left unused by mistake."
After generating code in matlab simulink via AUTOSAR, I use Misra rule check and Polyspace code prover to check the generated code. Is there a way for Misra to remove the RTE .h file from its list and check the rest of the libraries and code? (I do not want to MISRA check the RTE.h file. but how ??)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这通常是特定于工具的活动...
根据工具,您可以指定该文件未检查,或在文件中包含适当的注释以关闭特定的指南检查。
另外,按照规则2.3是咨询,根据Misra合规性,您可以不赞成单个文件或更一般的文件。同样,这将在您的工具中实现。
我可以在一个特定工具上提供指导(请参阅个人资料),但是如果手册没有帮助,最好与供应商交谈。
顺便说一句:
请参阅隶属关系的配置文件。
This is typically a tool-specific activity...
Depending on the tool, you can specify that file to be not checked, or include appropriate annotations in the file to switch off specific guideline checks.
Also, as Rule 2.3 is Advisory, in accordance with MISRA Compliance, you can Disapply it (with justification) either for a single file or more generally. Again, that would be implemented within your tool.
I can give guidance on one particular tool (see profile), but you're better talking with your vendor, if the manual is not helpful.
As an aside:
See profile for affiliation.