Code style/formatting
Closed this issue · 2 comments
aokellermann commented
Description
To maintain code formatting, we should have a formatter. This issue has 3 steps:
- Pick a formatter (perhaps yapf) and comment on this issue why you picked it, until we all agree to use it.
- Write a bash script (
/scripts/format.sh
) to do two things:- Format the code. The script should do this when run with no arguments.
- Check the code, and return a non-zero exit code if any format errors exist (this is used for CI). The script should be run with one argument :
check
.
- Create a CI step to check the code for formatting errors.
jjjoycing123 commented
Yapf seems pretty straight forward and looks likea good choice to me
jjjoycing123 commented
added the following lines to the config file:
-run:
name: Formatting
command: ./scripts/format.sh