[
https://issues.apache.org/jira/browse/MESOS-4907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15193165#comment-15193165
]
Shuai Lin commented on MESOS-4907:
----------------------------------
Thanks for the reply! Yeah, using bear or cmake to get the compiler flags is
the way to go. And cmake with ninja backend would be perfect for this purpose.
But the problem I mentioned above is different: Even if we get the compiler
flags and pass it to clang-tidy, when a {{.proto}} file is changed (say
{{mesos.proto}}), e.g. a new field is added to a message, clang-tidy may still
report there are errors in the code where the new field is used, because the
{{mesos.pb.h}} is not updated yet thus the new field is not visible to
clang-tidy.
> ClangTidy Integration
> ---------------------
>
> Key: MESOS-4907
> URL: https://issues.apache.org/jira/browse/MESOS-4907
> Project: Mesos
> Issue Type: Epic
> Components: technical debt
> Reporter: Michael Park
> Labels: gsoc, gsoc2016, mentor, mesosphere
>
> While {{cpplint}} has been a useful tool as a C++ linter for quite some time,
> It carries limitations since it does its best without actually parsing C++.
> [ClangTidy|http://clang.llvm.org/extra/clang-tidy/] is a clang tool that is
> based
> off of Clang, and has the advantage that it has access to a full AST.
> There are many checks that come built-in with {{clang-tidy}} which are very
> useful,
> but we can extend it to fit Mesos coding style and patterns as well.
> The initial phase of the project will be to create a basis with which to
> leverage
> the existing checks as applicable to Mesos, then to create a scaffolding to
> add
> custom checks, and ways to integrate the custom checks to infrastructure such
> as Mesos ReviewBot, or Apache CI.
> I've done some preliminary, experimental work for this for a Hackathon project
> and have given a
> [presentation|https://docs.google.com/presentation/d/1z_qGzpY7Mt46TXxuLRW6M5HcCWBLRz6UJfd4bPknYeg/edit?usp=sharing]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)