summaryrefslogtreecommitdiff
path: root/bin/sanity-check
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-01-17 15:24:40 +0100
committerErich Eckner <git@eckner.net>2019-01-17 15:24:40 +0100
commitc9f55c95cb382e22c41a310c1005e3de43379ae9 (patch)
tree38210b816af5645dad7fad10b1de6a32fe89c76b /bin/sanity-check
parent294c66ccc56ee6200b288585833cae1d1bfc3ea8 (diff)
downloadbuilder-c9f55c95cb382e22c41a310c1005e3de43379ae9.tar.xz
style: WHERE,ON,FROM,SELECT,JOIN should be on beginning of source lines
Diffstat (limited to 'bin/sanity-check')
-rwxr-xr-xbin/sanity-check12
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/sanity-check b/bin/sanity-check
index 5068687..df0b43c 100755
--- a/bin/sanity-check
+++ b/bin/sanity-check
@@ -61,7 +61,8 @@ archs=$(
printf 'SELECT DISTINCT `architectures`.`name`'
printf ' FROM `architectures`'
printf ' WHERE EXISTS ('
- printf 'SELECT 1 FROM `repositories`'
+ printf 'SELECT 1'
+ printf ' FROM `repositories`'
printf ' WHERE `repositories`.`architecture`=`architectures`.`id`'
printf ' AND `repositories`.`is_on_master_mirror`'
printf ');\n'
@@ -145,7 +146,8 @@ while [ $# -gt 0 ]; do
repo_revision=$(
# shellcheck disable=SC2016
{
- printf 'SELECT `git_repositories`.`head` FROM `git_repositories`'
+ printf 'SELECT `git_repositories`.`head`'
+ printf ' FROM `git_repositories`'
printf ' WHERE `git_repositories`.`name`=from_base64("%s");\n' \
"$(printf '%s' "${repo}" | base64 -w0)"
} | \
@@ -188,7 +190,8 @@ while [ $# -gt 0 ]; do
mysql_join_package_sources_build_assignments
mysql_join_build_assignments_architectures
printf ' WHERE EXISTS('
- printf 'SELECT 1 FROM `binary_packages`'
+ printf 'SELECT 1'
+ printf ' FROM `binary_packages`'
mysql_join_binary_packages_binary_packages_in_repositories
printf ' WHERE `binary_packages_in_repositories`.`repository`=%s' \
"${repository_ids__any_build_list}"
@@ -211,7 +214,8 @@ while [ $# -gt 0 ]; do
errors=$(
# shellcheck disable=SC2016
{
- printf 'SELECT `a`.`pkgname` FROM `binary_packages` AS `a`'
+ printf 'SELECT `a`.`pkgname`'
+ printf ' FROM `binary_packages` AS `a`'
mysql_join_binary_packages_binary_packages_in_repositories 'a' 'air'
mysql_join_binary_packages_in_repositories_repositories 'air' 'a_r'
printf ' AND `a_r`.`name`="build-list"'