Ensure proper file executable permissions in CI. (#24214)
Summary:
Some files have inproper executable permissions (which git tracks). This
commit adds a test in CI to ensure that executable permissions are off
for files that shouldn't have such a permission. This also ensures fixes
such as https://github.com/pytorch/pytorch/issues/21305 are complied in the future.
---
Disclaimer: I'm the author of flake8-executable, and I've been using it
on my end for over a month and thus I think it should be stable enough.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/24214
Differential Revision: D16783437
Pulled By: ezyang
fbshipit-source-id: 018e55798f1411983c65444e6304a25c5763cd19