MON-476 fmt and add one no data per set as best practice in ci
This commit is contained in:
parent
5cbf1bbdab
commit
da324c10b3
14
scripts/90_best_practices.sh
Executable file
14
scripts/90_best_practices.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -xueo pipefail
|
||||||
|
|
||||||
|
source "$(dirname $0)/utils.sh"
|
||||||
|
goto_root
|
||||||
|
|
||||||
|
# loop over every monitors set
|
||||||
|
for path in $(find "$(get_scope $1)" -path ./incubator -prune -o -name 'monitors-*.tf' -print | sort -fdbi); do
|
||||||
|
# check if there is more than 1 notify_no_data parameter set to true per set of monitors
|
||||||
|
if [[ $(grep -c notify_no_data.*true $path) -gt 1 ]]; then
|
||||||
|
echo "More than one notify_no_data set to true on $path"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
Loading…
x
Reference in New Issue
Block a user