Skip to content
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

yamllint not reporting line numbers #70

Closed
IanMoroney opened this issue Jun 21, 2021 · 4 comments
Closed

yamllint not reporting line numbers #70

IanMoroney opened this issue Jun 21, 2021 · 4 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@IanMoroney
Copy link

I noticed that ct lint calls yamllint to validate Chart.yaml, but when it spots a warning or an error, it doesn't tell you which line it is:

>>> yamllint --config-file /home/runner/_work/_tool/ct/v3.3.0/x86_64/etc/lintconf.yaml mychart/Chart.yaml
Error: [comments] too few spaces before comment
Error: Error linting charts: Error processing charts

Conversely, yamllint itself in its default configuration reports the line number:

yamllint b2c-perf-test-client/Chart.yaml 
b2c-perf-test-client/Chart.yaml
  1:1       warning  missing document start "---"  (document-start)
  26:14     warning  too few spaces before comment  (comments)

Either:
How do we get ct lint to report line numbers,
or
Can you configure lintconf.yaml to report line numbers by default ?

Additionally, it may be the case where your lintconf.yaml is reporting warnings as errors, as yamllint 1.26.1 only reported the comment issue as a warning and not an error.

@tylerauerbeck
Copy link

@IanMoroney This may get more responses by creating over in the main ct repo: https://github.com/helm/chart-testing

@gcaracuel
Copy link

This issues seems a clone of #67

@Rotonen
Copy link

Rotonen commented Sep 9, 2021

The line numbers missing is an artefact of the auto output format picking up it is running in a Github Action and that output format not having the file names or line numbers on there. A design decision of yamllint itself.

https://github.com/adrienverge/yamllint/blob/85ccd625a382423edd988fcb796c4dd5897886fb/yamllint/cli.py#L112-L114

Forcing the output format of yamllint to standard would get you the output you seek.

@cpanato cpanato added documentation Improvements or additions to documentation question Further information is requested labels Sep 27, 2022
@cpanato
Copy link
Member

cpanato commented Mar 24, 2023

closing as inactive

@cpanato cpanato closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants