Skip to content

Conversation

1ntEgr8
Copy link
Contributor

@1ntEgr8 1ntEgr8 commented Jul 26, 2021

This PR enables installing our custom MacOS clang-tidy binaries. It also updates related documentation.

The binaries are produced by this CI job, and are published to S3.

This PR does not handle versioning of the downloaded binaries as this is being worked on separately. See pytorch/test-infra#73

Test Plan:
On a MacOS machine, run

python3 -m tools.linter.install.clang_tidy
.clang-tidy-bin/clang-tidy --checks="*" --list-checks | grep "misc-max-tokens"

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jul 26, 2021

🔗 Helpful links

💊 CI failures summary and remediations

As of commit c54caa9 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@1ntEgr8 1ntEgr8 requested review from driazati, malfet and janeyx99 July 26, 2021 19:45
@janeyx99
Copy link
Contributor

I ran it locally, and got:

janeyx@janeyx-mbp pytorch % python3 -m tools.linter.install.clang_tidy
.clang-tidy-bin/clang-tidy --checks="*" --list-checks | grep "misc-max-tokens"

Downloading clang-tidy to /Users/janeyx/pytorch/.clang-tidy-bin
0% |################################################################| 100%
Using clang-tidy located at /Users/janeyx/pytorch/.clang-tidy-bin/clang-tidy
    misc-max-tokens

which I believe is correct.

@facebook-github-bot
Copy link
Contributor

@1ntEgr8 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@1ntEgr8 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@driazati driazati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM either way on instructions

git diff HEAD~1 > pr.diff
python tools/linter/clang_tidy --paths torch/csrc --diff-file "pr.diff"
```
1. Install clang-tidy.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use the Makefile below and these are encoded in make setup_lint, should we suggest that here instead of running the steps manually? It installs some other packages for the other linters but devs probably want those anyways

@facebook-github-bot
Copy link
Contributor

@1ntEgr8 merged this pull request in 2a83f24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants