Closed stakach closed 8 months ago
I feel like this should include version common names like
error
It's not that common, therefore I didn't include it.
You can add it to your project's .ameba.yml
file.
it should probably add something like
|| begins_with?("#{allowed}_")
so nested exceptions can be handled likeex_parse
ex_io
etc
I disagree, exception variables should IMO have unified names.
Also
e
is not very descriptive ...
IMO it is - in the same way i
(for index) is.
... and breaks other rules like descriptive block naming.
It shouldn't, since it's explicitly whitelisted:
Seem pretty commonly used https://github.com/search?q=%28language%3ACrystal+%29+AND+%22rescue+error%22&type=code
more common than rescue exception
also missing exc
which is also quite commonly used
Yeah, in the same time rescue ex
has 6.9k occurrences (~10x more than rescue exc
) - i.e. all other uses are pretty marginal. I'm gonna add error
to the defaults though, since it was unaccounted for.
thanks mate!
Perhaps use cases such as ex_
prefix could be enabled with regex matching support?
Currently the default ameba options seem too limited.
%w[e ex exception]
I feel like this should include version common names likeerror
but also it should probably add something like|| begins_with?("#{allowed}_")
so nested exceptions can be handled likeex_parse
ex_io
etcAlso
e
is not very descriptive and breaks other rules like descriptive block naming.