Skip to content
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

Custom lints can not be installed editable #4354

Open
wimglenn opened this issue Oct 2, 2024 · 0 comments
Open

Custom lints can not be installed editable #4354

wimglenn opened this issue Oct 2, 2024 · 0 comments
Labels
bug new Triage required

Comments

@wimglenn
Copy link

wimglenn commented Oct 2, 2024

When developing a custom lint rule as described in Packaging Custom Rules, the lint is not available if installed with pip install -e ./my-custom-lint. The same lint is available (and appears in ansible-lint --list-rules) when doing pip install ./my-custom-lint.

I'm using setuptools and the editable installation mode is the thing with an __editable__ .pth file in site-packages which installs a meta-path finder. Trying all modes with --config-settings editable_mode=compat, --config-settings editable_mode=strict, --config-settings editable_mode=lenient, none of them works.

Maybe relevant: unlike the "normal" install, an editable install doesn't create files under .../site-packages/ansiblelint/rules/custom/. I didn't check how ansible-lint discovers custom rules, but perhaps an entry-point group would be worth considering.

@wimglenn wimglenn added bug new Triage required labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug new Triage required
Projects
Status: No status
Development

No branches or pull requests

1 participant