PepperlFuchs / pf_lidar_ros_driver

ROS driver for Pepperl+Fuchs R2000 and R2300 laser scanners
https://www.pepperl-fuchs.com/global/en/23097.htm
Apache License 2.0
39 stars 38 forks source link

fixes for formatting and linting errors #40

Closed hsd-dev closed 3 years ago

hsd-dev commented 3 years ago

Commands used for future reference:

Linting

catkin_lint -W2 pf_driver/

errors

pf_driver: CMakeLists.txt(43): error: package 'dynamic_reconfigure' must be in CATKIN_DEPENDS in catkin_package()
pf_driver: package.xml: error: missing build_depend on 'tf'
pf_driver: warning: file 'scripts/laser_merger' is executable but not installed
pf_driver: warning: file 'src/pf/pf_interface.cpp.orig' is executable but not installed
pf_driver: warning: file 'launch/r2300.launch.orig' is executable but not installed
pf_driver: warning: file 'launch/r2000.launch.orig' is executable but not installed
pf_driver: warning: file 'launch/r2000.launch' is executable but not installed
pf_driver: warning: file 'launch/r2300.launch' is executable but not installed
pf_driver: launch/r2000.launch(10): warning: launch configuration needs exec_depend on 'tf'
pf_driver: launch/r2000.launch(11): warning: launch configuration needs exec_depend on 'rviz'
pf_driver: launch/r2300.launch(10): warning: launch configuration needs exec_depend on 'tf'
pf_driver: launch/r2300.launch(11): warning: launch configuration needs exec_depend on 'tf'
pf_driver: launch/r2300.launch(12): warning: launch configuration needs exec_depend on 'tf'
pf_driver: launch/r2300.launch(13): warning: launch configuration needs exec_depend on 'tf'
pf_driver: launch/r2300.launch(14): warning: launch configuration needs exec_depend on 'rviz'
pf_driver: CMakeLists.txt(6): notice: list COMPONENTS should be sorted
pf_driver: CMakeLists.txt(43): notice: list CATKIN_DEPENDS should be sorted
pf_driver: CMakeLists.txt(54): notice: list of source files should be sorted
catkin_lint: checked 1 packages and found 18 problems

roslint

catkin_make roslint_pf_driver

errors

src/ros/ros_main.cpp:0:  No copyright message found.  You should have a line: "Copyright [year] <Copyright Owner>"  [legal/copyright] [5]
src/ros/ros_main.cpp:8:  Missing username in TODO; it should look like "// TODO(my_username): Stuff."  [readability/todo] [2]
src/ros/ros_main.cpp:17:  Add #include <string> for string  [build/include_what_you_use] [4]
src/ros/ros_main.cpp:26:  Add #include <memory> for make_unique<>  [build/include_what_you_use] [4]
src/ros/ros_main.cpp:32:  Add #include <utility> for move  [build/include_what_you_use] [4]
Done processing src/ros/ros_main.cpp
src/ros/scan_publisher.cpp:0:  No copyright message found.  You should have a line: "Copyright [year] <Copyright Owner>"  [legal/copyright] [5]
src/ros/scan_publisher.cpp:155:  Add #include <utility> for move  [build/include_what_you_use] [4]
src/ros/scan_publisher.cpp:84:  Add #include <limits> for numeric_limits<>  [build/include_what_you_use] [4]
Done processing src/ros/scan_publisher.cpp
src/pf/pf_interface.cpp:0:  No copyright message found.  You should have a line: "Copyright [year] <Copyright Owner>"  [legal/copyright] [5]
src/pf/pf_interface.cpp:214:  Add #include <string> for string  [build/include_what_you_use] [4]
src/pf/pf_interface.cpp:188:  Add #include <memory> for unique_ptr<>  [build/include_what_you_use] [4]
src/pf/pf_interface.cpp:187:  Add #include <utility> for move  [build/include_what_you_use] [4]
src/pf/pf_interface.cpp:194:  Add #include <algorithm> for min  [build/include_what_you_use] [4]
Done processing src/pf/pf_interface.cpp
src/pf/pf_packet.cpp:0:  No copyright message found.  You should have a line: "Copyright [year] <Copyright Owner>"  [legal/copyright] [5]
src/pf/pf_packet.cpp:8:  Add #include <algorithm> for copy  [build/include_what_you_use] [4]
Done processing src/pf/pf_packet.cpp
src/communication.cpp:0:  No copyright message found.  You should have a line: "Copyright [year] <Copyright Owner>"  [legal/copyright] [5]
Done processing src/communication.cpp
Total errors found: 16

clang-format

find src/ -name '*.h' -or -name '*.hpp' -or -name '*.cpp' | xargs clang-format -i -style=file $1