Skip to content
Snippets Groups Projects
Commit 516fab4c authored by nimrod's avatar nimrod
Browse files

- Moved the flake8 section from setup.cfg to tox.ini (more appropriate).

- Updated pre-commit hooks, added shellcheck.
- Corrected issues in test.sh found by shellcheck.
- Added bandit and pre-commit to the usual (local) Tox run.
parent ef78c2d9
No related branches found
No related tags found
No related merge requests found
- repo: git://github.com/pre-commit/pre-commit-hooks
sha: v0.7.1
sha: v0.8.0
hooks:
- id: check-added-large-files
- id: check-json
- id: check-xml
- id: check-yaml
- id: check-merge-conflict
- id: flake8
- id: check-symlinks
- repo: https://www.shore.co.il/git/shell-pre-commit/
sha: v0.5.3
sha: v0.5.4
hooks:
- id: shell-lint
- id: shellcheck
[bdist_wheel]
universal=1
[flake8]
exclude = .tox,*.egg,build,data
select = E,W,F
#!/bin/sh
set -eu
export infile="$(mktemp)"
export outfile="$(mktemp)"
infile="$(mktemp)"
outfile="$(mktemp)"
export infile outfile
echo Basic test.
export name='John'
test "$(echo 'Hello {{ name if name is defined else 'world' }}.' | template)" = "Hello John."
test "$(echo 'Hello {{ name if name is defined else "world" }}.' | template)" = "Hello John."
echo Testing arguments and reading/ writing to file.
echo '{{ name }}' > "$infile"
export name='John'
template --output "$outfile" "$infile"
test "$(cat $outfile)" = "$name"
test "$(cat "$outfile")" = "$name"
rm "$infile" "$outfile"
[tox]
envlist = py{2,3}
envlist = py{2,3},docs,bandit,pre-commit
[travis]
python =
......@@ -53,3 +53,7 @@ commands = bandit --recursive ./ --exclude .tox/,build/,dist/,template.egg-info
basepython = python
deps = pre-commit
commands = pre-commit run --all-files
[flake8]
exclude = .tox,*.egg,build,data
select = E,W,F
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment