Skip to content
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

Refactor the lint action into a build script, temporarily update .clang-format #183

Merged
merged 4 commits into from
Sep 23, 2022

Conversation

GleasonK
Copy link
Member

Two changes in this PR:

  1. Refactor the lint action to be a locally runnable bash script. This should give more predictable results in terms of addressing CI failures.

  2. Update .clang-format to use Google style in the short term. More on this rationale below.

Background on all this is that my editor formatted a large chunk of a file which caused the lint action to fail remotely, and took me quite some time to roll back the individual formatting changes, since google styling appears to prefer the most common spacing of Type* var vs Type *var in a file as the proper formatting.

This change will allow local qualification / fixing, as well as provide a stop-gap on editor formatting issues while #15 is discussed. While I agree that we should resolve #15, I think more discussion is required, and there is unnecessary friction in the current setup/CI of clang-format in the current repo that should be addressed. Happy to drive the formatting conversation in the near future, but think this should be in place in the short term.

GH Actions run testing that it errors properly in CI: https://github.com/GleasonK/stablehlo/actions/runs/3106772722/jobs/5034066123

Closes #75

.github/workflows/lint.yml Outdated Show resolved Hide resolved
build_tools/github_actions/lint_clang_format.sh Outdated Show resolved Hide resolved
build_tools/github_actions/lint_clang_format.sh Outdated Show resolved Hide resolved
.clang-format Show resolved Hide resolved
@GleasonK GleasonK requested a review from burmako September 23, 2022 15:11
@GleasonK GleasonK merged commit ee50580 into openxla:main Sep 23, 2022
@GleasonK GleasonK deleted the actions-format branch September 28, 2022 15:09
GleasonK added a commit to GleasonK/stablehlo that referenced this pull request Oct 24, 2022
…ng-format (openxla#183)

Two changes in this PR:

1) Refactor the lint action to be a locally runnable bash script. This should give _more_ predictable results in terms of addressing CI failures.

2) Update `.clang-format` to use Google style in the short term. More on this rationale below.

Background on all this is that my editor formatted a large chunk of a file which caused the lint action to fail remotely, and took me quite some time to roll back the individual formatting changes, since google styling appears to prefer the most common spacing of `Type* var` vs `Type *var` in a file as the proper formatting.

This change will allow local qualification / fixing, as well as provide a stop-gap on editor formatting issues while #15 is discussed. While I agree that we should resolve #15, I think more discussion is required, and there is unnecessary friction in the current setup/CI of clang-format in the current repo that should be addressed. Happy to drive the formatting conversation in the near future, but think this should be in place in the short term.

GH Actions run testing that it errors properly in CI: https://github.com/GleasonK/stablehlo/actions/runs/3106772722/jobs/5034066123

Closes openxla#75
GleasonK added a commit to GleasonK/stablehlo that referenced this pull request Nov 10, 2022
…ng-format (openxla#183)

Two changes in this PR:

1) Refactor the lint action to be a locally runnable bash script. This should give _more_ predictable results in terms of addressing CI failures.

2) Update `.clang-format` to use Google style in the short term. More on this rationale below.

Background on all this is that my editor formatted a large chunk of a file which caused the lint action to fail remotely, and took me quite some time to roll back the individual formatting changes, since google styling appears to prefer the most common spacing of `Type* var` vs `Type *var` in a file as the proper formatting.

This change will allow local qualification / fixing, as well as provide a stop-gap on editor formatting issues while #15 is discussed. While I agree that we should resolve #15, I think more discussion is required, and there is unnecessary friction in the current setup/CI of clang-format in the current repo that should be addressed. Happy to drive the formatting conversation in the near future, but think this should be in place in the short term.

GH Actions run testing that it errors properly in CI: https://github.com/GleasonK/stablehlo/actions/runs/3106772722/jobs/5034066123

Closes openxla#75
@burmako burmako added Build and removed Process labels Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Define code style Modify clang-format to match the current state of the repository
2 participants