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

Allow correct languages on uncrustify #272

Merged
merged 2 commits into from
Mar 2, 2021
Merged
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
4 changes: 2 additions & 2 deletions ament_uncrustify/ament_uncrustify/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def main(argv=sys.argv[1:]):
help='Exclude specific file names and directory names from the check')
parser.add_argument(
'--language',
choices=['C', 'C++'],
choices=['C', 'CPP'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the C++ here is meant for uncrustify. I think it's meant for ament_uncrustify, and making this change will break the dictionary here.

Can you double check?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mm318, can you confirm the link to the dictionary?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind.

help="Passed to uncrustify as '-l <language>' to force a specific "
'language rather then choosing one based on file extension')
parser.add_argument(
Expand Down Expand Up @@ -105,7 +105,7 @@ def main(argv=sys.argv[1:]):
start_time = time.time()

files_by_language = get_files(
args.paths, {'C': c_extensions, 'C++': cpp_extensions},
args.paths, {'C': c_extensions, 'CPP': cpp_extensions},
excludes=args.exclude, language=args.language)
if not files_by_language:
print('No files found', file=sys.stderr)
Expand Down