comments: clarify intent to ease future maintainence
Bug Descriptions
Output from trivy sometimes includes line info, but not column info. line info is used for both col and lnum in trivy.lua
Output from trivy does not always contain StartLine and EndLine fields. When they are missing, diagnostics are not created for each Misconfiguration from trivy, but instead a single diagnostic is generated with a lua error about accessing a nil value (StartLine).
To reproduce, open the following Dockerfile with trivy enabled as a linter, then look at the reported diagnostics:
FROM ubuntu:24.04
LABEL maintainer="John Doe <john.doe@aol.com>"
Changes
Bug Descriptions
Output from trivy sometimes includes line info, but not column info. line info is used for both col and lnum in trivy.lua
Output from trivy does not always contain StartLine and EndLine fields. When they are missing, diagnostics are not created for each Misconfiguration from trivy, but instead a single diagnostic is generated with a lua error about accessing a nil value (StartLine).
To reproduce, open the following Dockerfile with trivy enabled as a linter, then look at the reported diagnostics: