-
Notifications
You must be signed in to change notification settings - Fork 90
BC Linter
The BC Linter aims to reduce backward compatibility-breaking changes in the PyTorch codebase by detecting BC-breaking changes early (at PR time).
This is a linter (similar to black) that is invoked on Github PRs. This linter analyzes changes in function signatures and, if they are backward-incompatible, reports them as inline warnings in Github file view (example).
The linter is designed to identify and report issues such as function deletion, parameter removal, renaming, or reordering, changes in parameter requiredness, and removal of support for variadic parameters.
The linter can be suppressed:
- by adding labels
suppress-api-compatibility-check
orsuppress-bc-linter
to the PR; - by having
#suppress-api-compatibility-check
or#suppress-bc-linter
in the commit message.
When suppressed, the warnings turn into notifications.
Note: Please don't suppress the linter if you are not absolutely sure that the API you're changing is not used (or that the error is a false positive). Instead, tag the PyTorch Dev Infra team or PyTorch Core engineers for help.