Skip to content

Enable spell checker#10898

Merged
DelazJ merged 2 commits into
qgis:masterfrom
DelazJ:codespell
Apr 13, 2026
Merged

Enable spell checker#10898
DelazJ merged 2 commits into
qgis:masterfrom
DelazJ:codespell

Conversation

@DelazJ

@DelazJ DelazJ commented Apr 8, 2026

Copy link
Copy Markdown
Collaborator

Another subset of pre-commit hooks from #10856, focusing on spelling checks

Goal:

Ticket(s): #

  • Backport to LTR documentation is requested

@DelazJ DelazJ added backport release_3.44 On merge create a backported pull request to 3.44 Backend labels Apr 8, 2026
Comment thread scripts/strings_fixer.sh Outdated
[": menuselection: "]=":menuselection:"
[":menuselection : "]=":menuselection:"
[": menuselection :"]=":menuselection:"
#specific context

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think in general this file is misused and we should only apply these kind of substitutions in select cases, not as a form of on the fly spell checker. If we run the spell checker across the sources and fix the issues there they should not come back with the pre-commit check in place and we don't end up having misspelled text in the source and potentially indexed, shared for translations, incurring maintenance overhead to keep this file current etc.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks @timlinux for the reviews

I think in general this file is misused and we should only apply these kind of substitutions in select cases, not as a form of on the fly spell checker.

Fully agreed. These changes are just a place I store the fixes in the meantime ( in the case I have issues with backporting to 3.44, or there were other occurrences in that branch). Expected to revert these changes after.

Still, the script in its default state, also handles misspells in the locale folder, for Sphinx roles in translation, ensuring a better generated docs display. I am not sure there is anything else doing that.

Comment thread .pre-commit-config.yaml
- id: codespell
args:
- --skip=*.po,*.pot,*.mo,*.svg,*.png,*.jpg,*.gif,*.ico,*.pyc,*.js,*.css,*.map,*.qgs,*.qgz
- --ignore-words-list=tripel,linz,parameteras,lightening,clos,januar,claus,sist,pixelx

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this list correct and intended? Most of them look like true errors.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Almost, there are:

Yes, the checker is case-insensitive.
My only reservation was lightening but it seems correct and anyway would have to be fixed in code repo given that we pull their text here.

DelazJ added 2 commits April 13, 2026 21:03
fixing list of words and file formats (project file) to ignore
@DelazJ DelazJ removed the backport release_3.44 On merge create a backported pull request to 3.44 label Apr 13, 2026
@DelazJ DelazJ enabled auto-merge April 13, 2026 21:01
@DelazJ DelazJ merged commit 35e32d5 into qgis:master Apr 13, 2026
3 checks passed
@DelazJ DelazJ deleted the codespell branch April 13, 2026 21:02
DelazJ added a commit that referenced this pull request Apr 13, 2026
rstcheck (backports #10902)
codespell (backports #10898)
doc8 (backports #10903 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants