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

Try out pre-commit.ci #1031

Closed
4 tasks
icemac opened this issue Apr 14, 2022 · 3 comments
Closed
4 tasks

Try out pre-commit.ci #1031

icemac opened this issue Apr 14, 2022 · 3 comments

Comments

@icemac
Copy link
Member

icemac commented Apr 14, 2022

FEATURE EXPERIMENT

What I did:

I hear some complaints about the necessity of commits to make flake8 or the other code checkers happy.

What I expect to happen:

Most of the issues could be fixed by a machine, so it should do it.

What actually happened:

I have to run tox before the commit to see the problems which will arise in CI.

Suggestions

  • Configure pre-commit to run the code checkers.
    • This allows developers with installed and activated pre-commit to automatically see the problems when committing and get them fixed if they are automatically fixable.
  • Configure repository to use https://pre-commit.ci to automatically run the pre-commit tests as CI system.
    • It updates the PR if it finds fixable issues raised by the code checkers.
  • Use https://github.com/isidentical/teyit to convert deprecated unittest assert calls.

Notes

  • Configure tox -elint to run pre-commit on all files to use the same configuration and to allow to keep existing habits.
  • Document how to install and activate pre-commit.
  • GHA no longer needs to run the lint environment.
  • This is an experiment, currently just the Zope repository should be part of it.
@jugmac00
Copy link
Member

Thanks, happy to see that pre-commit will be considered! 👍 #891

@gforcada
Copy link
Member

For what is worth: plone/meta uses and benefits from it 😄

See https://github.com/plone/meta/blob/main/config/default/pre-commit-config.yaml.j2

@sallner sallner removed their assignment Sep 22, 2023
@dataflake
Copy link
Member

This issue is obsolete, we are using pre-commit now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done or Rejected
Development

No branches or pull requests

5 participants