Skip to content

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

Merged
zakird merged 1 commit into
masterfrom
brokensmimecli
Nov 5, 2023
Merged

CABF SMIME lints failed to be registered in the CLI due to a missing blank import#761
zakird merged 1 commit into
masterfrom
brokensmimecli

Conversation

@christopher-henderson

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

Copy link
Copy Markdown
Member

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
Copy Markdown
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
@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