Skip to content

MAINT: Style check *.c and *.h files #14814

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions ci/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,22 @@ if [ "$LINT" ]; then
# readability/casting: Warnings about C casting instead of C++ casting
# runtime/int: Warnings about using C number types instead of C++ ones
# build/include_subdir: Warnings about prefacing included header files with directory

# We don't lint all C files because we don't want to lint any that are built
# from Cython files nor do we want to lint C files that we didn't modify for
# this particular codebase (e.g. src/headers, src/klib, src/msgpack). However,
# we can lint all header files since they aren't "generated" like C files are.
pip install cpplint

echo "Linting *.c and *.h"
cpplint --extensions=c,h --headers=h --filter=-readability/casting,-runtime/int,-build/include_subdir --recursive pandas/src/parser
if [ $? -ne "0" ]; then
RET=1
fi
for path in '*.h' 'period_helper.c' 'datetime' 'parser' 'ujson'
do
echo "linting -> pandas/src/$path"
cpplint --extensions=c,h --headers=h --filter=-readability/casting,-runtime/int,-build/include_subdir --recursive pandas/src/$path
if [ $? -ne "0" ]; then
RET=1
fi
done
echo "Linting *.c and *.h DONE"

echo "Check for invalid testing"
Expand Down
Loading