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

Output full paths to files with errors from lint #11365

Closed
tillig opened this issue Sep 20, 2022 · 11 comments · May be fixed by #12496
Closed

Output full paths to files with errors from lint #11365

tillig opened this issue Sep 20, 2022 · 11 comments · May be fixed by #12496
Labels
feature help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. Stale

Comments

@tillig
Copy link

tillig commented Sep 20, 2022

I'm trying to create a problem matcher for VS Code such that I can include helm lint as part of the build for a chart repo and have problems tied back to actual files.

Right now when helm lint finds a problem, it outputs locations of problems in a sort of relative way:

$ helm lint
==> Linting .
[ERROR] Chart.yaml: version is required
[INFO] Chart.yaml: icon is recommended
[ERROR] templates/: validation: chart.metadata.version is required
[ERROR] : unable to load chart
	validation: chart.metadata.version is required

Error: 1 chart(s) linted, 1 chart(s) failed

In order to actually indicate the file that is built, you end up needing to put three things together:

  • The current folder (in case you didn't pass in a path or passed in a relative path)
  • The message from the linter (==> Linting _____)
  • The name of the file after [ERROR] or [INFO]

That's not terribly easy to do from an automated build "find the file based on a regex match" sort of thing.

It would be nice if the helm lint messages could optionally output an absolute path to the file with the issue, something like:

$ helm lint --full-paths
==> Linting /Users/myname/path/to/chart/
[ERROR] /Users/myname/path/to/chart/Chart.yaml: version is required
[INFO] /Users/myname/path/to/chart/Chart.yaml: icon is recommended
[ERROR] /Users/myname/path/to/chart/templates/: validation: chart.metadata.version is required
[ERROR] : unable to load chart
	validation: chart.metadata.version is required

Error: 1 chart(s) linted, 1 chart(s) failed

If that was the case, you could very easily create a plugin problem matcher to integrate helm lint into an IDE like VS Code.

@joejulian
Copy link
Contributor

See also #11357

@joejulian joejulian added feature help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Sep 20, 2022
@github-actions
Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Dec 20, 2022
@tillig
Copy link
Author

tillig commented Dec 20, 2022

Still an issue.

@github-actions github-actions bot removed the Stale label Dec 21, 2022
@github-actions
Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Mar 21, 2023
@tillig
Copy link
Author

tillig commented Mar 21, 2023

Still am issue.

@github-actions github-actions bot removed the Stale label Mar 22, 2023
@github-actions
Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Jun 20, 2023
@tillig
Copy link
Author

tillig commented Jun 20, 2023

Still an issue.

@github-actions github-actions bot removed the Stale label Jun 21, 2023
@github-actions
Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Sep 20, 2023
@tillig
Copy link
Author

tillig commented Sep 20, 2023

Still an issue.

Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Dec 21, 2023
Bhargav-InfraCloud added a commit to Bhargav-InfraCloud/helm that referenced this issue Apr 4, 2024
The flag --full-path enables printing full paths in linter warnings
and errors.

Fixes helm#11365

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
@Bhargav-InfraCloud
Copy link
Contributor

/reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants