Includes FindHelmChartWhiteSpaces(), which takes a string, a yaml, and tries to parse it to find issues within the helm chart. Primary this is trying to find issues with white spacing, where each line should be at most off by 0 or -2, given exceptions that work according to the Helm spec.
The function will return a slice of windows (string slices) to represent the areas in the code that contain the issue that it found.
List of features
looks for spacing issues with the next line is off by more than 2
if next line is an array, it can be off by 4 or 2 spaces.
if the line has special breaks (|-, >-, etc.) identified in YAML, these are now ignored areas in the YAML.
if the YAML has empty lines, these are acceptable.
if the YAMl has spaces in an empty line, there is an option to control whether to see these or not. Use the DetectWhiteSpacesInEmptyLines option when parsing.
Context
Users were having issues with formatting in the helm chart. Particularly when faced with this in the YAML. The 2nd line has 2 to many spaces, and so on.
Description
Includes
FindHelmChartWhiteSpaces()
, which takes a string, a yaml, and tries to parse it to find issues within the helm chart. Primary this is trying to find issues with white spacing, where each line should be at most off by 0 or -2, given exceptions that work according to the Helm spec.The function will return a slice of windows (string slices) to represent the areas in the code that contain the issue that it found.
List of features
|-
,>-
, etc.) identified in YAML, these are now ignored areas in the YAML.DetectWhiteSpacesInEmptyLines
option when parsing.Context
Users were having issues with formatting in the helm chart. Particularly when faced with this in the YAML. The 2nd line has 2 to many spaces, and so on.
Use in Gloo
Link to the Gloo PR on usage.