Conversation
There was a problem hiding this comment.
I don't think this is the right change because Willow Garage's name should still not be used (nothing has changed in that respect).
The updated 3-clause bsd template uses a more general statement here:
Neither the name of the copyright holder nor the names of its contributors may be used to endorse
-- https://choosealicense.com/licenses/bsd-3-clause/
We should probably update to that instead.
Also there is a pull request I am looking into that should allow us to use the block comments rather than // comments, letting us have smaller diffs:
So if you want to merge this, for now I would suggest disabling the copyright linter and wait for that pr to get merged before trying to enable it again. Otherwise I am going to wait to merge this pr until we have that sorted out because I really don't want to have a diff like this in all the files we port.
There was a problem hiding this comment.
I agree - it would be much better to have ament_lint copyright check be able to work with block comments. If this happens soon, I'll be inclined to wait for it. Otherwise, I can also disable it if you want.
Regarding the change, I wasn't sure (that's why it's in a separate commit) - it just seemed logical because the file has no connection whatsoever to Willow Garage.
The template I chose was the one recognized by ament_lint - see here: https://github.com/ament/ament_lint/tree/master/ament_copyright/ament_copyright/template
- the weird part I only saw now is that the license template is equivalent to the bsd-3-clause you mention, while the license header isn't - and ament_copyright checks for the header.
There was a problem hiding this comment.
This is not safe, as the lifetime of filename is not guaranteed to be longer than filename_, that's why I just disable the linter on this one until that is resolved some other way. You can either leave the NOLINT or fix it another way.
There was a problem hiding this comment.
I don't believe this to be correct either. I think the logger will be held by Ogre::LogManager::getSingletonPtr()afterwards.
There was a problem hiding this comment.
Looking into it, you're absolutely right. I find this quite weird style, though: I would've expected there to be some kind of static factory method instead - if I new an object, this should mean I'm also responsible to delete it. I guess we have to disable cppcheck for this newcall then. I'll look into it.
There was a problem hiding this comment.
This is not safe either, for the reasons described above.
- we don't use ament_lint_common because copyright checks fail - we want to wait for changes in ament_copyright before fixing
- only one error: memory leak of log_manager
- SdkQtCameraMan is from OgreBites and not from rviz - No change in functionality
0cc10d8 to
bfcdc73
Compare
|
I updated the pull request making all requested changes (to simplify things, I force-pushed):
One additional comment: It would be nicer to still use ament_lint_auto with custom linting tools as specified in https://github.com/ament/ament_lint/blob/master/ament_lint_auto/doc/index.rst - but this didn't work for me, so I had to include the linters manually in CMake. |
wjwwood
left a comment
There was a problem hiding this comment.
lgtm, I added a todo for the copyright linter and a comment about the delete-less free.
Interesting, perhaps it's worth opening an issue on the ament_lint_auto package's repository. This will work fine for now. |
|
I don't know if it helps but you can bypass a specific linter by tricking cmake into not finding it and keep using ament_lint_auto for everything else (example to disable only the copyright linter here) |
* Introduce linters in rviz_rendering - we don't use ament_lint_common because copyright checks fail - we want to wait for changes in ament_copyright before fixing * Fix cppcheck errors - only one error: memory leak of log_manager * Extract SdkQtCameraMan from OgreBites to fix linters - SdkQtCameraMan is from OgreBites and not from rviz - No change in functionality * adding a todo about the copyright linter * add a comment about delete-less new call
This pull request adds liniting to rviz_rendering and fixes all linting issues to have a clean build.
Closes #1