-
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
build/install directories also being checked #48
Comments
I assume Also what are the steps you did before since I get some different result? |
yes The issue happens for me on fresh ros2 source files (and any subsequent time). Originally, there are just these files/directories: https://github.com/ros2/rclpy/tree/master/rclpy in if I never do that step and instead run |
|
I haven't found a package yet that doesn't cause this to happen, so I'm not sure it's a package specific thing (have tried ament_copyright, ros2/demos, ros2/examples, ros2/rclcpp, ros2/rclpy). Do you have any in mind that you think should not cause this? Do I understand you correctly that you think the package might be purposefully testing the build and install directories so that it can check the formatting of all files generated? If that's the case, I would have thought that the result should be the same regardless of where the build/install directories are, since it could get access to those variables somehow. So I feel like this might just be lint tests finding files they're not supposed to. The reason I thought it was worth mentioning is because, while I see that ament doesn't work in this case, I wonder if it is just an arbitrary restriction that cause it to not work, and so is worth changing for the 'freedom' of the user. If it's just something that should not be done for other reasons, what do you say about me starting to compile an FAQ list so it can be searched if people run into the same situation? |
Currently most linters are checking for certain files (e.g. ending in We could change the default behavior of the linters to not check a subfolder called We could also additionally add the Invoking |
ha - good point 😄 I'd support ignoring I feel that it seems natural to then also ignore If you agree, I'll change the defaults of the ament_lint packages to ignore all four, and maybe at a later date add the option to test generated files. |
Sounds good to me. |
@dhood do you want to stay assigned to this ? |
nah we can label it as help wanted though if someone else is interested |
I don't think ignoring a list of "known" folder names is reasonable for this. Simply because users can build in custom folders like I tried to reproduce the problem by running the following command in the
It didn't check or warn about any of the files in the created |
I was able to reproduce this locally following the instructions of this issue. in a fresh terminal:
result:
|
If I run the command in the root of the repo it passes. But when I run it in the |
#81 addresses the problem with build spaces. The install space is still a problem if e.g. generated code doesn't contain a copyright and/or license. In order to address that use case the |
Remark for the other linters: We will still have errors reported when the generated code doesnt comply with the linters default rules (for example the generated code doesnt enforce line length) |
I am going to close this for now since we don't plan to support in-source builds. #81 already provides enough improvement that you can use the linters in-source. |
If I run the linter tests from the directory with the CMakeLists.txt, they start testing the files created during the build step. This makes the test 1) spit out a bunch of junk and 2) fail.
For example,
yields
with errors such as
and
I can fix this by instead calling
but I wanted to make a note of it as I don't feel like I'll be the only person who will ever try to do this, and it wasn't immediately obvious why my tests were failing.
The text was updated successfully, but these errors were encountered: