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

Ignore diagnostics by steep:ignore comment #1034

Merged
merged 3 commits into from
Jan 29, 2024
Merged

Ignore diagnostics by steep:ignore comment #1034

merged 3 commits into from
Jan 29, 2024

Conversation

soutaro
Copy link
Owner

@soutaro soutaro commented Jan 29, 2024

This PR implements ignoring diagnostics by embedded comments.

# Ignoring a range of lines

# steep:ignore:start

foo()      # NoMethod is detected, but ignored

# steep:ignore:end


# Ignoring a specific line

foo() # steep:ignore
foo() # steep:ignore NoMethod

Possible enhancements:

  • Reporting unused ignore comments to be deleted later
  • Adding completion

(This is also proposed at #964, but the implementation is slightly different. It generates errors, but filters out at later step. It also reports unbalanced start-end comments.)

@soutaro soutaro added this to the Steep 1.7 milestone Jan 29, 2024
@soutaro soutaro merged commit 4e4e700 into master Jan 29, 2024
22 checks passed
@soutaro soutaro deleted the ignore branch January 29, 2024 07:49
@soutaro soutaro added Released The PR is already included in a published release and removed Released The PR is already included in a published release labels Jan 30, 2024
@soutaro soutaro added the Released The PR is already included in a published release label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Released The PR is already included in a published release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant