Skip to content

Need to add hpp headers to valid extensions even when not provided via options#84

Open
lucasw wants to merge 2 commits intoros:masterfrom
lucasw:add_headers_to_valid_extensions
Open

Need to add hpp headers to valid extensions even when not provided via options#84
lucasw wants to merge 2 commits intoros:masterfrom
lucasw:add_headers_to_valid_extensions

Conversation

@lucasw
Copy link

@lucasw lucasw commented Sep 21, 2021

#82 removed '.h' from valid extensions and only header extensions via --headers... caused extensions to be added onto it.

This is what was happening with no --headers option provided:

catkin build foo --no-deps --catkin-make-args roslint
...
foo.h; not a valid file name foo (cu, cc, cuh, cpp)

If I manually set the header file types it then worked:

set(ROSLINT_CPP_OPTS "--headers=h,hpp,hxx")
... (properly finds a problem in foo.h I introduced, doesn't complain about it not having a valid file name)

(didn't look too hard but previously only h was in valid extensions and not hpp or hxx, it was supposed to match on the first character h so hpp and hxx still worked- but that didn't work or wasn't ever implemented- or was broken in another commit from further back?)

So here the _hpp_headers is added to valid extensions after the processing of options has a chance to modify it, so either the default hpp header or the modified ones get added.

@lucasw lucasw force-pushed the add_headers_to_valid_extensions branch from 73013e6 to 6bca272 Compare March 9, 2024 14:26
@lucasw lucasw force-pushed the add_headers_to_valid_extensions branch from 6bca272 to b8a1e5c Compare May 21, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant