mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
Add clang formatting infrastructure
Prep for reformatting the codebase.
This commit is contained in:
parent
d333f20b4a
commit
f56131976e
4
.clang-format
Normal file
4
.clang-format
Normal file
@ -0,0 +1,4 @@
|
||||
Language: Cpp
|
||||
BasedOnStyle: GNU
|
||||
ColumnLimit: 100
|
||||
ForEachMacros: ['GLNX_HASH_TABLE_FOREACH', 'GLNX_HASH_TABLE_FOREACH_V', 'GLNX_HASH_TABLE_FOREACH_KV', 'GLNX_HASH_TABLE_FOREACH_IT']
|
@ -132,6 +132,10 @@ include Makefile-bash.am
|
||||
release-tag:
|
||||
cd $(srcdir) && git $(srcdir) tag -m "Release $(VERSION)" v$(VERSION)
|
||||
|
||||
.PHONY: clang-format
|
||||
clang-format:
|
||||
git ls-files '**.c' '**.cxx' '**.h' '**.hpp' | xargs clang-format -i
|
||||
|
||||
embed_dependency=tar -C $(srcdir) --append --exclude='.git/*' --transform="s,^embedded-dependencies/,ostree-embeddeps-$${GITVERSION}/embedded-dependencies/," --file=$${TARFILE_TMP}
|
||||
|
||||
git_version_rpm = $$(cd $(srcdir) && git describe | sed -e 's,-,\.,g' -e 's,^v,,')
|
||||
|
@ -15,6 +15,13 @@ done
|
||||
echo "ok"
|
||||
fi
|
||||
|
||||
# Will uncomment this once we reformat
|
||||
#if command -v clang-format; then
|
||||
# echo -n "checking clang-format... "
|
||||
# git ls-files '**.c' '**.cxx' '**.h' '**.hpp' | xargs clang-format --Werror --dry-run
|
||||
# echo "ok"
|
||||
#fi
|
||||
|
||||
echo -n 'grep-based static analysis... '
|
||||
patterns=(glnx_fd_close)
|
||||
for pat in "${patterns[@]}"; do
|
||||
|
@ -71,6 +71,7 @@ case "$ID" in
|
||||
build-essential
|
||||
bubblewrap
|
||||
ca-certificates
|
||||
clang-format
|
||||
cpio
|
||||
debhelper
|
||||
dh-exec
|
||||
|
@ -22,7 +22,7 @@ pkg_install rpm-ostree && rpm -e rpm-ostree
|
||||
pkg_install ostree{,-devel,-grub2} createrepo_c /usr/bin/jq python3-pyyaml \
|
||||
libubsan libasan libtsan elfutils fuse sudo python3-gobject-base \
|
||||
selinux-policy-devel selinux-policy-targeted python3-createrepo_c \
|
||||
rsync python3-rpm parallel clang rustfmt-preview
|
||||
rsync python3-rpm parallel clang rustfmt-preview clang-tools-extra
|
||||
|
||||
# From rpm-ostree/ci/vmcheck-provision.sh
|
||||
pkg_install openssh-clients ansible
|
||||
|
Loading…
Reference in New Issue
Block a user