troessner / reek

Code smell detector for Ruby
https://github.com/troessner/reek
MIT License
4k stars 279 forks source link

Consider replacing the yaml schema validator #1742

Closed fbuys closed 7 months ago

fbuys commented 8 months ago

The current validator seems outdated and lacks good documentation.

A recent issue showed that we could improve the schema validation to also check and warn against missing configurations See: #1734

dry-schema provide good documentation and it looks like it also provides the features we require.

Structural validation where key presence can be verified separately from values. This removes ambiguity related to "presence" validation where you don't know if value is indeed nil or if a key is missing in the input hash

mvz commented 8 months ago

I agree. dry-schema looks great.

mvz commented 8 months ago

@troessner WDYT? I think you picked Kwalify originally so may have more of an opinion on this.

troessner commented 8 months ago

Yeah, I think when I picked Kwalify dry-schema didn't exist yet, time flies 😆 I agree that dry-schema looks great, would certainly be open to a PR that introduces it!

fbuys commented 8 months ago

I'll try to open a PR soon that adds dry-schema, seems like that might be a 2 in 1 win (fixing this issue and https://github.com/troessner/reek/pull/1741).

Thank you very much for the feedback @mvz and @troessner 🙇

fbuys commented 7 months ago

I opened a PR that could close this issue