Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
7946715d
Commit
7946715d
authored
Aug 29, 2016
by
Wenzel Jakob
Committed by
GitHub
Aug 29, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #369 from jagerman/check-for-tabs
Check for style issues during docs build
parents
5d1d380e
dbc4bf68
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
2 deletions
+37
-2
.travis.yml
+4
-2
tests/object.h
+0
-0
tests/test_stl_binders.cpp
+0
-0
tools/check-style.sh
+33
-0
No files found.
.travis.yml
View file @
7946715d
...
@@ -38,9 +38,11 @@ matrix:
...
@@ -38,9 +38,11 @@ matrix:
# Documentation build:
# Documentation build:
-
os
:
linux
-
os
:
linux
language
:
docs
language
:
docs
env
:
DOCS
env
:
DOCS
STYLE
install
:
pip install sphinx sphinx_rtd_theme
install
:
pip install sphinx sphinx_rtd_theme
script
:
make -C docs html SPHINX_OPTIONS=-W
script
:
-
make -C docs html SPHINX_OPTIONS=-W
-
tools/check-style.sh
cache
:
cache
:
directories
:
directories
:
-
$HOME/.cache/pip
-
$HOME/.cache/pip
...
...
tests/object.h
View file @
7946715d
tests/test_stl_binders.cpp
View file @
7946715d
tools/check-style.sh
0 → 100755
View file @
7946715d
#!/bin/bash
#
# Script to check include/test code for common pybind11 code style errors.
# Currently just checks for tabs used instead of spaces.
#
# Invoke as: tools/check-style.sh
#
errors
=
0
IFS
=
$'
\n
'
found
=
grep
$'
\t
'
include/ tests/ docs/
*
.rst
-rl
|
while
read
f
;
do
if
[
-z
"
$found
"
]
;
then
echo
-e
'\e[31m\e[01mError: found tabs instead of spaces in the following files:\e[0m'
found
=
1
errors
=
1
fi
echo
"
$f
"
done
found
=
grep
'\<\(if\|for\|while\)('
include/ tests/
*
-r
--color
=
always |
while
read
line
;
do
if
[
-z
"
$found
"
]
;
then
echo
-e
'\e[31m\e[01mError: found the following coding style problems:\e[0m'
found
=
1
errors
=
1
fi
echo
"
$line
"
done
exit
$errors
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment