Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TorchNonPublicAliasVisitor #33

Merged
merged 1 commit into from
Mar 15, 2024
Merged

Add TorchNonPublicAliasVisitor #33

merged 1 commit into from
Mar 15, 2024

Conversation

kit1980
Copy link
Contributor

@kit1980 kit1980 commented Mar 15, 2024

Add a rule to suggest using public aliases for non-public functions that have it.

This PR implements a lint-only rule with a suggestion for default_collate and default_convert.
I will added an actual codemod for this in a different PR.

Also this PR introduces an utility method add_violation to reduce code duplication.
I'll refactor other rules to use add_violation in a different PR.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 15, 2024
@kit1980 kit1980 requested review from huydhn and izaitsevfb March 15, 2024 00:49
@kit1980 kit1980 marked this pull request as ready for review March 15, 2024 00:49
@malfet malfet merged commit 42bb4a8 into main Mar 15, 2024
2 checks passed
@kit1980 kit1980 deleted the sdym/default_collate branch March 19, 2024 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants