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

Added a clang_format.py to check the whole PR on CI #2816

Closed
wants to merge 1 commit into from

Conversation

daschuer
Copy link
Member

This fixes the issue that the pre-commit hook test on Travis successes even if there are pending clang-format issues.
This was due to not check the files and the PRE_COMMIT_SOURCE environment variable.
This PR fixes this.

@uklotzde uklotzde changed the base branch from master to 2.3 May 23, 2020 10:08
@uklotzde uklotzde changed the base branch from 2.3 to master May 23, 2020 10:08
@uklotzde
Copy link
Contributor

Wouldn't it be convenient to get this into 2.3? Dependent on if it is possible and feasible.

@uklotzde uklotzde requested a review from Holzhaus May 23, 2020 10:10
@daschuer daschuer changed the base branch from master to 2.3 May 23, 2020 12:38
@daschuer
Copy link
Member Author

OK, now targeting 2.3

@daschuer
Copy link
Member Author

daschuer commented Jun 3, 2020

Can we merge this now?


cmd = ["git-clang-format"]

source_commit = os.environ.get("PRE_COMMIT_SOURCE")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is called PRE_COMMIT_FROM_REF in current versions of pre-commit.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the new v2.2.0 value the old value is still supported.
Mine is 2.0.1

@Holzhaus Holzhaus added this to the 2.3.0 milestone Jun 5, 2020
@Holzhaus
Copy link
Member

Holzhaus commented Jun 9, 2020

Something is wrong, the pre-commit-pr job failed and tried to reformat multiple source files.

@daschuer
Copy link
Member Author

daschuer commented Aug 5, 2020

Superseded by: #2981

@daschuer daschuer closed this Aug 5, 2020
@daschuer daschuer deleted the pre-commit-clang branch May 4, 2022 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants