-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-71: [C++] Add clang-tidy and clang-format to the the tool chain. #55
Conversation
@@ -7,6 +7,10 @@ set -e | |||
pushd $CPP_BUILD_DIR | |||
|
|||
make lint | |||
if [ $TRAVIS_OS_NAME == "linux" ]; then | |||
make check-format | |||
make clang-tidy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be check-clang-tidy
void SetUp() { | ||
pool_ = default_memory_pool(); | ||
} | ||
void SetUp() { pool_ = default_memory_pool(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, is this configurable? (I prefer the old style, but it's not a dealbreaker)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is. The current configuration is to only do one liners for methods declared inside a class scope. The options are never have single line methods, only have single line methods for empty methods, class-scope or always make single line methods. We could likely work around this particular instance by adding a line comment to prevent the collapse.
My general preference is for never or class scope. There were a few instances where the class-scope inlining was already done, and looked right to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's stick with class scope, then, for now. Thanks
…increase penality for before first call parameter
This seems good to me. If you're satisfied, will merge and we'll run with this? |
@emkornfield according to Travis CI, they aren't in any hurry to whitelist the LLVM apt repos, but because we have sudo on the trusty platform, we can apt-add-repository and do whatever we want. So it should be possible to go back to Trusty and use LLVM 3.8 if we wish |
… at make time This also adds a `#define` working around the googletest incompatibility described in PARQUET-470. Author: Wes McKinney <wesm@apache.org> Closes apache#55 from wesm/PARQUET-468 and squashes the following commits: e0338df [Wes McKinney] Auto-generate Thrift C++ bindings from environment Thrift compiler. Add #define workaround for Thrift >= 0.9.2 std::tuple conflict with googletest
… at make time This also adds a `#define` working around the googletest incompatibility described in PARQUET-470. Author: Wes McKinney <wesm@apache.org> Closes apache#55 from wesm/PARQUET-468 and squashes the following commits: e0338df [Wes McKinney] Auto-generate Thrift C++ bindings from environment Thrift compiler. Add #define workaround for Thrift >= 0.9.2 std::tuple conflict with googletest Change-Id: I2fce672b43352a15d3246b606a011b35efa54fe1
… at make time This also adds a `#define` working around the googletest incompatibility described in PARQUET-470. Author: Wes McKinney <wesm@apache.org> Closes apache#55 from wesm/PARQUET-468 and squashes the following commits: e0338df [Wes McKinney] Auto-generate Thrift C++ bindings from environment Thrift compiler. Add #define workaround for Thrift >= 0.9.2 std::tuple conflict with googletest Change-Id: I2fce672b43352a15d3246b606a011b35efa54fe1
… at make time This also adds a `#define` working around the googletest incompatibility described in PARQUET-470. Author: Wes McKinney <wesm@apache.org> Closes apache#55 from wesm/PARQUET-468 and squashes the following commits: e0338df [Wes McKinney] Auto-generate Thrift C++ bindings from environment Thrift compiler. Add #define workaround for Thrift >= 0.9.2 std::tuple conflict with googletest Change-Id: I2fce672b43352a15d3246b606a011b35efa54fe1
… at make time This also adds a `#define` working around the googletest incompatibility described in PARQUET-470. Author: Wes McKinney <wesm@apache.org> Closes apache#55 from wesm/PARQUET-468 and squashes the following commits: e0338df [Wes McKinney] Auto-generate Thrift C++ bindings from environment Thrift compiler. Add #define workaround for Thrift >= 0.9.2 std::tuple conflict with googletest Change-Id: I2fce672b43352a15d3246b606a011b35efa54fe1
[C++]Wip hdfs kerberos
I changed the ubuntu flavor for building to precise because travis-ci/apt-source-safelist#199 is currently blocking using trusty.
I also expect there might be a couple of iterations on settings for clang-format and clang-tidy (or if we even want them as standard parts of the toolchain). @wesm I noticed the lint target explicitly turns off some checks, I don't know if these were copy and pasted or you really don't like them. If the latter I can do a first pass of turning the same ones off for clang-tidy.
In terms of reviewing: It is likely useful, to look at the PR commit by commit, since the last two commits are 99% driven by the first commit. The main chunk of code that wasn't machine fixed is FatalLog in logging.
The good news is clang-tidy caught one potential corner case segfault when a column happened to be null :)