Skip to content

Commit

Permalink
ament_lint_cmake: default linelength in argumentparser for consistency
Browse files Browse the repository at this point in the history
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
  • Loading branch information
Emerson Knapp committed Mar 12, 2021
1 parent 1e7a90d commit 8e06f25
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions ament_cmake_lint_cmake/cmake/ament_lint_cmake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ 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/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def main(argv=sys.argv[1:]):
help='Filters for lint_cmake, for a list of filters see: '
'https://github.com/richq/cmake-lint/blob/master/README.md#usage')
parser.add_argument(
'--linelength', metavar='N', type=int,
'--linelength', metavar='N', type=int, default=140,
help='The maximum line length')
# not using a file handle directly
# in order to prevent leaving an empty file when something fails early
Expand Down

0 comments on commit 8e06f25

Please sign in to comment.