Open Earlopain opened 10 months ago
I've actually spend some time on continuing this PR. Learned about some rubocop internals which made that process much easier.
All tests are passing but there are still some things I want to do. They aren't explicitly handled in tests currently but I'll change that (in hopefully fewer months than this took).
@palkan if you got any feedback, I think this is at a good point for that now. Alternatively, I can leave it as is currently, and work on the other things in a separate PR.
Oh, haven't seen this; awesome! Yeah, we should migrate to this new API.
Originally posted by @palkan in https://github.com/rubocop/rubocop-md/issues/28#issuecomment-1851778687
Not ready at all but I'll put this up now anyways so you can see what I'm up to. For now I have updated the preprocess tests to pass with the new api.
The really nice part of this is that you provide multiple code ranges, so there's no way that two codeblocks interact with eachother, like in #26. A whole bunch of busywork is not needed anymore, like keeping track of the
config_store
. TheProcessedSource
has everything you need. In addition the rubocop cache should just work, though I don't know for certain. There's a test for that, so let's just see if that passes.TODO:
```ruby ruboco:disable all
works. Github renders that just fine. https://github.com/rubocop/rubocop-md/pull/36#issuecomment-2095456119