Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ament_lint_cmake line length expression #236

Merged
merged 4 commits into from
Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ament_cmake_lint_cmake/cmake/ament_lint_cmake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ function(ament_lint_cmake)
set(cmd "${ament_lint_cmake_BIN}" "--xunit-file" "${result_file}")
if(DEFINED ARG_MAX_LINE_LENGTH)
list(APPEND cmd "--linelength" "${ARG_MAX_LINE_LENGTH}")
else()
list(APPEND cmd "--linelength" "140")
endif()
list(APPEND cmd ${ARG_UNPARSED_ARGUMENTS})

Expand Down
2 changes: 1 addition & 1 deletion ament_lint_cmake/ament_lint_cmake/cmakelint.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
_RE_COMMAND_END_SPACES = re.compile(r'(\s*)\)', re.VERBOSE)
_RE_LOGIC_CHECK = re.compile(r'(\w+)\s*\(\s*\S+[^)]+\)', re.VERBOSE)
_RE_COMMAND_ARG = re.compile(r'(\w+)', re.VERBOSE)
_RE_STRING = re.compile(r'^\s*#?\s*"[^"]+"\)?', re.VERBOSE)
_RE_STRING = re.compile(r'^\s*\#?\s*"[^"]+"\)?', re.VERBOSE)
_logic_commands = """
else
endforeach
Expand Down