Coder Social home page Coder Social logo

Comments (6)

dirk-thomas avatar dirk-thomas commented on August 28, 2024

Your header files need to be either in a directory (or subdirectory) with a "common" name (incude, src, test, see

subfolder_names = ['include', 'src', 'test']
) or the root of the repository can be identified (.git, .hg, .svn, see
for marker in ['.git', '.hg', '.svn']:
). 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.

sagniknitr avatar sagniknitr commented on August 28, 2024

@dirk-thomas ok.Got it.

from ament_lint.

sagniknitr avatar sagniknitr commented on August 28, 2024

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.

dirk-thomas avatar dirk-thomas commented on August 28, 2024

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.

sagniknitr avatar sagniknitr commented on August 28, 2024

@dirk-thomas Initial testing with the patch is working fine.The Cpplint errors are gone now.
Thank you for the patch.

from ament_lint.

dirk-thomas avatar dirk-thomas commented on August 28, 2024

Thank you for trying the patch and reporting back.

from ament_lint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.