CodeCommitsIssuesPull requestsActionsInsightsSecurity
677ca8482474b16ce874aa7ba56d1100dd43335e

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

utils/check-style/format.sh

15lines · modecode

1#!/usr/bin/env bash
2
3# Format almost all code with current clang-format settings
4
5cd `readlink -f $(dirname $0)`/../..
6
7clang_format=`bash -c "compgen -c clang-format | grep 'clang-format-[[:digit:]]' | sort --version-sort --reverse | head -n1"`
8if [ ! -z $clang_format ]; then
9 find dbms libs utils -name *.cpp -or -name *.h -exec $clang_format -i {} + ;
10else
11 echo clang-format missing. try to install:
12 echo sudo apt install clang-format
13 echo or
14 echo sudo apt install clang-format-3.9
15fi