Commit Graph

3 Commits

Author SHA1 Message Date
REX51
9728584cca Replaced whitelist with allowlist (#45796)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/41752

Pull Request resolved: https://github.com/pytorch/pytorch/pull/45796

Reviewed By: dzhulgakov

Differential Revision: D24125214

Pulled By: VitalyFedyunin

fbshipit-source-id: 5b06c1fdaa90a60e8a6efc2e61f37fd647cf0ae7
2020-10-06 09:18:51 -07:00
Michael Suo
af08334c63 better local command for clang-format check (#37127)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37127

Wrap what we're running in CI in a small script so we can exactly reproduce it locally if ncessary.

Test Plan: Imported from OSS

Reviewed By: malfet

Differential Revision: D21196804

Pulled By: suo

fbshipit-source-id: 45497daae4bafd236a0d1bb1480841f0d9f39262
2020-04-24 12:19:57 -07:00
Michael Suo
cf77e56938 clang-format don't run on master (#37058)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37058

We shouldn't add advisory checks to master, because PRs will get
reverted if they fail. This PR makes the following changes:

1. Factor out the binary fetch logic into `clang_format_utils.py`
2. Copypasta the canonical git integration from llvm and modify it to
use our binary fetcher. No more bikeshedding about how to integrate,
we just use the standard integration.
3. Change the CI job to run on pull-requests only and use
`git-clang-format`.
4. The original `clang_format.py` is now renamed `clang_format_all.py`
to reflect its purpose.
5. The pre-commit hook has been changed to use `git-clang-format`.

For pre-commit hook users: no changes required.
For others: add `tools/git-clang-format` to your PATH and you can do `git clang-format` to format your working tree.

Test Plan: Imported from OSS

Differential Revision: D21180893

Pulled By: suo

fbshipit-source-id: f8358fb7ce26f11585226aaac5ed89d379257bfb
2020-04-22 11:37:22 -07:00