File tree Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -43,5 +43,6 @@ script:
4343 - cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install ..
4444 - cmake --build .
4545 - cd ..
46+ - python test_cases.py
4647 - python setup.py build
4748 - python setup.py sdist
Original file line number Diff line number Diff line change @@ -4,18 +4,18 @@ PROJECT_NUMBER = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
44
55#Set input and output directories
66INPUT = "@CMAKE_CURRENT_SOURCE_DIR@"
7- INPUT += "@CMAKE_CURRENT_SOURCE_DIR@/README.md"
7+ INPUT += "@CMAKE_CURRENT_SOURCE_DIR@/README.md"
88
99USE_MDFILE_AS_MAINPAGE = "@CMAKE_CURRENT_SOURCE_DIR@/README.md"
1010
1111OUTPUT_DIRECTORY = "@CMAKE_CURRENT_SOURCE_DIR@/doc"
12- IMAGE_PATH = "@CMAKE_CURRENT_SOURCE_DIR@/doc/images"
12+ IMAGE_PATH = "@CMAKE_CURRENT_SOURCE_DIR@/doc/images"
1313
1414# There is no standard configuration for .proto files documentation.
1515# A Doxygen filter for .proto files has to be added under the directory doc/.
1616JAVADOC_AUTOBRIEF = NO
1717EXTENSION_MAPPING = proto=C
1818FILE_PATTERNS = *.proto
1919INPUT_FILTER = "python @FILTER_PROTO2CPP_PY_PATH@/proto2cpp.py"
20- HAVE_DOT = YES
21-
20+ HAVE_DOT = YES
21+
Original file line number Diff line number Diff line change 1+ import sys
2+ from glob import *
3+
4+ state = 0
5+
6+ for file in glob ("*.*" ):
7+ if (file != "test_cases.py" ):
8+ with open (file , "rt" ) as fin :
9+ i = 0
10+ for line in fin :
11+ i = i + 1
12+
13+ # Test case 1 is checking if there are illegal tabulators in the code
14+ if line .find ("\t " ) != - 1 :
15+ print (file + " in line " + str (i ) + ": not permitted tab found" )
16+ state = 1
17+
18+ # Test case 2 is checking if there are more than the two allowed '/'
19+ if line .find ("///" ) != - 1 :
20+ print (file + " in line " + str (i ) + ": not permitted use of '///' " )
21+ state = 1
22+
23+ sys .exit (state )
You can’t perform that action at this time.
0 commit comments