Comments (6)
Your header files need to be either in a directory (or subdirectory) with a "common" name (incude
, src
, test
, see
.git
, .hg
, .svn
, see
). If neither of the two conditions is true it is unclear what to pass as --root
to cpplint
to derive the "correct" header guard from.from ament_lint.
@dirk-thomas ok.Got it.
from ament_lint.
Just a experiment I tried..... I removed the .git folder from the rcl package in the ros 2 ardent release source code...After that when I run ament test for cpplint I receive the following cpplint errors.
/home/sagnik/Work/ROS/ros2_ardent_alvacore/install/bin/ament_cpplint --xunit-file /home/sagnik/Work/ROS/ros2_ardent_alvacore/build/rcl/test_results/rcl/cpplint.xunit.xml
3: /home/sagnik/Work/ROS/ros2_ardent_alvacore/src/ros2/rcl/rcl/include/rcl/allocator.h:15: #ifndef header guard has wrong style, please use: __HOME__SAGNIK__WORK__ROS__ROS2_ARDENT_ALVACORE__SRC__ROS2__RCL__RCL__INCLUDE__RCL__ALLOCATOR_H_ [build/header_guard] [5]
and the final result comes as
3 - cpplint (Failed)
Errors while running CTest
It seems that the cpplint test will exclusively look for the .git folder at the root of the package.
from ament_lint.
Thank you for pointing this out. Looking at the logic to determine the root it really seems broken to me. Please see #94 for a patch. It would be great if you could give it a try and confirm if resolves the problem for you.
from ament_lint.
@dirk-thomas Initial testing with the patch is working fine.The Cpplint errors are gone now.
Thank you for the patch.
from ament_lint.
Thank you for trying the patch and reporting back.
from ament_lint.
Related Issues (20)
- ament_cmake_flake8 ignores value of AMENT_LINT_AUTO_FILE_EXCLUDE HOT 5
- `ament_clang_format` and `colcon test` HOT 4
- [ament_cppcheck] provide libraries
- Update humble ament_pep257 package HOT 5
- Please tag a new release of `ament_lint` for `foxy` HOT 2
- Ament-flake8 attributeError Humble HOT 4
- Support for other filetypes for ament_copyright HOT 2
- ament_uncrustify is incompatible with uncrustify >= 0.75 HOT 1
- ament_pep257 crashes during xunit generation when non-pep257 errors occur
- What is the general release strategy? HOT 1
- ament_xmllint stuck when no internet
- Feature Rquest: ament_cmake_clang_tidy, specify --header-filter and --jobs options to ament_clang_tidy
- (ament_xmllint) add extension argument
- ament_cmake_pep257, ament_cmake_lint_cmake, ament_cmake_xmllint ignores value of AMENT_LINT_AUTO_FILE_EXCLUDE HOT 1
- ament_flake8 fails with flake8>=6.0.0 HOT 5
- ament_lint_auto finds recursive test dependencies causing downstream packages to inherit conflicting linters
- ament_copyright does not recognize REUSE-compliant copyright headers
- TypeError on debian11 HOT 1
- EXCLUDE argument parsed differently in different linters HOT 2
- BSD 3 license (and maybe others) require a copyright notice at the top of the license file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ament_lint.