mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
Add script to check coding styles.
This commit is contained in:
21
script/cpplint
Executable file
21
script/cpplint
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "`dirname $0`/.."
|
||||
|
||||
# List all Objective-C headers here, should not cpplint them.
|
||||
OBJC_HEADERS='
|
||||
browser/atom_event_processing_window.h
|
||||
browser/native_window_mac.h'
|
||||
|
||||
FILES=`find app browser common renderer -type f -name '*.h' -or -name '*.cc'`
|
||||
FILTERED_FILES=
|
||||
|
||||
while read file; do
|
||||
if ! echo "$OBJC_HEADERS" | grep "$file" > /dev/null ; then
|
||||
FILTERED_FILES="$FILTERED_FILES $file"
|
||||
fi
|
||||
done <<< "$FILES"
|
||||
|
||||
python ./vendor/cpplint.py \
|
||||
--filter=-build/header_guard,-build/include_what_you_use \
|
||||
$FILTERED_FILES
|
||||
Reference in New Issue
Block a user