Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Enforce code formatting repo-wide and add CI job #915

Closed
2 tasks
dtasev opened this issue Nov 11, 2020 · 0 comments · Fixed by #1075
Closed
2 tasks

Enforce code formatting repo-wide and add CI job #915

dtasev opened this issue Nov 11, 2020 · 0 comments · Fixed by #1075
Assignees

Comments

@dtasev
Copy link
Contributor

dtasev commented Nov 11, 2020

Issue raised by: developer

What?

Currently there is no formatting style enforced. This can be annoying when you do a 1 line change, then save and the auto formatter changes another 150 lines!

If we had a preset code-style formatter this can be avoided.

My personal preference is YAPF, which is similar to C++'s clang-format in that it doesn't care about any previous formatting and reformats to the rules that are chosen. This is different from other formatters (e.g. PyCharm's formatter will sometimes respect manual formatting of arguments, etc). Overall I don't care whether or not we chose YAPF as long as we have one!

Reproducible?

[Yes/No]

How to test the issue is resolved

  • Tool added to dependencies
  • CI Job that enforces formatting and fails if formatting doesn't match
@dtasev dtasev changed the title Consider enforcing code formatting repo-wide Enforce code formatting repo-wide and add CI job Jan 22, 2021
@dtasev dtasev self-assigned this Jan 22, 2021
@dtasev dtasev added this to the Sprint Jan 2021 Milestone milestone Jan 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant