Open JamieMagee opened 1 year ago
At this point, I think all of the initialization and setup is complete. Now the work of adding types begins.
Something I noticed is that the Sorbet scan always runs. Perhaps it should only run if there are changes to Ruby files?
Example : Sorbet
In this example, the job took 2m~ of CI time with no benefits
I don't think it's a huge issue right now, but it could be scoped. I think *.rb
, Gemfile
, Gemfile.lock
and *.gemspec
files can influence type checking.
Code improvement description
Sorbet is a type checker for Ruby. It allows for gradual addition of types to an existing codebase and can work for both static and runtime type checking.
Currently, this issue is mainly a placeholder.
[x] Migrate
Layout/DotPosition
fromtrailing
toleading
Sorbet made 1 intentional compatibility break with Ruby syntax relating to multiline method calls which match Ruby keywords. Unfortunately, this happens quite often for RSpec's matchers. For example
and
,or
, etc.The fix is to switch from enforcing
trailing
dot position toleading
with Rubocop, to ensure compatibility with Sorbet. This can be done automatically, but is going to result in a very large diff.7789
[x] The above change is going to result in a rather large git diff. To preserve the usefulness of
git blame
a.git-blame-ignore-revs
file should be added at the root of the repository with the git object ID of the above commit.7992
[x] Install Sorbet and its dependencies.
8007
[x] Initialise Sorbet
8012
[x] Fix any initial errors
[x] Enforce static type checking as part of the build process
8017
[x] Install and enable the Sorbet RuboCop rules
8016
[x] Add the Sorbet Visual Studio Code extension to the list of recommended extensions, as well as the Dev Container configuration
8018