RFE: Check and enforce proper spelling in CI

Bug #2047654 reported by Jay Faulkner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Adam McArthur
ironic-python-agent
Fix Released
Medium
Jay Faulkner

Bug Description

Recently, I become aware of codespell through Nova's adoption of the tool in their codebase: https://github.com/codespell-project/codespell

Rather than using a dictionary of properly spelled words, it uses a list of known-misspellings, limiting the false positive rates significantly.

It's my belief that adding support for this tool to our tox configuration and, eventually, adding it as a lint requirement on landing changes, would lead to an overall higher quality codebase for Ironic projects.

I will push an example change to IPA showing what this would loook like. It is based on the Nova implementation of codespell as seen here: https://review.opendev.org/q/topic:%22codespell%22

At a minimum, the resulting changeset of adding a codespell target to tox and fixing misspellings caught by it, would be an improvement even if not added as required CI for landing changes.

Tags: rfe-approved
Revision history for this message
Jay Faulkner (jason-oldos) wrote :

To be clear: if this gets community approval/consensus; I'd extend it to all our active repositories.

Revision history for this message
Jay Faulkner (jason-oldos) wrote :

There was no objection at the Jan 8 2024 meeting.

tags: added: rfe-approved
removed: rfe
Revision history for this message
Jay Faulkner (jason-oldos) wrote :

Discussion in IRC was:
- Lets not vote on this in the gate yet
- Setup a new, non-voting tox target so we can see when it's broken and later decide to enable if we want.

Revision history for this message
Iury Gregory Melo Ferreira (iurygregory) wrote :
Changed in ironic-python-agent:
status: New → Fix Released
importance: Undecided → Medium
assignee: nobody → Jay Faulkner (jason-oldos)
Changed in ironic:
status: New → Triaged
Changed in ironic:
importance: Undecided → Medium
Changed in ironic:
status: Triaged → Fix Released
assignee: nobody → Adam McArthur (adamcarthur)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to ironic (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/ironic/+/917880

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to ironic (master)

Reviewed: https://review.opendev.org/c/openstack/ironic/+/917880
Committed: https://opendev.org/openstack/ironic/commit/9c955685c47d49311726c3625df67811ab1ae009
Submitter: "Zuul (22348)"
Branch: master

commit 9c955685c47d49311726c3625df67811ab1ae009
Author: Jay Faulkner <email address hidden>
Date: Wed May 1 14:00:30 2024 -0700

    Add pre-commit configuration and docs

    pre-commit is a git hooks framework which does lots of useful things
    before you commit, like validating lint and codespell -- easy things to
    forget, especially in a post-codespell world.

    Related-bug: 2047654
    Change-Id: I22738f9dceebe194e5aedff8815cd786013de456

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.