podman icon indicating copy to clipboard operation
podman copied to clipboard

Add codespell support (config, workflow to detect/not fix) and make it fix few typos

Open yarikoptic opened this issue 1 year ago • 6 comments

codespell is not new to this project but not really part of the automated workflow(s) (precommit, CI).

There is Makefile rule but had hardcoded settings into it, so people had to use make and could not pre-commit or directly -- I moved configuration into pyproject.yaml so now if you have codespell (and tomli) installed - you can just codespell.

CI workflow has 'permissions' set only to 'read' so also should be safe.

Also added pre-commit hook for it so no new typos would sneak in.

attn @rhatdan as I believe the codespell user ;)

yarikoptic avatar Jul 24 '24 20:07 yarikoptic

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

openshift-ci[bot] avatar Jul 24 '24 20:07 openshift-ci[bot]

I like this alot, thanks @yarikoptic. Fix the couple of issues @Luap99 found, and I will give it a LGTM

rhatdan avatar Jul 25 '24 09:07 rhatdan

Also if you repush can you please fix up the commit messages for the [DATALAD RUNCMD] commits, that is completely useless data for any human reader of the commit messages

Luap99 avatar Jul 25 '24 09:07 Luap99

I would be fine with just merging the commits into one PR.

rhatdan avatar Jul 25 '24 09:07 rhatdan

Also if you repush can you please fix up the commit messages for the [DATALAD RUNCMD] commits, that is completely useless data for any human reader of the commit messages

FWIW: I can easily adjust short commit message and can remove internal record on how the modification was made (some humans are curious creatures and actually do like to see command line invocation which resulted in the committed diff... More on datalad run at https://handbook.datalad.org/en/latest/basics/basics-run.html ... It also becomes "fun" to do "functional rebase" whenever commit is taken not as a diff, but rather as "do this action" (like codespell -w or some sed -i invocation), thus avoiding dealing with conflicts or simply missing some new changes to be done.

With that in mind, just tell me final verdict of

  • C1: leave as is
  • C2: adjust short summary
  • C3: adjust full commit message and remove embedded json record with the command

yarikoptic avatar Jul 25 '24 21:07 yarikoptic

LGTM @Luap99 PTAL

rhatdan avatar Aug 02 '24 07:08 rhatdan

C3: adjust full commit message and remove embedded json record with the command

I am reading commit message and this random stuff just wastes every readers time trying to make sense of this and why it is there. Please just squash the codespell fixes in a commit and name it something like fix issues reported by codespell or something like this.

Luap99 avatar Aug 02 '24 08:08 Luap99

  • moved config into new .codespellrc
  • rebased and reran fixing (there was one new typo)
  • squashed multiple commits and minimized their commit messages - now only 3 commits. Feel welcome to squash into a single one upon merging

yarikoptic avatar Aug 05 '24 16:08 yarikoptic

A friendly reminder that this PR had no activity for 30 days.

github-actions[bot] avatar Sep 05 '24 00:09 github-actions[bot]

@yarikoptic still working on this? Looks like all it needs is to adjust the commit message.

rhatdan avatar Sep 05 '24 10:09 rhatdan

Well, I thought I was done with it! ;) now spotted that failed CI apparently complaining about overly long subject line!

 * 9bde6b551 "Add codespell config, pre-commit definition, and move used options from Makefile into config" ... FAIL
  - FAIL - commit subject exceeds 90 characters

ok,

  • reworded
  • Since that rewrote history -- rebased again
  • saw that 2 new typos detected, made it fix those and fixup that last commit with other fixes
  • force pushed

yarikoptic avatar Sep 05 '24 17:09 yarikoptic

/approve /lgtm

rhatdan avatar Sep 05 '24 18:09 rhatdan

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan, yarikoptic

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Sep 05 '24 18:09 openshift-ci[bot]

Thanks @yarikoptic

rhatdan avatar Sep 05 '24 18:09 rhatdan