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

Lint detail should not contain the line number #4851

Closed
crazy-max opened this issue Apr 16, 2024 · 0 comments
Closed

Lint detail should not contain the line number #4851

crazy-max opened this issue Apr 16, 2024 · 0 comments
Assignees

Comments

@crazy-max
Copy link
Member

When using --print=lint, detail field contains the affected line number such as (line 2):

{
    "warnings": [
      {
        "ruleName": "SelfConsistentCommandCasing",
        "description": "Commands should be in consistent casing (all lower or all upper)",
        "detail": "Lint Rule 'SelfConsistentCommandCasing': Command 'frOM' should be consistently cased (line 2)",
        "location": {
          "ranges": [
            {
              "start": {
                "line": 2
              },
              "end": {
                "line": 2
              }
            }
          ]
        }
      },
      ...
}

Sounds repetitive as this information is already available in location. This is also important if we want to use this field through GitHub annotations or other tool that already put the caption on the right line:

image

cc @daghack @tonistiigi

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

No branches or pull requests

2 participants