Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
zachahn committed Aug 12, 2024
1 parent 47106c9 commit 54dee45
Showing 1 changed file with 42 additions and 3 deletions.
45 changes: 42 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ This set of rules serves to remove Sorbet from a codebase.

I like Sorbet a lot! But sometimes, I need to remove it from a codebase.

I use it to remove Sorbet type definitions in the gems I ship.

## Note!!!

* This gem does not cover all use-cases.
* This gem hasn't been tested very thoroughly.
* This gem produces ugly code. I recommend running your regular linter after.
* Please use version control! Please remember to commit your changes!
* Please run your tests to make sure your code is still okay!

## Installation

Install the gem and add to the application's Gemfile by executing:
Expand All @@ -12,17 +22,46 @@ Install the gem and add to the application's Gemfile by executing:

## Usage

Put this into your `.rubocop.yml`.
I strongly recommend that you use version control and commit all your changes
before using this gem. This gem edits your code, and honestly it isn't tested
too well.

Here's an example of how to run this and automatically remove all instances of
Sorbet:

```bash
bundle exec rubocop \
--require rubocop-no_sorbet --only NoSorbet --autocorrect \
app lib exe *.gemspec
```

Optionally, you can create a configuration file:

```yaml
# Name this file `.rubocop_no_sorbet.yml`
---
require:
- rubocop-no_sorbet

AllCops:
DisabledByDefault: true
Exclude:
- bin/**/*
- test/**/*
Include:
- app/**/*.rb
- exe/**/*
- lib/**/*.rb
- '*.gemspec'

NoSorbet:
Enabled: Yes
```
You can also specify this at runtime.
You can then run the slightly shorter:
```bash
rubocop --require rubocop-no_sorbet
bundle exec rubocop --config .rubocop_no_sorbet.yml --autocorrect
```

## Development
Expand Down

0 comments on commit 54dee45

Please sign in to comment.