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

Revise ansible-lint to incorporate incremental changes for future adaptability #368

Merged
merged 9 commits into from
Jun 9, 2023
Merged

Revise ansible-lint to incorporate incremental changes for future adaptability #368

merged 9 commits into from
Jun 9, 2023

Conversation

ThomasSanson
Copy link
Sponsor Contributor

The goal of this refactoring process would be to improve the maintainability and scalability of ansible-lint, making it easier to adapt and expand in the future.

… rules

The skip_list in ansible-lint.yml has been updated to ignore additional yaml rules. The rules that have been added are yaml[line-length], yaml[octal-values], yaml[truthy], and yaml[trailing-spaces]. These rules have been added to improve the quality of the code by ensuring that it adheres to best practices.
The role-name[path] rule is added to the skip_list in order to ignore the warning generated by ansible-lint for the role-name[path] rule. This rule is skipped because it is not applicable to the project's directory structure.
…re] instead of fqcn-builtins

The fqcn-builtins rule has been deprecated and replaced with fqcn[action-core]. This commit updates the skip_list in ansible-lint.yml to reflect this change.
…list

The template-instead-of-copy rule was removed from the skip_list in the ansible-lint.yml configuration file. This rule was previously skipped, but it is now enabled to ensure that templated files use the template keyword instead of copy.
The __pycache__/ directory is added to the .gitignore file to prevent Python cache files from being committed to the repository. This improves the cleanliness of the repository and reduces the size of the repository.
The fqcn[action] rule is now included in the skip_list to avoid it being flagged as an error. This rule is skipped because it is not applicable to the project's current configuration.
…m skip_list

The var-naming[no-role-prefix] rule was removed from the skip_list as it is no longer needed.
…TODOs

The ansible-lint.yml file has been updated to reflect new rules and TODOs. The skip_list has been updated to include new rules such as no-free-form, no-relative-paths, and key-order[task]. Additionally, some rules have been marked as TODOs, such as risky-file-permissions and jinja[invalid]. Finally, the order of the skip_list has been updated to group similar rules together.
@vitabaks
Copy link
Owner

vitabaks commented Jun 9, 2023

@ThomasSanson Thank you for your contribution!

Processing skip_list is something that has been demanding attention for a long time.

Please note that some PR is still open (under development). This means that the merging of this PR is possible only after the completion of the code change in other PRs.

@ThomasSanson
Copy link
Sponsor Contributor Author

@vitabaks

I completely understand your perspective, and I want to shed some light on the changes I made. The main focus of my modifications was to refactor the skip_list, aiming at better anticipating and facilitating future work on the project.

Although my changes may seem minor, they are essential to streamline and prepare the codebase for further improvements and modifications. However, I understand if you have concerns regarding the potential impact of these changes on other aspects of the project.

If you wish, I can quickly carry out tests to assess the impacts of my modifications on other pull requests. My intention is to contribute positively to the project, ensuring my changes align well with existing and forthcoming work.

@vitabaks
Copy link
Owner

vitabaks commented Jun 9, 2023

I understood you. Let me know if I need to merge into the master branch.

The run-once[task] rule is added to the skip_list in the ansible-lint configuration file. This rule is skipped during linting to avoid warnings about tasks that are intended to run only once.
@ThomasSanson
Copy link
Sponsor Contributor Author

@vitabaks

✔️ The merge between this branch and the pg_upgrade branch is ok (testing)

this pull request is ready for me

@vitabaks vitabaks merged commit 69a33ae into vitabaks:master Jun 9, 2023
18 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