-
Notifications
You must be signed in to change notification settings - Fork 105
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
Conversation
Is |
@@ -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'], |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind.
After spending some time going through the code and trying @MiguelCompany I also think that the following line should also be changed:
Following the codeThe language is only used here: ament_lint/ament_uncrustify/ament_uncrustify/main.py Lines 107 to 109 in 2d0d0d1
ament_lint/ament_uncrustify/ament_uncrustify/main.py Lines 213 to 217 in 2d0d0d1
This is ultimately used in grouping the files by language (file type is key, a list of files is the value): ament_lint/ament_uncrustify/ament_uncrustify/main.py Lines 236 to 239 in 2d0d0d1
The ament_lint/ament_uncrustify/ament_uncrustify/main.py Lines 128 to 129 in 2d0d0d1
The actual command used to call ament_lint/ament_uncrustify/ament_uncrustify/main.py Lines 269 to 276 in 2d0d0d1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @MiguelCompany. I think this is a good fix.
I think that the change should also be added in one other place in the file. See #272 (comment).
So following the code, the value of |
Correct, as the language ( |
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
8cb0522
to
b06f41c
Compare
I rebased, fixed DCO and also updated the dictionary key from |
@mm318, does it look good to you, too? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, looks good to me!
@MiguelCompany, thanks for the PR! |
When running
uncrustify -h
it does not showC++
as a valid option for-l
.This PR changes the valid options on
--language
toC
andCPP
Signed-off-by: Miguel Company MiguelCompany@eprosima.com