Skip to content

Add error handling for unrecognized subdirective/options - #6884

Merged
mohammed90 merged 2 commits into
caddyserver:masterfrom
steffenbusch:unrecognized-directives
Mar 8, 2025
Merged

mohammed90 merged 2 commits into
caddyserver:masterfrom
steffenbusch:unrecognized-directives

Conversation

@steffenbusch

Copy link
Copy Markdown
Contributor

Fixes #6863

@mohammed90 mohammed90 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! I played with the exhaustive linter config in golangci-lint, and it apparently cannot catch these cases. It can only identify them when the switch is over enums. Sigh.

Thanks for helping with this!

@mohammed90
mohammed90 merged commit f4432a3 into caddyserver:master Mar 8, 2025
@steffenbusch
steffenbusch deleted the unrecognized-directives branch March 8, 2025 21:12
@mholt

mholt commented Mar 8, 2025

Copy link
Copy Markdown
Member

Yep this is good, thank you!

mohammed90 pushed a commit to cedricziel/caddy that referenced this pull request Aug 29, 2025
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.

Reject unrecognized directives

3 participants