Closed jorisroovers closed 1 year ago
Original PR in #182. This PR is the same change re-implemented on top of latest main
, this avoided more complex rebasing of #182 and a force push (losing the existing commit in the PR).
I ended up removing the test because I don’t think it actually tested correctly.
What we really need here is an integration test, since it seems to be OS-level behavior that’s causing the issue. However, it might be OS specific - I’ve not been able to reproduce this issue. This complicates coming up with a good integration test. Existing integration tests passing indicate there’s no major regression with gitlint itself - I think that’s good enough for now.
--msg-filename type is now a Path and not a managed click.File. This makes it easier to control the opening and closing of the file.
Context manager will make sure that the file we use will be refreshed after edition.