Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProMod3
Manage
Activity
Members
Plan
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
ProMod3
Commits
b1222044
Commit
b1222044
authored
Dec 16, 2014
by
Bienchen
Committed by
BIOPZ-Johner Niklaus
Dec 17, 2014
Browse files
Options
Downloads
Patches
Plain Diff
CMake checks
parent
03dc1317
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake_support/PROMOD3.cmake
+26
-26
26 additions, 26 deletions
cmake_support/PROMOD3.cmake
extras/pre_commit/pm3_csc/filecheck/cmake.py
+22
-1
22 additions, 1 deletion
extras/pre_commit/pm3_csc/filecheck/cmake.py
with
48 additions
and
27 deletions
cmake_support/PROMOD3.cmake
+
26
−
26
View file @
b1222044
File changed. Contains only whitespace changes.
Show whitespace changes.
This diff is collapsed.
Click to expand it.
extras/pre_commit/pm3_csc/filecheck/cmake.py
+
22
−
1
View file @
b1222044
...
...
@@ -20,7 +20,7 @@ class Cmake(base.FileCheck):
'''
closers
=
[
'
endmacro
'
]
for
close_stmnt
in
closers
:
fclose_stmnt
=
close_stmnt
+
r
'
\((.*)\)
'
fclose_stmnt
=
r
'
(?:^|\s)
'
+
close_stmnt
+
r
'
\((.*)\)
'
m_stmnt
=
re
.
match
(
fclose_stmnt
,
line
)
if
m_stmnt
:
stmnt_id
=
m_stmnt
.
group
(
1
)
...
...
@@ -34,6 +34,27 @@ class Cmake(base.FileCheck):
"
CMake will complain about this issue,
"
+
"
too.
\n
"
,
15
)
def
CheckWhitespace
(
self
,
line
):
'''
Check that there is no white space between a function call and its
opening parenthesis.
'''
openers
=
[
'
if
'
]
for
open_stmnt
in
openers
:
fopen_stmnt
=
r
'
(?:^|\s)
'
+
open_stmnt
+
r
'
(\s*)\(
'
m_stmnt
=
re
.
match
(
fopen_stmnt
,
line
)
if
m_stmnt
:
stmnt_ws
=
m_stmnt
.
group
(
1
)
if
len
(
stmnt_ws
):
pm3_csc
.
FailMsg
(
"
Line %d:
"
%
self
.
current_line
+
"
No identifier in closing statement. The
"
+
"
call to
'
%s()
'
should
"
%
open_stmnt
+
"
go by the same name as the statement
"
+
"
opening that block. That improves
"
+
"
readability plus future versions of
"
+
"
CMake will complain about this issue,
"
+
"
too.
\n
"
,
15
)
def
Check
(
self
,
ignore_line_width
=
False
):
# For now we do not have any checks for reST so this is an awkward
# dummy, just checking line width.
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment