mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38: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
|
||||
3993
vendor/cpplint.py
vendored
Executable file
3993
vendor/cpplint.py
vendored
Executable file
File diff suppressed because it is too large
Load Diff
2
vendor/node
vendored
2
vendor/node
vendored
Submodule vendor/node updated: 0de88a4871...15315eb17c
Reference in New Issue
Block a user