Add mdtests for Ruff (#24617)
Summary
--
This PR adds the `ruff_test` crate, a parallel crate to `ty_test` for
Ruff, to
enable the new mdtests in `ruff_linter`. I opted to follow the
`Db`-based
structure of `ty_test` to simplify the integration, but we end up
basically just
unpacking the files from the `Db` to call the `test_contents` function
from the
linter.
I also updated the section of the contributing guidelines on lint rule
testing to suggest using mdtests.
Test Plan
--
I copied over the S704 tests into a new mdtest. I selected this rule
because it had several separate fixture files that all used different
settings and each of the fixtures was relatively short. I had initially
reached for a more complicated rule (UP046), but this seemed less likely
to clutter the diff while still exercising most mdtest features.
---------
Co-authored-by: Micha Reiser <micha@reiser.io>