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
fix a typo caught by lintian #75
Conversation
While pulling the last release of PDF-Table into Debian, the linter "lintian" caught a typo. Signed-off-by: Étienne Mollier <emollier@debian.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes indeed, you caught a typo from one of the earlier maintainers! I can't believe that I missed it, looking over the file so many times. Thanks!
Codespell finds a few more:
I recommend pre-commit to help avoid some of this. Here is one I amended from my projects. It includes code formatting as well. To try it, install pre-commit ( The configuration file I share will make several changes, some of which you may not like, so make sure you try it in a copy that you can revert or discard. |
Thanks for the list. Some of them were mine. The "optio" is from Ipsum Lorem text, so I left it alone. I'll have to look at the lintian and codespell tools, as well as precommit. It looks like it tried to clean up the indentation in Changes, which I didn't want. |
Hi Phil,
Phil Perry, on 2022-07-21:
I'll have to look at the lintian and codespell tools, as well
as precommit. […]
Don't spend too much time on lintian. It is a specialised tool
to scan debian source and binary packages. Its spell checker
focuses on a database of common misspelling in areas of the
source code which are end-user facing.
In hope this helps,
--
.''`. Étienne Mollier ***@***.***>
: :' : gpg: 8f91 b227 c7d6 f2b1 948c 8236 793c f67e 8f0d 11da
`. `' sent from /dev/tty1, please excuse my verbosity
`-
|
I can update the configuration file so that it excludes the changelog as wel as specific words. |
I think that the changes to "Changes" only concern line endings and possibly also tabs. Tabs being dependant on the editor settings, I prefer using spaces where possible. I updated the pre-commit configuration to exclude "optio" from the codespell report, however I did not exclude noticable because that seems to be an incorrect spelling (https://www.askdifference.com/noticeable-vs-noticable/ ). |
OK, I'll ignore lintian since I'm not working with Debian. If I end up deciding to use precommit-conf, where does it go? Do I just put it in .github/workflows, alongside test.yml, or does it go somewhere else, or is it to be merged into test.yml? |
The pre-commit configuration goes at the root of the git repository using the file name ".pre-commit-configuration.yaml". You enable the pre-commit hook by executing 'pre-commit install' in a clone of the repository. Then it is executed on commit. You can disable the "automatic run" of some pre-commit hooks by adding "stages: manual": - repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
stages: [manual] # Require to run this manually
args:
- --ignore-words-list=optio Suppose that you add that to It's possible to add pre-commit to the continuous integration, and even to add test exécution to pre-commit. This is a sample job in tests.yml to execute pre-commit which could surely be simplified because this is not a python project: jobs:
pre-commit:
runs-on: "ubuntu-latest"
name: Pre-commit
steps:
- name: Check out the repository
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.2.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Install Python modules
run: |
pip install --constraint=.github/workflows/constraints.txt pre-commit
- name: Run pre-commit on all files
run: |
pre-commit run --all-files --show-diff-on-failure --color=always I managed to run the tests by adding this to the pre-commit configuration:
|
While pulling the last release of PDF-Table into Debian, the linter
"lintian" caught a typo. I thought you might be interested in the
resulting patch.
Signed-off-by: Étienne Mollier emollier@debian.org