apache / apache/arrow

[C++] clang-format result may be invalid for cpplint.py

Open
#37,396 1 comment 0 reactions 0 assignees View on GitHub
Component: C++ Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the enhancement requested

Example:

`clang-format` result:

```cpp
#define ARROW_AWS_SDK_VERSION_CHECK(major, minor, patch) \
(AWS_SDK_VERSION_MAJOR > (major) || \
(AWS_SDK_VERSION_MAJOR == (major) && AWS_SDK_VERSION_MINOR > (minor)) || \
(AWS_SDK_VERSION_MAJOR == (major) && AWS_SDK_VERSION_MINOR == (minor) && \
AWS_SDK_VERSION_PATCH >= (patch)))))
#else
#define ARROW_AWS_SDK_VERSION_CHECK(major, minor, patch) 0
#endif
```

`cpplint.py` result:

```text
cpp/src/arrow/filesystem/s3fs.cc:87: Weird number of spaces at line-start. Are you using a 2-space indent? [whitespace/indent] [3]
cpp/src/arrow/filesystem/s3fs.cc:88: Weird number of spaces at line-start. Are you using a 2-space indent? [whitespace/indent] [3]
```

Can we remove `cpplint.py` and use `clang-format` for linting?

### Component(s)

C++

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.