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

Bump linter tools versions an fix linter errors #1225

Merged
merged 5 commits into from
May 27, 2024

Conversation

rjeffman
Copy link
Member

@rjeffman rjeffman commented Mar 22, 2024

Use updated versions of the linter tools, Github actions, pre-commit hooks and fix some new warnings from pylint.

@rjeffman rjeffman requested a review from t-woerner March 22, 2024 14:55
@rjeffman rjeffman force-pushed the ci_pin_ansible_lint_version branch 4 times, most recently from c0ca824 to 5d7a28e Compare March 26, 2024 15:35
Bump version of ansible-lint, Flake8, Pylint and yamllint to newer
versions as used in Ansible tests.
Github actions checkout v3.1.0 and setup-python v4.3.0 use deprecated
Node.js 16.

Bumping version to checkout v4.1.1 and setup-python v5.1.0 fixes the
workflows, as both use the recommended Node.js 20.

The checkout depth has been set to 1 (shallow copy) for all tasks that
do not require git history to be available.
New versions of pylint ignore Python 2 functions and types, evaluating
'unicode' as "undefined". ansible-freeipa will always define 'unicode'
when running under Python 3, and it is always defined under Python 2.

This patch fixes these false positives.
pylint doesn't know that some functions may terminate execution, like,
AnsibleModule's fail_json, and assume that, depending on the code path,
some variables may not be initialized when used.

This change ensure that variables are always initialized independent of
the code path.
@rjeffman rjeffman force-pushed the ci_pin_ansible_lint_version branch from 5d7a28e to 52241fe Compare May 22, 2024 13:51
@rjeffman rjeffman changed the title lint tools: Pin ansible-lint and bump version of other tools Bump linter tools versions an fix linter errors May 22, 2024
@rjeffman rjeffman force-pushed the ci_pin_ansible_lint_version branch from 3813ef5 to 77c1d20 Compare May 22, 2024 17:31
Copy link
Member

@t-woerner t-woerner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@t-woerner t-woerner merged commit 8779384 into freeipa:master May 27, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants