Skip to content
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

Diagnostics error level configuration #362

Closed
soutaro opened this issue Mar 28, 2021 · 1 comment · Fixed by #422 or #423
Closed

Diagnostics error level configuration #362

soutaro opened this issue Mar 28, 2021 · 1 comment · Fixed by #422 or #423
Assignees
Milestone

Comments

@soutaro
Copy link
Owner

soutaro commented Mar 28, 2021

All diagnostics are reported in one of two levels, error and ignored. I plan to add more levels and let users configure theirselves.

Configuration DSL

Giving a table from diagnostics classes to levels would be sufficient.

D = Steep::Diagnostics

code_config = D.default.merge({ D::Ruby::NoMethod => :error, D::Ruby::UnexpectedBlockGiven => :warning })

target :lib do
  code_diagnostics code_config
end
  • Users can find all possible keys under Steep::Diagnostics::Ruby module. 👍
  • Renaming class names would confuse the users. 👎
    • Autoloading can help adding warning messages and providing a compatibility mode.

Default configurations

I want to provide three default configurations of default, lenient, and strict.

@soutaro soutaro added this to the 2021-Q2 milestone Mar 28, 2021
@soutaro soutaro self-assigned this Mar 28, 2021
@palkan
Copy link

palkan commented Apr 23, 2021

That would be really great 👍 I wish we had an ability to silence some errors (e.g., Ruby::UnsupportedSyntax instead of ignoring the whole file).

@soutaro soutaro linked a pull request Aug 29, 2021 that will close this issue
5 tasks
@soutaro soutaro modified the milestones: 2021-Q2, 2021-Q3 Aug 29, 2021
@soutaro soutaro closed this as completed Aug 29, 2021
@soutaro soutaro linked a pull request Aug 31, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants