File: pre-commit.hook

package info (click to toggle)
pitivi 0.999-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 24,912 kB
  • sloc: python: 23,282; ansic: 2,847; sh: 249; makefile: 21; xml: 19
file content (92 lines) | stat: -rwxr-xr-x 2,422 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env bash

if [ -z "${PITIVI_REPO_DIR}" ]; then
    echo "ERROR: You're not in the Pitivi development environment. Run `source bin/pitivi-env` to enter it. See http://developer.pitivi.org/HACKING.html for details."
    exit 1
fi

TOPLEVEL=$(git rev-parse --show-toplevel)
RCFILE=$TOPLEVEL/docs/pylint.rc

IGNORED_FILES="
bin/pitivi.in
pitivi/application.py
pitivi/autoaligner.py
pitivi/check.py
pitivi/clipproperties.py
pitivi/configure.py
pitivi/dialogs/clipmediaprops.py
pitivi/dialogs/depsmanager.py
pitivi/dialogs/filelisterrordialog.py
pitivi/dialogs/prefs.py
pitivi/dialogs/startupwizard.py
pitivi/effects.py
pitivi/mainwindow.py
pitivi/mediafilespreviewer.py
pitivi/medialibrary.py
pitivi/preset.py
pitivi/project.py
pitivi/render.py
pitivi/settings.py
pitivi/timeline/elements.py
pitivi/timeline/layer.py
pitivi/timeline/ruler.py
pitivi/timeline/timeline.py
pitivi/titleeditor.py
pitivi/transitions.py
pitivi/undo/project.py
pitivi/undo/timeline.py
pitivi/undo/undo.py
pitivi/utils/extract.py
pitivi/utils/loggable.py
pitivi/utils/misc.py
pitivi/utils/pipeline.py
pitivi/utils/proxy.py
pitivi/utils/ripple_update_group.py
pitivi/utils/system.py
pitivi/utils/threads.py
pitivi/utils/timeline.py
pitivi/utils/ui.py
pitivi/utils/validate.py
pitivi/utils/widgets.py
pitivi/viewer/move_scale_overlay.py
pitivi/viewer/overlay_stack.py
pitivi/viewer/title_overlay.py
pitivi/viewer/viewer.py
tests/common.py
tests/test_check.py
tests/test_common.py
tests/test_log.py
tests/test_media_library.py
tests/test_prefs.py
tests/test_preset.py
tests/test_project.py
tests/test_system.py
tests/test_timeline_layer.py
tests/test_timeline_timeline.py
tests/test_undo.py
tests/test_undo_project.py
tests/test_undo_timeline.py
tests/test_utils.py
tests/test_utils_timeline.py
tests/test_widgets.py
tests/validate-tests/manager.py
tests/validate-tests/suite.py
win32/configure.py
win32/pitivi
"

IGNORE_ARGS=""
for f in $IGNORED_FILES; do
    IGNORE_ARGS="$IGNORE_ARGS --ignore=$f"
done
echo "Pylint ignoring files:$IGNORED_FILES" | tr "\n" " "
echo

export PYTHONPATH=$TOPLEVEL/pitivi/coptimizations/.libs:$PYTHONPATH

git-pylint-commit-hook --pylint="$TOPLEVEL/build/flatpak/pitivi-flatpak" --pylint-params="pylint" --pylintrc=$RCFILE $IGNORE_ARGS --limit=10.0 --suppress-report || exit 1

git_pep8_commit_hook --pep8-params="--repeat --ignore=E501,E128" || exit 1

pre-commit run --config .pre-commit-config.yaml || exit 1