Code spell checking on every test run!

This commit is contained in:
Dan Helfman 2023-04-01 11:03:59 -07:00
parent 1ad43ad4b5
commit 2934d0902c
6 changed files with 27 additions and 9 deletions

View file

@ -147,7 +147,7 @@ def filter_checks_on_frequency(
def make_check_flags(local_borg_version, storage_config, checks, check_last=None, prefix=None):
'''
Given the local Borg version, a storge configuration dict, a parsed sequence of checks, the
Given the local Borg version, a storage configuration dict, a parsed sequence of checks, the
check last value, and a consistency check prefix, transform the checks into tuple of
command-line flags.

View file

@ -930,14 +930,14 @@ properties:
type: string
enum: ['sql']
description: |
Database dump output format. Currently only "sql"
is supported. Defaults to "sql" for a single
database. Or, when database name is "all" and
format is blank, dumps all databases to a single
file. But if a format is specified with an "all"
database name, dumps each database to a separate
file of that format, allowing more convenient
restores of individual databases.
Database dump output format. Currently only
"sql" is supported. Defaults to "sql" for a
single database. Or, when database name is "all"
and format is blank, dumps all databases to a
single file. But if a format is specified with
an "all" database name, dumps each database to a
separate file of that format, allowing more
convenient restores of individual databases.
example: directory
add_drop_database:
type: boolean

View file

@ -73,6 +73,14 @@ can ask isort to order your imports for you:
tox -e isort
```
Similarly, if you get errors about spelling mistakes in source code, you can
ask codespell to correct them:
```bash
tox -e codespell
```
### End-to-end tests
borgmatic additionally includes some end-to-end tests that integration test

View file

@ -20,3 +20,6 @@ known_first_party = borgmatic
line_length = 100
multi_line_output = 3
skip = .tox
[codespell]
skip = .git,.tox,build

View file

@ -2,6 +2,7 @@ appdirs==1.4.4; python_version >= '3.8'
attrs==20.3.0; python_version >= '3.8'
black==19.10b0; python_version >= '3.8'
click==7.1.2; python_version >= '3.8'
codespell==2.2.4
colorama==0.4.4
coverage==5.3
flake8==4.0.1

View file

@ -16,6 +16,7 @@ commands =
py38,py39,py310,py311: black --check .
isort --check-only --settings-path setup.cfg .
flake8 borgmatic tests
codespell
[testenv:black]
commands =
@ -35,3 +36,8 @@ commands =
deps = {[testenv]deps}
commands =
isort --settings-path setup.cfg .
[testenv:codespell]
deps = {[testenv]deps}
commands =
codespell --write-changes