Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

kubeaudit autofix changes some yaml which then fails in yamllint #554

Open
1 of 2 tasks
arthurzenika opened this issue May 12, 2023 · 1 comment
Open
1 of 2 tasks

Comments

@arthurzenika
Copy link

ISSUE TYPE
  • Bug Report
  • Feature Idea

BUG REPORT

SUMMARY

First of all, congrats on kubeaudit autofix, it's a great idea and we're looking forward to using it more.

kubeaudit autofix changes some spacing before comments of section that it is not changing, an example below

image

yamllint is used to verify yaml syntax errors detects this as a problem.

ENVIRONMENT
  • Kubeaudit version: 0.22.0
  • Kubeaudit install method: Binary
STEPS TO REPRODUCE

Do kubeaudit autofix on a yaml file that contains a double space followed by a comment # comment here

EXPECTED RESULTS

Ideally kubeaudit would not touch that comment.

ACTUAL RESULTS

The spaces are changed

ADDITIONAL INFORMATION

There is also another case where kubeaudit adds an empty line which is also an error/warning in yamllint

@github-actions
Copy link

Thanks for opening your first issue here! Be sure to follow the issue template!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant