Add ament_lint_auto_py and ament_lint_common_py#569
Add ament_lint_auto_py and ament_lint_common_py#569InvincibleRMC wants to merge 22 commits intoament:rollingfrom
ament_lint_auto_py and ament_lint_common_py#569Conversation
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
|
I very much like this initiative. Does it mean that all the copy-pasted lint tests in downstream repos would be replaced just by something like test_ament_lint_auto.py from the readme? Is there no way to do it even without this one (e.g. generate it at build time)? It's not clear to me why does ament_lint_common_py contain also the C++-only linters like cppcheck. Does it make sense in some scenarios? Or is it just to have 1:1 mapping between cpp and py linters? Regardless of the answer, I think this should be documented in the readme. Also, setting excludes only via environment variables is insufficient. That's good for local development, but unusable on the buildfarm and in other automated build environments. Or am I missing something? If specifying the excludes in setup.py is not possible, what about the export section in package.xml? But I don't like this solution either because it would leak implementation details like file names leak into the overall metadata provided by package.xml. |
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
|
Do to your questions/feedback I have done some updates.
|
|
@fujitatomoya would you mind reviewing this? |
fujitatomoya
left a comment
There was a problem hiding this comment.
i got several minor comments only, i would like someone else who is familiar with ament to review this before merge.
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Description
Adding
ament_lint_auto_pyandament_lint_common_pyto allow auto linting forament_pythonpackages. It should have 1 to 1 parity withament_lint_autofeatures. Including support forament_lint_auto_excludeandament_lint_auto_file_exclude.Is this user-facing behavior change?
Yes it would simpler running linters in
ament_pythonbuild packages. Throughout the core sometimes linters get missed. And if we ever wanted to add more in the future [likeament_mypyfor typing ;)] being able to use similar logic toament_lint_autoinCMakeLists.txtwould be very useful.Did you use Generative AI?
Additional Information