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

adding lightweight precommit #21

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

sbillinge
Copy link
Contributor

No description provided.

@sbillinge
Copy link
Contributor Author

@vincefn I won't merge this, but it shows which cpp files would be update by the whitespace and end-of-file cleaning.

If we want we can add these linting checks back into the precommit-ci so they ge tfixed and are maintained moving forward.

Also, we are moving all our tests from travis to GH workflows, so we could do that on this repo too so tests run on PRs if you like.

@vincefn
Copy link
Collaborator

vincefn commented Sep 4, 2024

Nice ! I'm not used to linting for c++ - in this case it would not be possible to lint the upstream subproject, but I should do it in the ObjCryst repository, that's good practice.

(note the .pre-commit-config.yaml file has submodules: false but still proposes to alter the src/ObjCryst files ?)

How do you activate this with GH ? Just adding the yaml file does not seem enough (I just tested vincefn/objcryst#61)

@sbillinge
Copy link
Contributor Author

sbillinge commented Sep 5, 2024

Nice ! I'm not used to linting for c++ - in this case it would not be possible to lint the upstream subproject, but I should do it in the ObjCryst repository, that's good practice.

(note the .pre-commit-config.yaml file has submodules: false but still proposes to alter the src/ObjCryst files ?)

How do you activate this with GH ? Just adding the yaml file does not seem enough (I just tested vincefn/objcryst#61)

@vincefn There is one more step to integrate it into github, which is to add the app. Go to the org level, click settings, then find GitHub Apps on the left dropdown, and then install pre-commit ci
image

Then all the pre-commit things that work locally will be handled automatically. It is really nice! Full instructions are here: https://pre-commit.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants