mirror of
https://github.com/ben-grande/qusal.git
synced 2025-08-03 03:36:29 -04:00
style: limit line length per file extension
Editorconfig can only act based on file extension and path, not attributes, it remains a mean only for multiple collaborators to use the same configuration on their editor. When it is too restrictive, such as not considering the file syntax, use a lint tool for the specific file type instead of trusting editorconfig. Changes were made to increase readability.
This commit is contained in:
parent
2d0bf9784d
commit
011a71a36d
37 changed files with 330 additions and 123 deletions
|
@ -11,14 +11,16 @@ case "${GIT_TRACE_HELPER:-}" in
|
|||
esac
|
||||
|
||||
usage(){
|
||||
echo "Usage: ${helper} [<qube>] [<repository>]"
|
||||
echo "Note: qube defaults to '@default' and repository to the current repository"
|
||||
echo "Usage: ${helper} [<qube>] [<repository>]" >&2
|
||||
echo "Note: qube defaults to @default" >&2
|
||||
echo "Note: repository defaults to current working repository" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
is_git_repo(){
|
||||
if ! git rev-parse --show-toplevel >/dev/null 2>&1; then
|
||||
echo "Error: Either run from inside a git repository or provide it as an argument" >&2
|
||||
echo "Error: Current working directory is not in a git repository" >&2
|
||||
echo "Error: Run from a repository or pass the name as an argument" >&2
|
||||
usage
|
||||
fi
|
||||
}
|
||||
|
@ -49,7 +51,8 @@ elif command -v qrexec-client >/dev/null; then
|
|||
die "Qube doesn't exist: '${authority}'"
|
||||
fi
|
||||
qvm-start --skip-if-running -- "${authority}"
|
||||
exec qrexec-client -tT -d "${authority}" -- "DEFAULT:QUBESRPC ${rpc_cmd} dom0"
|
||||
rpc_cmd="DEFAULT:QUBESRPC ${rpc_cmd} dom0"
|
||||
exec qrexec-client -tT -d "${authority}" -- "${rpc_cmd}"
|
||||
fi
|
||||
|
||||
die "Qrexec programs not found: qrexec-client-vm, qrexec-client"
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
set -eu
|
||||
|
||||
usage(){
|
||||
echo "Usage: ${helper} <remote> [${scheme}://<authority>/<path>[?query=value][&other_query=value]]" >&2
|
||||
url_format="${scheme}://<authority>/<path>"
|
||||
url_format="${url_format}[?query=value][&other_query=value]"
|
||||
echo "Usage: ${helper} <remote> [${url_format}]" >&2
|
||||
}
|
||||
|
||||
die(){
|
||||
|
|
|
@ -76,8 +76,9 @@ elif command -v qrexec-client >/dev/null; then
|
|||
die "Qube doesn't exist: '${authority}'"
|
||||
fi
|
||||
qvm-start --skip-if-running -- "${authority}"
|
||||
log "->" qrexec-client -T -d "${authority}" -- "DEFAULT:QUBESRPC ${rpc_cmd} dom0"
|
||||
exec qrexec-client -T -d "${authority}" -- "DEFAULT:QUBESRPC ${rpc_cmd} dom0"
|
||||
rpc_cmd="DEFAULT:QUBESRPC ${rpc_cmd} dom0"
|
||||
log "->" qrexec-client -T -d "${authority}" -- "${rpc_cmd}"
|
||||
exec qrexec-client -T -d "${authority}" -- "${rpc_cmd}"
|
||||
fi
|
||||
|
||||
die "Qrexec programs not found: qrexec-client-vm, qrexec-client"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
# SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
|
@ -24,7 +24,10 @@ fi
|
|||
|
||||
if ! (echo "${untrusted_repo}" | grep -q "^[A-Za-z0-9][A-Za-z0-9_.-]\+$")
|
||||
then
|
||||
die "Forbidden characters in repository name. Allowed chars: letters, numbers, hyphen, underscore and dot. It cannot begin with hyphen, underscore or dot"
|
||||
msg="Forbidden characters in agent name."
|
||||
msg="${msg} Allowed chars: letters, numbers, hyphen, underscore and dot."
|
||||
msg="${msg} Name cannot begin with hyphen, underscore or dot"
|
||||
die "${msg}"
|
||||
fi
|
||||
|
||||
## Length arbitrarily set.
|
||||
|
@ -52,7 +55,8 @@ esac
|
|||
|
||||
if test "${action}" != "Init"; then
|
||||
test -d "${path}" || die "Directory doesn't exist: ${repo}"
|
||||
git -C "${path}" rev-parse >/dev/null 2>&1 || die "Not a git repository: ${repo}"
|
||||
git -C "${path}" rev-parse >/dev/null 2>&1 ||
|
||||
die "Not a git repository: ${repo}"
|
||||
is_bare="$(git -C "${path}" rev-parse --is-bare-repository)"
|
||||
test "${is_bare}" = "true" || die "Not a bare repository: ${repo}"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue