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): 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 check last value, and a consistency check prefix, transform the checks into tuple of
command-line flags. command-line flags.

View file

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

View file

@ -73,6 +73,14 @@ can ask isort to order your imports for you:
tox -e isort 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 ### End-to-end tests
borgmatic additionally includes some end-to-end tests that integration test borgmatic additionally includes some end-to-end tests that integration test

View file

@ -20,3 +20,6 @@ known_first_party = borgmatic
line_length = 100 line_length = 100
multi_line_output = 3 multi_line_output = 3
skip = .tox 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' attrs==20.3.0; python_version >= '3.8'
black==19.10b0; python_version >= '3.8' black==19.10b0; python_version >= '3.8'
click==7.1.2; python_version >= '3.8' click==7.1.2; python_version >= '3.8'
codespell==2.2.4
colorama==0.4.4 colorama==0.4.4
coverage==5.3 coverage==5.3
flake8==4.0.1 flake8==4.0.1

View file

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