Preserve the filenames being reviewed when generating temp files.
Review Request #11583 — Created April 8, 2021 and updated
Some tools (notably Checkstyle and Rubocop) have default rules that
check the name of the file being passed to it, ensuring they meet
requirements. Given that we're passing tempfiles with auto-generated
filenames, these tests were guaranteed to fail. We were able to disable
this for Rubocop, but this was a far more annoying procedure for
To address this now and going forward, we now generate a temp directory
and place the file inside of it, preserving the original name.
This is largely transparent to tool implementations, with the exception
of Rubocop, which no longer needed the filename rule suppressed. It does
impact nearly all unit tests, as those check the command being run, but
otherwise there's no impact.
Unit tests pass on Python 2.7 and 3.x.
This seems unrelated.