#!/usr/bin/env bash set -euo pipefail app_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" for file in $(find "${app_root}" -type f -name '*.php' -print); do php -l "${file}" >/dev/null done rg -q 'nuqloud_master_calendar' "${app_root}/appinfo/info.xml" rg -q 'calendar-plugins' "${app_root}/appinfo/info.xml" rg -q '' "${app_root}/appinfo/info.xml" rg -q 'Integration\\ICalendarProvider' "${app_root}/lib/DAV/MasterCalendarProvider.php" rg -q 'ICalendarIsWritable' "${app_root}/lib/Calendar/SourceCalendarService.php" rg -q 'IIconSection' "${app_root}/lib/Settings/PersonalSection.php" rg -q 'CalendarQueryValidator' "${app_root}/lib/DAV/MasterCalendar.php" rg -q "\['VEVENT', 'VTODO', 'VJOURNAL'\]" "${app_root}/lib/DAV/MasterCalendar.php" rg -q "calendar-enabled' => false" "${app_root}/lib/DAV/MasterCalendar.php" test -f "${app_root}/img/app.svg" echo 'NuQloud Master Calendar static checks passed.'