roslint icon indicating copy to clipboard operation
roslint copied to clipboard

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

Open lucasw opened this issue 3 years ago • 0 comments

#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 avatar Sep 21 '21 13:09 lucasw