Skip to content

Conversation

cgwalters
Copy link
Collaborator

Internal only change, but prep for future work; I want to track the version lints were introduced in, support clearly differentiating between warnings and fatal errors, etc.

Specifically motivated by custom base image work
coreos/rpm-ostree#5221
but also obviously useful in general.

Copy link
Contributor

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Smart idea! Independent of this PR: Could we improve the docs of the lint command? It would be great to know which linters are being run and what we're checking for. Ecosystem engineering is looking into it for best practices etc.

Internal only change, but prep for future work; I want to track
the version lints were introduced in, support clearly differentiating
between warnings and fatal errors, etc.

Specifically motivated by custom base image work
coreos/rpm-ostree#5221
but also obviously useful in general.

Signed-off-by: Colin Walters <walters@verbum.org>
Everything right now is fatal, but this is prep for adding non-fatal
warnings (actually more like the original motivation of lints).

Signed-off-by: Colin Walters <walters@verbum.org>
Add an internal error type, and switch to using a nested
`Result<Result<>>` approach for lints. This allows
cleanly distinguishing between e.g. "we failed to open
a file" from "the lint correctly/successfully found something wrong".

This is also helpful for being able to skip lint failures - we
wouldn't want to silently skip runtime failures.

Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters changed the title lints: Add a structure with more info lints: Various improvements Jan 17, 2025
@cgwalters cgwalters merged commit 4210808 into bootc-dev:main Jan 17, 2025
25 checks passed
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

Successfully merging this pull request may close these issues.

2 participants