mavros: validate plugin list patterns#2192
Conversation
vooon
left a comment
There was a problem hiding this comment.
I think it's a bad idea crashing if something in a list doesn't match.
I think better just to emit warning.
a5bdc13 to
084b256
Compare
|
Updated, thanks for the review.\n\n- Rebased the branch so the #2189 executor-thread changes are no longer included in this PR.\n- Changed unmatched plugin allow/deny patterns to emit a warning instead of throwing/crashing.\n\nI also checked the final PR diff: it now only touches |
vooon
left a comment
There was a problem hiding this comment.
Now looks good, but why not to use lambda?
|
No strong reason. I used a small named helper to keep the startup block readable and reuse the same logic for both A local lambda would work too; I can switch to that if you prefer. |
|
Yes, it likely be cleaner. |
084b256 to
a625e5e
Compare
a625e5e to
d1408fc
Compare
|
Please do uncrustify: https://github.com/mavlink/mavros/blob/ros2/CONTRIBUTING.md |
|
Applied the uncrustify formatting in 9966b4b. Thanks. |
Requested
Issue #2024 reports that
plugin_allowlistaccepts garbage input without reporting an error.Implemented
plugin_allowlistandplugin_denylistpatterns against declared plugin classes before loading plugins.Not covered
No changes to plugin loading order or plugin implementations.
Validated
git diff --check HEAD~1..HEADcmake -S mavros -B /tmp/mavros-2024-cmake-check, but this environment is missingament_cmake.colconandament_uncrustifyare not available in the current environment.