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

Format output as filename:lineno: message #434

Open
pawamoy opened this issue Apr 14, 2024 · 0 comments
Open

Format output as filename:lineno: message #434

pawamoy opened this issue Apr 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@pawamoy
Copy link

pawamoy commented Apr 14, 2024

Context

Consoles within IDEs (or even in regular shell sessions) very often support the syntax filename:lineno: and allow clicking on such strings to open the corresponding file, at the corresponding line number, in the current IDE or in the preferred editor.

I understand that line numbers might not be correct after modification of Markdown files, but they're at least probably very close to the right ones.

Proposal

I suggest changing the output format from

Warning: Failed formatting content of a yaml code block (line 214 before formatting). Filename: /media/data/dev/website/docs/posts/save-pytest-logs-as-artifact-gitlab-ci.md

to

/media/data/dev/website/docs/posts/save-pytest-logs-as-artifact-gitlab-ci.md:214: warning: Failed formatting content of a yaml code block

Maybe even use a relative path if possible:

docs/posts/save-pytest-logs-as-artifact-gitlab-ci.md:214: warning: Failed formatting content of a yaml code block

Maybe also concatenate the additional information at the end of the message, so instead of two lines:

docs/posts/save-pytest-logs-as-artifact-gitlab-ci.md:214: warning: Failed formatting content of a yaml code block
error: Failed to parse at 1:1: Unexpected token Indent

...concatenate as one:

docs/posts/save-pytest-logs-as-artifact-gitlab-ci.md:214: warning: Failed formatting content of a yaml code block: Failed to parse at 1:1: Unexpected token Indent

...though I'm not familiar with all the possible error messages so it might not make sense.

Tasks and updates

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant