<div dir="ltr">> I like the idea of adding an AUTOSAR module to clang-tidy!<div>Great to hear more positive impressions from the community!</div><div><br></div><div>> <span style="color:rgb(0,0,0)">I know of at least two projects which have</span><span style="color:rgb(0,0,0)"> some work done already</span></div><div><span style="color:rgb(0,0,0)">Thanks for the info. The Google SoC and Bareflank repos are the ones I referred to as "a couple of forks here and there", didn't know they are actually the same! I wonder how they dealt with the AUTOSAR license. Thanks for the video, very interesting talk. One point that was made there was that perhaps clang-tidy is not the best implementation choice - Clang and AST visitors are needed to implement the more complex rules. As a newbie I can't really comment on that, hopefully someone knows better? From a "design" point of view I think it fits better in clang-tidy together with the other coding guidelines.</span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">> </span>is there a reason why there are no ambitions to add another module for the MISRA guidelines?</div><div>I suppose nobody has brought it up yet? The current limitation of MISRA is that you need to actually buy the document, whereas AUTOSAR is publicly available. On the other hand, MISRA has a clear, established way forward regarding open-source checkers - you are allowed to mention the rule number, but not the complete rule text. This is mostly to make sure there is "one source of truth", instead of inaccurate reproductions. You can read more about it here: <a href="https://forum.misra.org.uk/thread-884.html">https://forum.misra.org.uk/thread-884.html</a></div><div><br></div><div>In theory (I haven't tried it myself) there's already MISRA support in an open-source checker - cppcheck: <a href="https://cppcheck.sourceforge.io/misra.php">https://cppcheck.sourceforge.io/misra.php</a> </div><div>The way it works is that if you want to read the rule text, you need to purchase (I presume) a rules.txt file and pass it to cppcheck so it can print the contents. </div><div><br></div><div>I suppose that could work here as well, but I think the development process would be rather awkward. Not possible to document what a given rule is about, and only a select group  of people who have purchased the document could actually review the patches. This would probably slow down development significantly. AUTOSAR would be easier to develop since everyone can easily contribute based on the publicly available document. I wonder if there are different licensing models that forbid inaccurate reproduction and yet allow the documents to be publicly available. </div><div><br></div><div>I am still waiting for a reply from AUTOSAR in order to get their approval for adding these checks to clang-tidy.</div><div><br></div><div>Best regards,</div><div>Carlos</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Nov 6, 2021 at 9:54 PM Danny Mösch via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div><span>I like the idea of adding an AUTOSAR module to clang-tidy!</span></div><div><span><br></span></div><div><span style="color:rgb(0,0,0)">I know of at least two projects which have</span><span style="color:rgb(0,0,0)"> some work done already. The first one was started in the context of Google Summer of Code. You can find the final report at </span><a href="https://docs.google.com/document/d/1r6H5eYOji3mytkdpNJFPuc4PdmE2ZbrFeNAhEqkQIpU/edit" target="_blank">https://docs.google.com/document/d/1r6H5eYOji3mytkdpNJFPuc4PdmE2ZbrFeNAhEqkQIpU/edit</a><span style="color:rgb(0,0,0)">. Some rules have already been implemented in an LLVM fork at </span><a href="https://github.com/Bareflank/llvm-project" target="_blank">https://github.com/Bareflank/llvm-project</a><span style="color:rgb(0,0,0)"> as mentioned in the report. The second one is a commercial project which has been presented at the 2020 Developers Meeting: </span><a href="https://www.youtube.com/watch?v=-6dL-7xkIV0" target="_blank">https://www.youtube.com/watch?v=-6dL-7xkIV0</a><span style="color:rgb(0,0,0)">. At the time of the presentation it was not quite clear whether the source code will be open-sourced at some point.</span></div><span><div><span><br></span></div>> All in all, Autosar is not perfect but it's an important enabler for e.g. the automotive industry to finally leave MISRA C++08 and move to modern C++14. There's plans for new MISRA guidelines covering C++17 but it's unclear when they'll be published, so we need to live with Autosar for a little more.<br></span><span><br></span><div><span>Talking about MISRA, is there a reason why there are no ambitions to add another module for the MISRA guidelines? I would be very interested in clang-tidy being able to check for MSRA rules, too. Is it because the guidelines have to be licensed/bought? Is it not allowed to make them public in any way? Does anyone </span>know?</div><div><br></div><div>Greetings,</div><div>Danny</div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>