File: pre-commit

package info (click to toggle)
diffuse 0.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,168 kB
  • sloc: python: 7,689; xml: 5,993; sh: 63; makefile: 9
file content (19 lines) | stat: -rwxr-xr-x 285 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

set -e

txtred='\e[0;31m'
txtbld='\e[1m'
txtrst='\e[0m'

if ! flake8 src/ po/
then
    echo -e "${txtred}${txtbld}Linter error(s) from flake8${txtrst}"
    exit 1
fi

if ! mypy src/ po/
then
    echo -e "${txtred}${txtbld}Linter error(s) from mypy${txtrst}"
    exit 1
fi