You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Initially I thought this was a schema issue, but it appears to be an incompatibility with the yaml ansible-lint rule, aka yamllint, and how antsibull-changelog uses PyYAML to output changelog files.)
Antsibull-changelog currently outputs changelog.yaml files in a way that will always cause the yaml rule to error. It outputs change lists at the same indentation as the change type descriptor. For example, this is what yamllint expects for items under major_changes (or bugfixes, or minor_changes, etc):
releases:
1.0.0:
release_date: '2020-04-01'
codename: White Rabbit
changes:
release_summary: This is the initial White Rabbit release. Enjoy!
major_changes:
- The authentication method handling has been rewritten. # Two spaces indented from `major changes`
and this is how antsibull-changelog outputs:
releases:
1.0.0:
release_date: '2020-04-01'
codename: White Rabbit
changes:
release_summary: This is the initial White Rabbit release. Enjoy!
major_changes:
- The authentication method handling has been rewritten. # No indention from `major changes
This will always cause a two-space indentation yaml[indentation] ansible-lint error by default. Some ansible-lint users have custom .yamllint config files to get around this, but ideally there should be compatibility or config options to meet compatibility.
I've opened an enhancement issue on antsibull-changelog here: ansible-community/antsibull-changelog#152, but wanted to raise this here as well in case there is an alternative solution through lint.
Issue Type
Bug Report
OS / ENVIRONMENT
ansible-lint --versionansible-lint 24.2.0 using ansible-core:2.15.4 ansible-compat:4.1.11 ruamel-yaml:0.18.6 ruamel-yaml-clib:0.2.8
Installed via source, then upgraded.
STEPS TO REPRODUCE
Generate a changelog using antsibull-changelog that contains a change type (major_changes, minor_changes, etc), then run ansible-lint (latest).
Desired Behavior
ansible-lint should pass with the default antsibull-changelog generated changelog.yaml file.
Actual Behavior
An error similar to the below will appear:
yaml[indentation]: Wrong indentation: expected 8 but found 6
changelogs/changelog.yaml:11
The text was updated successfully, but these errors were encountered:
Summary
(Initially I thought this was a schema issue, but it appears to be an incompatibility with the
yaml
ansible-lint rule, aka yamllint, and how antsibull-changelog uses PyYAML to output changelog files.)Antsibull-changelog currently outputs
changelog.yaml
files in a way that will always cause theyaml
rule to error. It outputs change lists at the same indentation as the change type descriptor. For example, this is what yamllint expects for items undermajor_changes
(orbugfixes
, orminor_changes
, etc):and this is how antsibull-changelog outputs:
This will always cause a two-space indentation
yaml[indentation]
ansible-lint error by default. Some ansible-lint users have custom .yamllint config files to get around this, but ideally there should be compatibility or config options to meet compatibility.I've opened an enhancement issue on antsibull-changelog here: ansible-community/antsibull-changelog#152, but wanted to raise this here as well in case there is an alternative solution through lint.
Issue Type
OS / ENVIRONMENT
Installed via source, then upgraded.
STEPS TO REPRODUCE
Generate a changelog using antsibull-changelog that contains a change type (major_changes, minor_changes, etc), then run ansible-lint (latest).
Desired Behavior
ansible-lint should pass with the default antsibull-changelog generated changelog.yaml file.
Actual Behavior
An error similar to the below will appear:
The text was updated successfully, but these errors were encountered: