-
Notifications
You must be signed in to change notification settings - Fork 281
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
Possible bug or improvement for error undefined method `keys' #1734
Comments
fbuys
changed the title
Possible bug or improvement undefined method `keys'
Possible bug or improvement for error undefined method `keys'
Oct 6, 2023
fbuys
added a commit
to fbuys/reek
that referenced
this issue
Oct 12, 2023
This PR adds a more descriptive error message when users add a detector without configuration. Before this change a NoMethodError exception was raised with an unclear error message. Now we catch this exception and provide a more helpful error message. A better future option might be add [dry-schema](https://dry-rb.org/gems/dry-schema/1.13/) See: troessner#1734
This was referenced Oct 12, 2023
fbuys
added a commit
to fbuys/reek
that referenced
this issue
Oct 26, 2023
This commit only adds the schema, but we did not remove kwalify yet. See: troessner#1734
fbuys
added a commit
to fbuys/reek
that referenced
this issue
Oct 30, 2023
This commit only adds the schema, but we did not remove kwalify yet. See: troessner#1734
fbuys
added a commit
to fbuys/reek
that referenced
this issue
Oct 30, 2023
The current validator (Kwalify) 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 issue: troessner#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.
fbuys
added a commit
to fbuys/reek
that referenced
this issue
Oct 30, 2023
The current validator (Kwalify) 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 issue: troessner#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. Changes include: - Update changelog - Add a validation section to How-To-Write-New-Detectors - Add schema specs - Update feature specs See: troessner#1734
fbuys
added a commit
to fbuys/reek
that referenced
this issue
Oct 30, 2023
The current validator (Kwalify) 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 issue: troessner#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. Changes include: - Update changelog - Add a validation section to How-To-Write-New-Detectors - Add schema specs - Update feature specs See: troessner#1742 See: troessner#1734
fbuys
added a commit
to fbuys/reek
that referenced
this issue
Nov 6, 2023
The current validator (Kwalify) 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 issue: troessner#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. Changes include: - Update changelog - Add a validation section to How-To-Write-New-Detectors - Add schema specs - Update feature specs - Catch schema validation error in lib/reek/configuration/configuration_file_finder.rb, so we have access to the config file path for the displayed error message. See: troessner#1742 See: troessner#1734
This has been fixed in #1749. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current behaviour
When a user:
It:
Expected behaviour
When a user:
It:
See:
lib/reek/configuration/configuration_converter.rb
(method convertible_attributes)See:
lib/reek/configuration/configuration_converter.rb
(method strings_to_regexes_for_detectors)See:
lib/reek/configuration/configuration_converter.rb
(method strings_to_regexes_for_directories)Repo:
bundle exec reek .
.reek.yml
configThe text was updated successfully, but these errors were encountered: