-
Notifications
You must be signed in to change notification settings - Fork 123
Source Code Format Checks #380
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
Conversation
Suggestion (possibly for a new PR) - add a label to autoformat a PR and push the changes in another commit, in case the developer doesn't want to run the formatter locally. |
@@ -0,0 +1,30 @@ | |||
name: Consistency Checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if we should merge Check PR Labels into this, to reduce the number of workflows running. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I can do that tomorrow morning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Just a heads up that the PR that we've been reviewing from a third party user submission has had issues with our itest labels. I don't know if that applies at all to what you're suggesting, but I think that we need to retool the label control & flow that we already have. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor python readability comments.
Yeah, I'm aware of those issues. I still feel that this is worth doing for our internal development. Also, I have been thinking about switching over to using firebase-workflow-trigger's token to make the changes, where we were previously using the github-action default token to do. Do you know if the itest runs from forked repos have access to our repo's secrets? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This change includes some tools to keep a consistent format of the repository's source files, including:
Checks
workflow which errors if any of a branch's changed files require formatting. We can extend this workflow with copyright header checks in the future and the pre-existingCheck PR Labels
has been folded into it.install_prereqs_desktop.py
to ensure that clang-format is installed.scripts/format_code.py
to reduce logging in non-verbose mode.scripts/git/hooks/pre-commit
to.git/hooks/pre-commit