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

Provide descriptive debugging info on lint #197

Closed
ravisuhag opened this issue Sep 5, 2021 · 2 comments · Fixed by #308
Closed

Provide descriptive debugging info on lint #197

ravisuhag opened this issue Sep 5, 2021 · 2 comments · Fixed by #308
Assignees
Labels
core Core framework feature enhancement New feature or request

Comments

@ravisuhag
Copy link
Member

ravisuhag commented Sep 5, 2021

Is your feature request related to a problem? Please describe.
Running lint on meteor recipes does not provide which line in the recipe has an issue.

Describe the solution you'd like
Lint command should provide more descriptive error messages. Message should provide a file name, line number, and proper error message. As an example

recipes/sample.yaml:44:10:invalid config hostname for Columbus sink.
@ravisuhag ravisuhag added the enhancement New feature or request label Sep 5, 2021
@ravisuhag ravisuhag added this to the v0.2 milestone Sep 17, 2021
@ravisuhag ravisuhag changed the title Better info on lint command Provide descriptive debugging info on lint Sep 18, 2021
@ravisuhag ravisuhag added the core Core framework feature label Sep 18, 2021
@ravisuhag ravisuhag removed this from the v0.2 milestone Jan 3, 2022
@scortier scortier self-assigned this Feb 1, 2022
@scortier
Copy link
Member

scortier commented Feb 1, 2022

@ravisuhag @StewartJingga @mabdh
Generally , runtime.Caller(depth) method is used to display the line and file name, but while looking the stack trace on panic, the error is not referring to yaml file, the trace was only visible till cmd/lint.go. I am wondering then how can we provide line number particularly in yaml while improvement on error message can be helpful. Looking over other approaches as well.

wdyt ?

@ravisuhag
Copy link
Member Author

@scortier Check this thread.
go-yaml/yaml#108

@scortier scortier linked a pull request Feb 8, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core framework feature enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants