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

Comment decorators fail in numerous situations #1510

Open
andrewvaughan opened this issue Feb 24, 2025 · 0 comments
Open

Comment decorators fail in numerous situations #1510

andrewvaughan opened this issue Feb 24, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@andrewvaughan
Copy link

Minimal .gitlab-ci.yml illustrating the issue

---
# @Description Code linting enforcement.
lint:

Expected behavior
If tabWidth for YAML is configured to something other than 2-spaces, this should work. If not, you get this error:

YAMLException: bad indentation of a mapping entry (13:10)

 10 | # @Description Code linting enforcement.
 11 | lint:
 12 |   gclDescription: Code linting enforcement.
 13 |     stage: test
---------------^

It looks like the injected gclDescription doesn't follow the editor's tab width configuration, creating a spacing error.

Additionally, @Description fails if it is not the only comment above the target, unlike most comment decorators. For example, I would expect this to work, but it fails:

#
# @Description some text here
#
# Additional context
lint:

Host information
docker devcontainer (Node)
gitlab-ci-local 4.57.0

Containerd binary
Docker.

@firecow firecow added the bug Something isn't working label Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants