Skip to content

Commit

Permalink
issuance: ignore some ignored lints (#7771)
Browse files Browse the repository at this point in the history
This improves deployability for the v3.6.2 release of zlint.

Fixes #7756
  • Loading branch information
jsha authored Oct 28, 2024
1 parent b69c005 commit 3377102
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion issuance/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,18 @@ func NewProfile(profileConfig *ProfileConfig) (*Profile, error) {
return nil, fmt.Errorf("validity period %q is too large", profileConfig.MaxValidityPeriod.Duration)
}

lints, err := linter.NewRegistry(profileConfig.IgnoredLints)
// TODO(#7756): These lint names don't yet exist in our current zlint v3.6.0 but exist in v3.6.2.
// In order to upgrade without throwing errors, we need to add these to our ignored lints.
// However, v3.6.0 will error if it sees ignored lints it doesn't recognize. Solution: filter
// out these specific lints. As part of the PR that updates to v3.6.2, we will remove this code.
var ignoredLints []string
for _, lintName := range profileConfig.IgnoredLints {
if lintName != "e_cab_dv_subject_invalid_values" && lintName != "w_ext_subject_key_identifier_not_recommended_subscriber" {
ignoredLints = append(ignoredLints, lintName)
}
}

lints, err := linter.NewRegistry(ignoredLints)
cmd.FailOnError(err, "Failed to create zlint registry")
if profileConfig.LintConfig != "" {
lintconfig, err := lint.NewConfigFromFile(profileConfig.LintConfig)
Expand Down

1 comment on commit 3377102

@Busterkinng88
Copy link

Choose a reason for hiding this comment

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

🤴

Please sign in to comment.