Skip to content

It'd be nice to have line numbers from wolfictl lint #1203

@justinvreeland

Description

@justinvreeland

Many editors have the ability to retrieve diagnostic information from various tools to report problems in gutters or tooltips and the like. I'd like to do the same for Wolfi packages but the linter doesn't provide line numbers which would be the main advantage to editor integration. For some messages there's no specific line number and probably the top of the block should be used for example:

wolfictl lint curl.yaml
2024/09/12 09:48:55 INFO Package: curl: [contains-epoch]: config curl.yaml has no package.epoch (ERROR)
2024/09/12 09:48:55 ERRO linting failed

Or missing parameters to pipelines:

wolfictl lint py3-cython.yaml
2024/09/12 09:53:54 INFO Package: py3-cython: [valid-pipeline-fetch-digest]: expected-sha256 or expected-sha512 is missing (ERROR)
2024/09/12 09:53:54 ERRO linting failed

It's hard to say where that line should be though reporting the line for the top of the package block doesn't seem unreasonable. Others though do have specific lines with errors that would be useful.

wolfictl lint curl.yaml
2024/09/12 09:51:09 INFO Package: curl: [bad-version]: invalid version 8.9.1asdfasdfas, could not parse (ERROR)
2024/09/12 09:51:09 ERRO linting failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-triageapplied to all new customer/user issues. Removed after triage occurs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions