Skip to content

Commit

Permalink
#158 Fix sonar issues, align cpplint with dynawo core and make sure
Browse files Browse the repository at this point in the history
messages are displayed and add possibility to filter false positive
doxygen warnings
  • Loading branch information
ROSIERE Florentine authored and gautierbureau committed Jan 19, 2022
1 parent d9f140d commit 68eb877
Show file tree
Hide file tree
Showing 12 changed files with 663 additions and 201 deletions.
1 change: 1 addition & 0 deletions CPPLINT.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
set noparent
headers=h,hpp,hxx
extensions=cpp,h,hpp,hxx
root=sources
linelength=160

Expand Down
9 changes: 4 additions & 5 deletions cpplint/cpplint-wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def filterGitName(filename, status):

def filterFilename(filename):
source_file = filename.endswith(b".cpp")
header_file = filename.endswith(b".h") or filename.endswith(b".hpp") or filename.endswith(b".hxx")
header_file = (filename.endswith(b".h") or filename.endswith(b".hpp") or filename.endswith(b".hxx"))

return source_file or header_file

Expand Down Expand Up @@ -59,10 +59,9 @@ def cpplint(root_directory, filename, filter):
cmd = "python"
if os.environ.get('DYNAWO_PYTHON_COMMAND') is not None:
cmd = os.environ.get('DYNAWO_PYTHON_COMMAND')
if filter is None:
options = [cmd, cpplint_path, filename]
else:
options = [cmd, cpplint_path, "--filter", filter, filename]
options = [cmd, cpplint_path, "--quiet", filename]
if filter != None:
options = [cmd, cpplint_path, "--quiet", "--filter", filter, filename]
process = subprocess.Popen(options, stdout=subprocess.PIPE, cwd=root_directory)
process.wait()

Expand Down
Loading

0 comments on commit 68eb877

Please sign in to comment.