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

CI settings: linter contradicting settings #4472

Open
mvk opened this issue Jan 13, 2025 · 1 comment
Open

CI settings: linter contradicting settings #4472

mvk opened this issue Jan 13, 2025 · 1 comment
Labels
bug new Triage required

Comments

@mvk
Copy link

mvk commented Jan 13, 2025

Summary

while working on:
https://github.com/redhatci/ansible-collection-redhatci-ocp/actions/runs/12744473933/job/35516453086?pr=510
getting linter (not sure specific stage/setting) complains:

-ERROR: plugins/filter/junit2obj.py: missing: from __future__ import (absolute_import, division, print_function)
-ERROR: plugins/filter/junit2obj.py: bad-option-value: Bad option value 'E252'
-ERROR: plugins/filter/junit2obj.py: bad-whitespace: No space allowed around keyword argument assignment     def junit2obj(self, xml_report_text: str, extra_metadata: Dict[str, Any] | None = None) -> str:  # type: ignore                                                                                     ^

for this code line:

    def junit2obj(self, xml_report_text: str, extra_metadata: Dict[str, Any] | None = None) -> str:  # type: ignore

if I remove the spaces around = it starts complaining about the lack of spaces around = :)

ERROR: Found 2 pep8 issue(s) which need to be resolved:
ERROR: plugins/filter/junit2obj.py:292:84: E252: missing whitespace around parameter equals
ERROR: plugins/filter/junit2obj.py:292:85: E252: missing whitespace around parameter equals

It seems the contradiction is between pylint and pycodestyle

Issue Type
  • Bug Report
OS / ENVIRONMENT
ansible-lint --version
ansible-lint 24.12.2 using ansible-core:2.18.1 ansible-compat:24.10.0 ruamel-yaml:0.18.6 ruamel-yaml-clib:None
  • ansible installation method: one of source, pip, OS package
  • ansible-lint installation method: one of source, pip, OS package
STEPS TO REPRODUCE
  1. push to github
  2. review the CI progress

Unrelated to playbooks, this is pre-use issue

Desired Behavior

Possible security bugs should be reported via email to [email protected]

Actual Behavior

Please give some details of what is happening. Include a minimum complete
verifiable example
with:

  • minimized playbook to reproduce the error
  • the output of running ansible-lint including the command line used
  • if you're getting a stack trace, also the output of
    ansible-playbook --syntax-check playbook

@mvk
Copy link
Author

mvk commented Jan 14, 2025

I think I accidentally created a ticket for ansible-lint.
The issue is a contradiction between the configuration of pylint vs. pycodestyle.

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