-
Notifications
You must be signed in to change notification settings - Fork 107
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
Update cpplint version #324
Conversation
Point to the fork https://github.com/cpplint/cpplint Contains updates for modern C++ standards (e.g. C++14 and C++17). Signed-off-by: Jacob Perron <[email protected]>
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.
Looks good to me with green CI.
Any update? |
Reapply parts of 2324287 that are still relevant.
224bd69
to
6a0c0bc
Compare
So, with this update there's 2000+ cpplint failures across ros2 repositories related to include order. It appears the linter has become more strict about order. Most of the failures come from generated headers (from rosidl), but regardless I think we'll have to touch a large number of files to appease the linter. I don't mind going through and updating headers as necessary (@ament/team thoughts?) Here's an example of what most diffs may look like: +#include <algorithm>
+#include <chrono>
+#include <functional>
+#include <future>
+#include <map>
+#include <memory>
+#include <mutex>
+#include <string>
+#include <utility>
+
#include <rclcpp/exceptions.hpp>
#include <rclcpp/macros.hpp>
#include <rclcpp/node_interfaces/node_base_interface.hpp>
#include <rclcpp/node_interfaces/node_logging_interface.hpp>
#include <rclcpp/node_interfaces/node_graph_interface.hpp>
#include <rclcpp/logger.hpp>
#include <rclcpp/time.hpp> #include <rclcpp/time.hpp>
#include <rclcpp/waitable.hpp>
-#include <rosidl_runtime_c/action_type_support_struct.h>
+#include "rosidl_runtime_c/action_type_support_struct.h"
#include <rosidl_typesupport_cpp/action_type_support.hpp>
-#include <algorithm>
-#include <chrono>
-#include <functional>
-#include <future>
-#include <map>
-#include <memory>
-#include <mutex>
-#include <string>
-#include <utility>
- Note that custom C-headers in angle brackets are considered system headers, so we should use double-quotes instead. |
My opinion: If you are willing to do the work and have time to do it, I'm fine with the upgrade. It's just going to require a large number of PRs to be merged at once :). |
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
Fixes cpplint error. Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
* Fix include order for cpplint Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * Use double-quotes for backwards compatibility Signed-off-by: Jacob Perron <[email protected]>
* Fix include order and relative paths for cpplint Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * Use double-quotes for other includes This is backwards compatible with older versions of cpplint. Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
* Fix include order for cpplint Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * Use double-quotes for other includes This is backwards compatible with older versions of cpplint. Signed-off-by: Jacob Perron <[email protected]>
Fixes cpplint error. Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
* Fix include order for cpplint Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * Use double-quotes Signed-off-by: Jacob Perron <[email protected]>
* Use static_cast instead of C-style cast Fixes cpplint error. Signed-off-by: Jacob Perron <[email protected]> * Update NOLINT category Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
* Use static_cast instead of C-style cast Fixes cpplint errors. Signed-off-by: Jacob Perron <[email protected]> * Add missing include Fixes a cpplint error. Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * Include missing rmw header Signed-off-by: Jacob Perron <[email protected]>
* Fix include order for cpplint Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * Use double-quotes for other includes This is backwards compatible with older versions of cpplint. Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
* Fix include order for cpplint Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * Use double-quotes for other includes This is backwards compatible with older versions of cpplint. Signed-off-by: Jacob Perron <[email protected]>
* Fix include order for cpplint Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * Use double-quotes for other includes This is backwards compatible with older versions of cpplint. Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
* Fix include order for cpplint Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * Fix relative include paths syntax Resolving cpplint errors. Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
* Fix include order for cpplint Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * Enable linter tests and fix errors Signed-off-by: Jacob Perron <[email protected]>
* Fix include order for cpplint Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * Replace C-style cast with static_cast Signed-off-by: Jacob Perron <[email protected]>
* Fix include order for cpplint Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * Use double-quotes for backwards compatibility Signed-off-by: Jacob Perron <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
Relates to upstream changes in ament_lint. ament/ament_lint#324 Signed-off-by: Abrar Rahman Protyasha <[email protected]>
Relates to upstream changes in ament_lint. ament/ament_lint#324 Signed-off-by: Abrar Rahman Protyasha <[email protected]>
* Use static_cast instead of C-style cast Fixes cpplint error. Signed-off-by: Jacob Perron <[email protected]> * Update NOLINT category Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
* Add support for user-specified content filters. Signed-off-by: Andrea Sorbini <[email protected]> * - Resolve memory leak of custom content-filter resources - Add missing package dependencies for rti_connext_dds_custom_sql_filter - Clean up all participants upon factory finalization - Reset context state upon finalization (rmw_connextddsmicro) Signed-off-by: Andrea Sorbini <[email protected]> * Assume non-null options argument Signed-off-by: Andrea Sorbini <[email protected]> * - Return error when retrieving content-filter from a subscription that doesn't have one. - Rename internal functions related to content-filters Signed-off-by: Andrea Sorbini <[email protected]> * Fix compilation error, oops. Signed-off-by: Andrea Sorbini <[email protected]> * - Define RMW_CONNEXT_DEBUG when building Debug libraries. - Make sure participant is enabled before deleting contained entities when using Connext debug libraries. Signed-off-by: Andrea Sorbini <[email protected]> * Resolve memory leak for finalization on error. Signed-off-by: Andrea Sorbini <[email protected]> * Rename content filter public API. Signed-off-by: Andrea Sorbini <[email protected]> * Add client/service QoS getters (#67) Signed-off-by: Mauro Passerino <[email protected]> * Changelogs Signed-off-by: Ivan Santiago Paunovic <[email protected]> * 0.8.1 * Fix cpplint errors (#69) * Use static_cast instead of C-style cast Fixes cpplint error. Signed-off-by: Jacob Perron <[email protected]> * Update NOLINT category Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * 0.8.2 Signed-off-by: Audrow Nash <[email protected]> * Update rti-connext-dds dependency to 6.0.1. (#71) Now that this package is available in the ROS bootstrap repository for Ubuntu Focal and Jammy we can bump the expected dependency version. * 0.8.3 * Add rmw listener apis (#44) * Add stubs for setting listener callbacks Signed-off-by: Mauro Passerino <[email protected]> * Address PR suggestions Signed-off-by: Mauro Passerino <[email protected]> * Fix linter issues Signed-off-by: Mauro Passerino <[email protected]> Co-authored-by: Mauro Passerino <[email protected]> Co-authored-by: Alberto Soragna <[email protected]> * Changelog. (#73) Signed-off-by: Chris Lalancette <[email protected]> * 0.9.0 * add stub for content filtered topic Signed-off-by: Chen Lihui <[email protected]> * * Rebased branch asorbini/cft on top of 0.9.0. * Resolved CFT finalization issues on error. * Verified and cleaned up build for rmw_connextddsmicro. Signed-off-by: Andrea Sorbini <[email protected]> * Move custom SQL filter to rmw_connextdds_common Signed-off-by: Andrea Sorbini <[email protected]> * Try to resolve linking error on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * Optionally disable writer-side CFT optimizations to support Windows. Signed-off-by: Andrea Sorbini <[email protected]> * No need to declare private CFT function on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * remove stub implementation for ContentFilteredTopic. Signed-off-by: Tomoya Fujita <[email protected]> * address cpplint error. Signed-off-by: Tomoya Fujita <[email protected]> * Avoid conversion warnings on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * Use strtol instead of sscanf to avoid warnings on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * Avoid finalizing participants if factory is not available. Signed-off-by: Andrea Sorbini <[email protected]> Co-authored-by: mauropasse <[email protected]> Co-authored-by: Ivan Santiago Paunovic <[email protected]> Co-authored-by: Jacob Perron <[email protected]> Co-authored-by: Audrow Nash <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]> Co-authored-by: iRobot ROS <[email protected]> Co-authored-by: Mauro Passerino <[email protected]> Co-authored-by: Alberto Soragna <[email protected]> Co-authored-by: Chris Lalancette <[email protected]> Co-authored-by: Chen Lihui <[email protected]> Co-authored-by: Tomoya Fujita <[email protected]>
* Use static_cast instead of C-style cast Fixes cpplint errors. Signed-off-by: Jacob Perron <[email protected]> * Add missing include Fixes a cpplint error. Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * Include missing rmw header Signed-off-by: Jacob Perron <[email protected]>
* Add support for user-specified content filters. Signed-off-by: Andrea Sorbini <[email protected]> * - Resolve memory leak of custom content-filter resources - Add missing package dependencies for rti_connext_dds_custom_sql_filter - Clean up all participants upon factory finalization - Reset context state upon finalization (rmw_connextddsmicro) Signed-off-by: Andrea Sorbini <[email protected]> * Assume non-null options argument Signed-off-by: Andrea Sorbini <[email protected]> * - Return error when retrieving content-filter from a subscription that doesn't have one. - Rename internal functions related to content-filters Signed-off-by: Andrea Sorbini <[email protected]> * Fix compilation error, oops. Signed-off-by: Andrea Sorbini <[email protected]> * - Define RMW_CONNEXT_DEBUG when building Debug libraries. - Make sure participant is enabled before deleting contained entities when using Connext debug libraries. Signed-off-by: Andrea Sorbini <[email protected]> * Resolve memory leak for finalization on error. Signed-off-by: Andrea Sorbini <[email protected]> * Rename content filter public API. Signed-off-by: Andrea Sorbini <[email protected]> * Add client/service QoS getters (ros2#67) Signed-off-by: Mauro Passerino <[email protected]> * Changelogs Signed-off-by: Ivan Santiago Paunovic <[email protected]> * 0.8.1 * Fix cpplint errors (ros2#69) * Use static_cast instead of C-style cast Fixes cpplint error. Signed-off-by: Jacob Perron <[email protected]> * Update NOLINT category Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * 0.8.2 Signed-off-by: Audrow Nash <[email protected]> * Update rti-connext-dds dependency to 6.0.1. (ros2#71) Now that this package is available in the ROS bootstrap repository for Ubuntu Focal and Jammy we can bump the expected dependency version. * 0.8.3 * Add rmw listener apis (ros2#44) * Add stubs for setting listener callbacks Signed-off-by: Mauro Passerino <[email protected]> * Address PR suggestions Signed-off-by: Mauro Passerino <[email protected]> * Fix linter issues Signed-off-by: Mauro Passerino <[email protected]> Co-authored-by: Mauro Passerino <[email protected]> Co-authored-by: Alberto Soragna <[email protected]> * Changelog. (ros2#73) Signed-off-by: Chris Lalancette <[email protected]> * 0.9.0 * add stub for content filtered topic Signed-off-by: Chen Lihui <[email protected]> * * Rebased branch asorbini/cft on top of 0.9.0. * Resolved CFT finalization issues on error. * Verified and cleaned up build for rmw_connextddsmicro. Signed-off-by: Andrea Sorbini <[email protected]> * Move custom SQL filter to rmw_connextdds_common Signed-off-by: Andrea Sorbini <[email protected]> * Try to resolve linking error on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * Optionally disable writer-side CFT optimizations to support Windows. Signed-off-by: Andrea Sorbini <[email protected]> * No need to declare private CFT function on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * remove stub implementation for ContentFilteredTopic. Signed-off-by: Tomoya Fujita <[email protected]> * address cpplint error. Signed-off-by: Tomoya Fujita <[email protected]> * Avoid conversion warnings on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * Use strtol instead of sscanf to avoid warnings on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * Avoid finalizing participants if factory is not available. Signed-off-by: Andrea Sorbini <[email protected]> Co-authored-by: mauropasse <[email protected]> Co-authored-by: Ivan Santiago Paunovic <[email protected]> Co-authored-by: Jacob Perron <[email protected]> Co-authored-by: Audrow Nash <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]> Co-authored-by: iRobot ROS <[email protected]> Co-authored-by: Mauro Passerino <[email protected]> Co-authored-by: Alberto Soragna <[email protected]> Co-authored-by: Chris Lalancette <[email protected]> Co-authored-by: Chen Lihui <[email protected]> Co-authored-by: Tomoya Fujita <[email protected]>
* Add sequence numbers to message info structure (#74) * Fill reception_sequence_number/publication_sequence_number in all rmw_take_*_with_info() functions Signed-off-by: Ivan Santiago Paunovic <[email protected]> * Add rmw_feature_supported() Signed-off-by: Ivan Santiago Paunovic <[email protected]> * add stub for content filtered topic (#77) * add stub for content filtered topic Signed-off-by: Chen Lihui <[email protected]> * Add support for user-specified content filters (#68) * Add support for user-specified content filters. Signed-off-by: Andrea Sorbini <[email protected]> * - Resolve memory leak of custom content-filter resources - Add missing package dependencies for rti_connext_dds_custom_sql_filter - Clean up all participants upon factory finalization - Reset context state upon finalization (rmw_connextddsmicro) Signed-off-by: Andrea Sorbini <[email protected]> * Assume non-null options argument Signed-off-by: Andrea Sorbini <[email protected]> * - Return error when retrieving content-filter from a subscription that doesn't have one. - Rename internal functions related to content-filters Signed-off-by: Andrea Sorbini <[email protected]> * Fix compilation error, oops. Signed-off-by: Andrea Sorbini <[email protected]> * - Define RMW_CONNEXT_DEBUG when building Debug libraries. - Make sure participant is enabled before deleting contained entities when using Connext debug libraries. Signed-off-by: Andrea Sorbini <[email protected]> * Resolve memory leak for finalization on error. Signed-off-by: Andrea Sorbini <[email protected]> * Rename content filter public API. Signed-off-by: Andrea Sorbini <[email protected]> * Add client/service QoS getters (#67) Signed-off-by: Mauro Passerino <[email protected]> * Changelogs Signed-off-by: Ivan Santiago Paunovic <[email protected]> * 0.8.1 * Fix cpplint errors (#69) * Use static_cast instead of C-style cast Fixes cpplint error. Signed-off-by: Jacob Perron <[email protected]> * Update NOLINT category Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * 0.8.2 Signed-off-by: Audrow Nash <[email protected]> * Update rti-connext-dds dependency to 6.0.1. (#71) Now that this package is available in the ROS bootstrap repository for Ubuntu Focal and Jammy we can bump the expected dependency version. * 0.8.3 * Add rmw listener apis (#44) * Add stubs for setting listener callbacks Signed-off-by: Mauro Passerino <[email protected]> * Address PR suggestions Signed-off-by: Mauro Passerino <[email protected]> * Fix linter issues Signed-off-by: Mauro Passerino <[email protected]> Co-authored-by: Mauro Passerino <[email protected]> Co-authored-by: Alberto Soragna <[email protected]> * Changelog. (#73) Signed-off-by: Chris Lalancette <[email protected]> * 0.9.0 * add stub for content filtered topic Signed-off-by: Chen Lihui <[email protected]> * * Rebased branch asorbini/cft on top of 0.9.0. * Resolved CFT finalization issues on error. * Verified and cleaned up build for rmw_connextddsmicro. Signed-off-by: Andrea Sorbini <[email protected]> * Move custom SQL filter to rmw_connextdds_common Signed-off-by: Andrea Sorbini <[email protected]> * Try to resolve linking error on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * Optionally disable writer-side CFT optimizations to support Windows. Signed-off-by: Andrea Sorbini <[email protected]> * No need to declare private CFT function on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * remove stub implementation for ContentFilteredTopic. Signed-off-by: Tomoya Fujita <[email protected]> * address cpplint error. Signed-off-by: Tomoya Fujita <[email protected]> * Avoid conversion warnings on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * Use strtol instead of sscanf to avoid warnings on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * Avoid finalizing participants if factory is not available. Signed-off-by: Andrea Sorbini <[email protected]> Co-authored-by: mauropasse <[email protected]> Co-authored-by: Ivan Santiago Paunovic <[email protected]> Co-authored-by: Jacob Perron <[email protected]> Co-authored-by: Audrow Nash <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]> Co-authored-by: iRobot ROS <[email protected]> Co-authored-by: Mauro Passerino <[email protected]> Co-authored-by: Alberto Soragna <[email protected]> Co-authored-by: Chris Lalancette <[email protected]> Co-authored-by: Chen Lihui <[email protected]> Co-authored-by: Tomoya Fujita <[email protected]> * 0.10.0 Signed-off-by: Audrow Nash <[email protected]> * Update launch_testing_ros output filter prefixes for Connext6 (#80) Signed-off-by: Ivan Santiago Paunovic <[email protected]> * Properly initialize CDR stream before using it for filtering (#81) Signed-off-by: Andrea Sorbini <[email protected]> * Exclude missing sample info fields when building rmw_connextddsmicro (#79) * Exclude missing sample info fields when building micro. * Report features individually for each RMW implementation. * Return special value for unsupported sequence numbers. Signed-off-by: Andrea Sorbini <[email protected]> Co-authored-by: Chris Lalancette <[email protected]> * 0.11.0 Signed-off-by: Audrow Nash <[email protected]> * Resolve build error with RTI Connext DDS 5.3.1 (#82) Signed-off-by: Andrea Sorbini <[email protected]> * Changelog. Signed-off-by: Chris Lalancette <[email protected]> * 0.11.1 * Use destinct callbacks for each event type --------- Signed-off-by: Ivan Santiago Paunovic <[email protected]> Signed-off-by: Chen Lihui <[email protected]> Signed-off-by: Audrow Nash <[email protected]> Signed-off-by: Andrea Sorbini <[email protected]> Signed-off-by: Chris Lalancette <[email protected]> Co-authored-by: Ivan Santiago Paunovic <[email protected]> Co-authored-by: Chen Lihui <[email protected]> Co-authored-by: Andrea Sorbini <[email protected]> Co-authored-by: mauropasse <[email protected]> Co-authored-by: Jacob Perron <[email protected]> Co-authored-by: Audrow Nash <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]> Co-authored-by: iRobot ROS <[email protected]> Co-authored-by: Mauro Passerino <[email protected]> Co-authored-by: Alberto Soragna <[email protected]> Co-authored-by: Chris Lalancette <[email protected]> Co-authored-by: Tomoya Fujita <[email protected]>
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]>
This PR pulls in a different fork of cpplint that seems to be better maintained. It also contains patches to fix #309.
I've copied the upstream file (8f925b0) and then applied relevant historical patches from our fork (1754c5f). I looked at applying the following commits from our fork, but they seem to no longer apply:
Full CI for all connected PRs:
PRs: