blob: fa78dc28d0360a4cd067ba029bb4c7ca5b9e3afd (
plain)
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
|
#!/bin/sh
# We recommend you run this as a pre-push hook: to reduce
# review turn-around time, we want all pushes to run tasks
# locally. Using this hook will guarantee your hook gets
# updated as the repository changes.
#
# This hook tries to run as much as possible without taking
# too long.
#
# You can use it by running this command from the project root:
# `ln -s ../../config/pre-push-recommended.sh .git/hooks/pre-push`
set -e
# Run linter in tools/ if it's installed.
if `which pycodestyle > /dev/null`; then
pycodestyle tools
fi
# Run core checks. Descriptions for each gradle task
# below can be found in the output of `./gradlew tasks`.
#
# Tasks omitted because they take a long time to run:
# - assembling all variants
# - unit test on all variants
# - UI tests
# - android lint (takes a long time to run)
./gradlew -q \
ktlint \
detekt \
assembleDebug \
assembleDebugAndroidTest \
mozilla-detekt-rules:test \
mozilla-lint-rules:test \
testDebug
|