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:
43
43
- cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install ..
44
44
- cmake --build .
45
45
- cd ..
46
+ - python test_cases.py
46
47
- python setup.py build
47
48
- 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@
4
4
5
5
#Set input and output directories
6
6
INPUT = "@CMAKE_CURRENT_SOURCE_DIR@"
7
- INPUT += "@CMAKE_CURRENT_SOURCE_DIR@/README.md"
7
+ INPUT += "@CMAKE_CURRENT_SOURCE_DIR@/README.md"
8
8
9
9
USE_MDFILE_AS_MAINPAGE = "@CMAKE_CURRENT_SOURCE_DIR@/README.md"
10
10
11
11
OUTPUT_DIRECTORY = "@CMAKE_CURRENT_SOURCE_DIR@/doc"
12
- IMAGE_PATH = "@CMAKE_CURRENT_SOURCE_DIR@/doc/images"
12
+ IMAGE_PATH = "@CMAKE_CURRENT_SOURCE_DIR@/doc/images"
13
13
14
14
# There is no standard configuration for .proto files documentation.
15
15
# A Doxygen filter for .proto files has to be added under the directory doc/.
16
16
JAVADOC_AUTOBRIEF = NO
17
17
EXTENSION_MAPPING = proto=C
18
18
FILE_PATTERNS = *.proto
19
19
INPUT_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