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

Make exit code success when Steep has unreported type errors #171

Merged
merged 1 commit into from
Jul 24, 2020

Conversation

pocke
Copy link
Contributor

@pocke pocke commented Jul 23, 2020

Probably it fixes #158

problem

Steep exits with status code 1 unexpectedly. The cause is type-checking options.
Steep CLI filters type errors by this option.

source_file.errors.select {|error| target.options.error_to_report?(error) }.each do |error|

But the option does not affect the exit status code.
Becuase it checks target.errors.empty? but target.errors contains unreported type errors.

if project.targets.all? {|target| target.status.is_a?(Project::Target::TypeCheckStatus) && target.no_error? && target.errors.empty? }

solution

Remove unreported type errors from Steep::Project::Target#errors.

Copy link
Owner

@soutaro soutaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 💯

@soutaro soutaro merged commit 6b7c66d into soutaro:master Jul 24, 2020
@pocke pocke deleted the exit-0 branch July 24, 2020 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

steep check fails with no messages
2 participants