Bump clang-format to 14
Our lint ci image no longer has an available clang-format-11.
This commit is contained in:
parent
a099ff651a
commit
95f632bbe9
|
@ -155,7 +155,7 @@ local static_check_and_upload = [
|
|||
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||
apt_get_quiet + ' update',
|
||||
apt_get_quiet + ' install -y eatmydata',
|
||||
'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -y git clang-format-11 jsonnet',
|
||||
'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -y git clang-format-14 jsonnet',
|
||||
'./contrib/drone-format-verify.sh',
|
||||
],
|
||||
}],
|
||||
|
@ -164,7 +164,7 @@ local static_check_and_upload = [
|
|||
// Various debian builds
|
||||
debian_pipeline('Debian (amd64)', docker_base + 'debian-sid', lto=true),
|
||||
debian_pipeline('Debian Debug (amd64)', docker_base + 'debian-sid', build_type='Debug'),
|
||||
clang(13, lto=true),
|
||||
clang(14, lto=true),
|
||||
debian_pipeline('Debian stable (i386)', docker_base + 'debian-stable/i386'),
|
||||
debian_pipeline('Ubuntu LTS (amd64)', docker_base + 'ubuntu-lts'),
|
||||
debian_pipeline('Ubuntu latest (amd64)', docker_base + 'ubuntu-rolling'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
test "x$IGNORE" != "x" && exit 0
|
||||
repo=$(readlink -e $(dirname $0)/../)
|
||||
clang-format-11 -i $(find $repo/{oxenss,unit_test} | grep -E '\.[hc](pp)?$' | grep -v 'Catch2')
|
||||
clang-format-14 -i $(find $repo/{oxenss,unit_test} | grep -E '\.[hc](pp)?$' | grep -v 'Catch2')
|
||||
jsonnetfmt -i $repo/.drone.jsonnet
|
||||
git --no-pager diff --exit-code --color || (echo -ne '\n\n\e[31;1mLint check failed; please run ./contrib/format.sh\e[0m\n\n' ; exit 1)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
CLANG_FORMAT_DESIRED_VERSION=11
|
||||
CLANG_FORMAT_DESIRED_VERSION=14
|
||||
|
||||
binary=$(command -v clang-format-$CLANG_FORMAT_DESIRED_VERSION 2>/dev/null)
|
||||
if [ $? -ne 0 ]; then
|
||||
|
|
|
@ -164,7 +164,9 @@ namespace {
|
|||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
constexpr bool check_ascending(std::string_view) { return true; }
|
||||
constexpr bool check_ascending(std::string_view) {
|
||||
return true;
|
||||
}
|
||||
template <typename... Args>
|
||||
constexpr bool check_ascending(std::string_view a, std::string_view b, Args&&... args) {
|
||||
return a < b && check_ascending(b, std::forward<Args>(args)...);
|
||||
|
|
|
@ -579,10 +579,10 @@ struct expire_msgs final : recursive {
|
|||
///
|
||||
/// Takes parameters of:
|
||||
/// - `pubkey` -- the account
|
||||
/// - `pubkey_ed25519` if provided *and* the pubkey has a type 05 (i.e. Session id) then `pubkey` will
|
||||
/// be interpreted as an `x25519` pubkey derived from this given ed25519 pubkey (which must be 64
|
||||
/// hex characters or 32 bytes). *This* pubkey should be used for signing, but must also convert
|
||||
/// to the given `pubkey` value (without the `05` prefix).
|
||||
/// - `pubkey_ed25519` if provided *and* the pubkey has a type 05 (i.e. Session id) then `pubkey`
|
||||
/// will be interpreted as an `x25519` pubkey derived from this given ed25519 pubkey (which must
|
||||
/// be 64 hex characters or 32 bytes). *This* pubkey should be used for signing, but must also
|
||||
/// convert to the given `pubkey` value (without the `05` prefix).
|
||||
/// - `subkey` (optional) allows authentication using a derived subkey. See `store` for details on
|
||||
/// how subkey authentication works.
|
||||
/// - `messages` -- array of message hash strings (as provided by the storage server) to update.
|
||||
|
|
|
@ -145,10 +145,7 @@ std::string computeMessageHash_old(
|
|||
std::string_view data);
|
||||
|
||||
/// Computes a message hash using blake2b hash of various messages attributes.
|
||||
std::string computeMessageHash(
|
||||
const user_pubkey_t& pubkey,
|
||||
namespace_id ns,
|
||||
std::string_view data);
|
||||
std::string computeMessageHash(const user_pubkey_t& pubkey, namespace_id ns, std::string_view data);
|
||||
|
||||
struct OnionRequestMetadata {
|
||||
crypto::x25519_pubkey ephem_key;
|
||||
|
|
Loading…
Reference in New Issue