Hey <@U04SE163WC8> while submitting PRs to airbyte...
# ask-ai
i
Hey @kapa.ai while submitting PRs to airbyte how to fix the format
u
Before submitting a PR to Airbyte, you should run the formatter to enforce code styles. The command to run formatting varies slightly depending on which part of the codebase you are working in. If you are working on a connector, you can use the
airbyte-ci
tool. Follow the instructions on the
airbyte-ci
page to install it. You can then run
airbyte-ci format fix all
to format all the code in your local
airbyte
repository. To install the pre-push hook, which runs formatting on all the repo files, you can run the following command:
Copy code
bash make tools.pre-commit.setup
If you are working in the platform, you can run
./gradlew format
from the root of the
airbyte-platform
repository. If the pre-push hook attempts to format a file that is not part of your contribution, it means that formatting is also broken in the master branch. In this case, you should open a separate PR to fix the formatting in the master branch. For more details, you can refer to the [Airbyte documentation on code formatting](https://docs.airbyte.com/contributing-to-airbyte/resources/code-formatting). If your code is not formatted correctly, the CI will fail and you will have to run
airbyte-ci format fix all
locally to fix the formatting issues. However, if you installed the pre-push hook, failure on the CI is not expected.