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

Add Codespell workflow and fix some typo #237

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

Fantu
Copy link
Contributor

@Fantu Fantu commented Dec 2, 2023

No description provided.

@mtwebster
Copy link
Member

Would this workflow be better off as part of our auto-builds (see https://github.com/linuxmint/github-actions), rather than adding it to every repo? They get triggered for PRs as well.

It wouldn't be on ubuntu-latest container, but I still think it would do the job off mint/lmde images.

@Fantu
Copy link
Contributor Author

Fantu commented Jan 31, 2024

If will not be a problem to manage exclusions of any repository in it can be better.
Small note: it works only for PR this action.
If you want to do it you can start with the action from here but add also the exclusion from linuxmint/cinnamon-settings-daemon@9749faa so will be:

skip: ChangeLog,*.po,LINGUAS
# word to exclude must be always lowercase as must be same of the codespell dictionary
ignore_words_list: gir,tyes

and from my PR cherry-pick the other commit with the fixes done
after on new PR of other components will appear many spell error detected and also other possible things to exclude anyway with only_warn: 1 don't fail the tests so don't force contributors to resolve errors already present but at least warns inline in the changed code and under the first errors in the one not changed by the PR

@mtwebster
Copy link
Member

Ok, I added codespell to our CI:
linuxmint/github-actions@cb71582

Tested on this repo:
https://github.com/linuxmint/cinnamon-desktop/actions/runs/7877089417

I fixed the file in cinnamon-settings-daemon so we don't need to exclude 'tyes'. Let me know if anything doesn't look right. If exceptions ever become an issue we can still specify them per-repo (Add another input here, like dependencies).

Want to update these prs with just the spelling corrections? Thanks

@Fantu
Copy link
Contributor Author

Fantu commented Feb 13, 2024

Inserting it into the build job currently runs it 3 times, it would be better to find a way to run it only once, then I think it would be fine to keep it "global".
I updated my 2 PR keeping only typo fixes.
Looking c-s-d codespell needs to add ,*.svg (can be useful also in others repo) and ,requestor to ignore_words_list

@mtwebster
Copy link
Member

mtwebster commented Feb 16, 2024

Ok I made a few more changes:
linuxmint/github-actions@8fb9c7c

  • It only runs on one machine now
  • You can specify per-repo words/files to skip, in addition to the 'defaults' (Changelog, .po, etc...)

This way someone opening a PR can add to the repo ignore lists instead of us having to update our github-actions every time.

edit: I used xapp to test per-repo stuff:
linuxmint/xapp@b589487

@mtwebster mtwebster merged commit 94b0b12 into linuxmint:master Feb 16, 2024
3 checks passed
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