-
Notifications
You must be signed in to change notification settings - Fork 673
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
Add auto-fixing implementation for jinja[spacing]
rule
#3691
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 tasks
cidrblock
changed the title
Transform for jinja[spacing] rule
Transform for Aug 28, 2023
jinja[spacing]
rule
audgirka
force-pushed
the
fix/jinja-spacing
branch
from
August 29, 2023 13:31
5dd227b
to
726b59c
Compare
cidrblock
approved these changes
Aug 29, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll approve, but @ssbarnea will need to as well since I've got commits in here.
audgirka
force-pushed
the
fix/jinja-spacing
branch
from
August 31, 2023 12:31
78f08d4
to
5c482d9
Compare
ssbarnea
approved these changes
Aug 31, 2023
ssbarnea
changed the title
Transform for
Add auto-fixing implementation for Aug 31, 2023
jinja[spacing]
rulejinja[spacing]
rule
nrdufour
added a commit
to nrdufour/home-ops
that referenced
this pull request
Sep 7, 2023
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ansible-lint](https://github.com/ansible/ansible-lint) ([changelog](https://github.com/ansible/ansible-lint/releases)) | minor | `==6.18.0` -> `==6.19.0` | --- ### Release Notes <details> <summary>ansible/ansible-lint (ansible-lint)</summary> ### [`v6.19.0`](https://github.com/ansible/ansible-lint/releases/tag/v6.19.0) [Compare Source](ansible/ansible-lint@v6.18.0...v6.19.0) #### Minor Changes - Add auto transform for no-log-password rule ([#​3708](ansible/ansible-lint#3708)) [@​ajinkyau](https://github.com/ajinkyau) - Add auto-fixing implementation for key-order\[task] rule ([#​3705](ansible/ansible-lint#3705)) [@​ajinkyau](https://github.com/ajinkyau) - Add auto-fixing implementation for `jinja[spacing]` rule ([#​3691](ansible/ansible-lint#3691)) [@​ajinkyau](https://github.com/ajinkyau) - Make schema validation messages more explicit ([#​3701](ansible/ansible-lint#3701)) [@​ssbarnea](https://github.com/ssbarnea) - Transform for deprecated-local-action rule ([#​3689](ansible/ansible-lint#3689)) [@​ajinkyau](https://github.com/ajinkyau) #### Bugfixes - Require ansible-compat>=4.1.10 ([#​3723](ansible/ansible-lint#3723)) [@​ssbarnea](https://github.com/ssbarnea) - Skip altered path warning for `ansible-lint` installed by `pipx` ([#​3720](ansible/ansible-lint#3720)) [@​chrysle](https://github.com/chrysle) - Update transform for `key-order` rule ([#​3719](ansible/ansible-lint#3719)) [@​ajinkyau](https://github.com/ajinkyau) - Allow installation of pre-release collection version as dependencies ([#​3716](ansible/ansible-lint#3716)) [@​ssbarnea](https://github.com/ssbarnea) - Avoid deprecated-bare-vars false positive with file paths ([#​3709](ansible/ansible-lint#3709)) [@​ssbarnea](https://github.com/ssbarnea) - Limit sequence-of-sequence indents to a single space ([#​3671](ansible/ansible-lint#3671)) [@​Qalthos](https://github.com/Qalthos) - Avoid no-handlers false positives ([#​3702](ansible/ansible-lint#3702)) [@​ssbarnea](https://github.com/ssbarnea) - Add missing word to risky-shell-pipe docs ([#​3704](ansible/ansible-lint#3704)) [@​roock](https://github.com/roock) - Avoid yamllint truthy violations with github workflows ([#​3698](ansible/ansible-lint#3698)) [@​ssbarnea](https://github.com/ssbarnea) - Avoid false positive with var-name rule on roles ([#​3697](ansible/ansible-lint#3697)) [@​ssbarnea](https://github.com/ssbarnea) - Include links to documentation for schema validation errors ([#​3684](ansible/ansible-lint#3684)) [@​ssbarnea](https://github.com/ssbarnea) - Schema update ([#​3693](ansible/ansible-lint#3693)) [@​cidrblock](https://github.com/cidrblock) - Use yaml.load_all for multiple yaml document ([#​3679](ansible/ansible-lint#3679)) [@​shatakshiiii](https://github.com/shatakshiiii) - Ignore user configured value for any_unparsed_is_failed ([#​3680](ansible/ansible-lint#3680)) [@​ssbarnea](https://github.com/ssbarnea) - Update rulebook schema ([#​3681](ansible/ansible-lint#3681)) [@​ssbarnea](https://github.com/ssbarnea) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4yMy4yIiwidXBkYXRlZEluVmVyIjoiMzYuMjMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Reviewed-on: https://git.home/nrdufour/home-ops/pulls/76 Co-authored-by: Renovate <[email protected]> Co-committed-by: Renovate <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related: #3634
Depends on #3693
When finding jina2 spacing errors a recommendation is produced, the key, value and path within the task is known. This information is added to the MatchError to be used later.
When transforming for a specific MatchError, use the metadata captured during the identification of the spacing issue to iterate the task and when a matching key and value are found, use the previously generated recommendation.
Because the MatchError was generated using a "normalized task" and the transform is operating on the original task, the path cannot be used to locate the key. This introduces the possibility or 2 identical key/value combinations being corrected out of order and is noted in the doc string of the respective function.