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

CABF SMIME lints failed to be registered in the CLI due to a missing blank import #761

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

christopher-henderson
Copy link
Member

@christopher-henderson christopher-henderson commented Nov 4, 2023

Thank you for your patience @cardonator

The infrastructure for a lint to register itself leans on Go's magical init function which is automatically executed at program startup.

However, the init function is not executed if the package is not referred to by the main program, which is why zlint.go features a short list of imports performed solely for the side effect of triggering these init functions.

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

@cardonator
Copy link
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 zakird merged commit f9f30bc into master Nov 5, 2023
8 checks passed
@zakird zakird deleted the brokensmimecli branch November 5, 2023 09:10
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.

Regression in SMIME lint dispatch from the CLI
3 participants