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

Is the omission of RFC8813 intentional? #877

Closed
yukoori opened this issue Sep 6, 2024 · 1 comment
Closed

Is the omission of RFC8813 intentional? #877

yukoori opened this issue Sep 6, 2024 · 1 comment
Assignees

Comments

@yukoori
Copy link

yukoori commented Sep 6, 2024

Looking at UnmarshalJSON and FromString in file lint/source.go, there is no processing for RFC8813.

So when verifying using zlint, if we add RFC8813 to the options, the following error occurs.

5, unable to configure included/exclude lints: unknown lint source in list: "RFC8813".

We solved the problem by modifying the code as follows. Could you please apply it to the distribution version?

func (s *LintSource) UnmarshalJSON(data []byte) error {
        ... 
	switch LintSource(throwAway) {
	case RFC8813, RFC5280, RFC5480, RFC5891, RFC8813, CABFBaselineRequirements, CABFEVGuidelines, CABFSMIMEBaselineRequirements, MozillaRootStorePolicy, AppleRootStorePolicy, Community, EtsiEsi:
		*s = LintSource(throwAway)
		return nil
        ...
	}
}
func (s *LintSource) FromString(src string) {
        ...
	switch LintSource(src) {
	case RFC5280:
		*s = RFC5280
	case RFC5480:
		*s = RFC5480
	case RFC5891:
		*s = RFC5891
	case RFC8813:
		*s = RFC8813
	...
	}
}

It's a handling issue with the options, but the function is working fine.

Thank you.

@christopher-henderson christopher-henderson self-assigned this Sep 8, 2024
@christopher-henderson
Copy link
Member

Fixed in #879

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

No branches or pull requests

2 participants