CABF SMIME lints failed to be registered in the CLI due to a missing blank import#761
Merged
Conversation
Contributor
|
Nice, thanks! I had almost fixed this myself before bringing it up but I missed the import in zlint.go. Good to know about that detail! |
zakird
approved these changes
Nov 5, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for your patience @cardonator
The infrastructure for a lint to register itself leans on Go's magical
initfunction which is automatically executed at program startup.However, the
initfunction is not executed if the package is not referred to by the main program, which is whyzlint.gofeatures a short list of imports performed solely for the side effect of triggering theseinitfunctions.Unfortunately, we missed this import when building the CABF SMIME framework. The cause is that almost all of the testing, tooling, and integration tests are focused on either the library usage of Zlint or on testing lints against the corpus of certs scraped from the wild. Such a CLI integration test would be a valuable thing to consider spending time on, however I believe it is out of scope of this particularly pernicious issue.
Resolves #759