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
execute like '<yamllint|yamlfix> -c .yamllint.yaml .' (both freshly pip installed)
yamllint passes, yamlfix fails at a helm template file
yamlfix output doesn't seem to indicate what file actually failed
```
[+] YamlFix: Fixing files
Traceback (most recent call last):
File "/opt/homebrew/bin/yamlfix", line 8, in
sys.exit(cli())
^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/yamlfix/entrypoints/cli.py", line 119, in cli
fixed_code, changed = services.fix_files(files_to_fix, check, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/yamlfix/services.py", line 83, in fix_files
fixed_source = fix_code(source, config)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/yamlfix/services.py", line 162, in fix_code
source_code = fixer.fix(source_code=source_code)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/yamlfix/adapters.py", line 363, in fix
source_code = fixer(source_code)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/yamlfix/adapters.py", line 381, in _ruamel_yaml_fixer
for source_dict in source_dicts:
File "/opt/homebrew/lib/python3.11/site-packages/ruyaml/main.py", line 477, in load_all
yield constructor.get_data()
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/ruyaml/constructor.py", line 134, in get_data
return self.construct_document(self.composer.get_node())
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/ruyaml/composer.py", line 63, in get_node
return self.compose_document()
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/ruyaml/composer.py", line 96, in compose_document
node = self.compose_node(None, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/ruyaml/composer.py", line 142, in compose_node
node = self.compose_mapping_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/ruyaml/composer.py", line 222, in compose_mapping_node
item_value = self.compose_node(node, item_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/ruyaml/composer.py", line 142, in compose_node
node = self.compose_mapping_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/ruyaml/composer.py", line 215, in compose_mapping_node
while not self.parser.check_event(MappingEndEvent):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/ruyaml/parser.py", line 150, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/ruyaml/parser.py", line 636, in parse_block_mapping_key
if self.scanner.check_token(KeyToken):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/ruyaml/scanner.py", line 1826, in check_token
self.fetch_more_tokens()
File "/opt/homebrew/lib/python3.11/site-packages/ruyaml/scanner.py", line 229, in fetch_more_tokens
self.stale_possible_simple_keys()
File "/opt/homebrew/lib/python3.11/site-packages/ruyaml/scanner.py", line 362, in stale_possible_simple_keys
raise ScannerError(
ruyaml.scanner.ScannerError: while scanning a simple key
in "", line 7, column 3:
{{-★with★.Values.serviceMonitor. ...
^ (line: 7)
could not find expected ':'
in "", line 8, column 3:
annotations:
^ (line: 8)
```
2️⃣ Expected behavior
Yamlfix respects the same config file yamllint does, and doesn't fail on these helm template files. In places where it would panic, I'd expect the output to tell me what file failed validation
3️⃣ Scripts
ℹ️ Environment details
OS: macos
Python runtime
python3 --version
Python 3.11.6
The output of yamlfixer --version
yamlfix --version
1️⃣ Description
yamlfix does not respect the following config file, while yamllint does. Executing both like '<yamllint|yamlfix> -c .yamllint.yaml .'
📑 Steps to Reproduce
Steps to reproduce the behavior:
2️⃣ Expected behavior
Yamlfix respects the same config file yamllint does, and doesn't fail on these helm template files. In places where it would panic, I'd expect the output to tell me what file failed validation
3️⃣ Scripts
ℹ️ Environment details
python3 --version
Python 3.11.6
yamlfixer --version
yamlfix --version
Additional context
This also fails when explicitly passing an exclude flag like
yamlfix -c .yamllint.yaml --exclude='**/charts/**' .
The text was updated successfully, but these errors were encountered: