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

Type checking with expected type errors #303

Merged
merged 11 commits into from
Feb 7, 2021
Merged

Type checking with expected type errors #303

merged 11 commits into from
Feb 7, 2021

Conversation

soutaro
Copy link
Owner

@soutaro soutaro commented Feb 6, 2021

This PR is to add --with-expectations and --save-expectations option to steep check.

スクリーンショット 2021-02-07 0 52 36

  • When --with-expectations option is specified, it confirms that if reported type errors are expected ones.
  • When --save-expectations option is specified, it saves current type errors as expectations file.

The options are for running type checking in CI for the cases:

  1. When type errors are expected (this would happen when you are writing RBS files)
  2. When type errors cannot be removed (this would happen because of the poor experience provided by Steep 😢)

The workflow we assume is:

  1. Run Steep and confirm if the current type errors are what you want.
  2. Save the current status with --save-expectations.
  3. Run Steep with --with-expectations in CI.

ToDos

  • What if CLI arguments are given to steep check???
  • Update test:output tools.

@soutaro soutaro marked this pull request as ready for review February 7, 2021 12:33
@soutaro soutaro merged commit f935bf0 into master Feb 7, 2021
@soutaro soutaro deleted the expectations branch February 7, 2021 12:40
@palkan
Copy link
Sponsor

palkan commented Dec 15, 2021

Hey @soutaro,

Just found this feature—really helpful!

What about making it possible to specify expectations_path in the Steepfile to always use it (without explicitly passing --with-expectations)?

Extracted into an issue #468

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.

2 participants