Tips and Tricks#
Unwanted environment substitution#
Environment variables, denoted by strings starting with a $ character, are
substituted by default in the values passed to checks. This can be avoided by
setting substitute to False or by using a literal with single quotes.
MyOddFilename:
checkPath: myfile$.txt
substitute: False
Use triple (3) single quotes
MyOddFilename:
checkPath: '''myfile$.txt'''
[MyOddFilename]
checkpath='myfile$.txt'
substitute=false
Use quadruple (4) single quotes
[MyOddFilename]
checkpath=''''myfile$.txt''''
Flat Checks Files#
Checks can be conveniently grouped by category, but this is not a strict requirement for checks files. The following show file format examples with checks at the root level, with an example on putting each check on 1 line.
Geomancy:
desc: Check for the 'geomancy.toml' file
checkPath: examples/geomancy.toml
type: file
Pyproject:
desc: Check for 'pyproject.toml' file
checkPath: examples/pyproject.toml
type: file
[Geomancy]
desc = "Check for the 'geomancy.toml' file"
checkPath = "examples/geomancy.toml"
type = "file"
[Pyproject]
desc = "Check for 'pyproject.toml' file"
checkPath = "examples/pyproject.toml"
type = "file"
Geomancy = {checkPath = "examples/geomancy.toml", type = "file"}
Pyproject = {checkPath = "examples/pyproject.toml", type = "file"}