--config should fail on invalid keys
lkysow opened this issue · comments
Luke Kysow commented
Spent some time debugging why Enabled
and Linter
didn't work. (The reason is that they keys are Enable
and Linters
).
Would be nice to fail the config parsing on invalid keys.
Alec Thomas commented
Unfortunately Go's JSON parser doesn't have that capability. I agree it would be very useful though :(
Luke Kysow commented
I think this might work: https://golang.org/pkg/encoding/json/#Decoder.DisallowUnknownFields
Alec Thomas commented
Aha nice! I completely did not realise they'd added that. Send a PR!
Luke Kysow commented
I should! I love your project. Let me see if I can find some time.