Skip to content

Commit

Permalink
Use codecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
mbautin committed Mar 8, 2021
1 parent d56b47d commit 117ef73
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 227 deletions.
5 changes: 3 additions & 2 deletions bin/build_clang.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env bash

set -euo pipefail
. "${BASH_SOURCE%/*}/common.sh"
# shellcheck source=bin/common.sh
. "${BASH_SOURCE[0]%/*}/common.sh"

yb_activate_virtualenv "$build_clang_project_root"

set_pythonpath

python3 "$build_clang_project_root/src/build_clang/build_clang_main.py" "$@"
python3 "$build_clang_project_root/src/build_clang/build_clang_main.py" "$@"
8 changes: 4 additions & 4 deletions bin/check.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env bash

set -euo pipefail
. "${BASH_SOURCE%/*}/common.sh"

yb_activate_virtualenv "$build_clang_project_root"
# shellcheck source=bin/common.sh
. "${BASH_SOURCE[0]%/*}/common.sh"

set_pythonpath
yb_activate_virtualenv "$build_clang_project_root"

"$build_clang_project_root/src/build_clang/check_python_code.py"
codecheck
9 changes: 6 additions & 3 deletions bin/common.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
#!/usr/bin/env bash

set -euo pipefail

set_pythonpath() {
export PYTHONPATH=$build_clang_project_root/src
}

if [[ $BASH_SOURCE == $0 ]]; then
echo "$BASH_SOURCE must be sourced, not executed" >&2
if [[ ${BASH_SOURCE[0]} == "$0" ]]; then
echo "${BASH_SOURCE[0]} must be sourced, not executed" >&2
exit 1
fi

build_clang_project_root=$( cd "${BASH_SOURCE%/*}" && cd .. && pwd )
build_clang_project_root=$( cd "${BASH_SOURCE[0]%/*}" && cd .. && pwd )
if [[ ! -d $build_clang_project_root/yugabyte-bash-common ||
-z "$( ls -A "$build_clang_project_root/yugabyte-bash-common" )" ]]; then
( cd "$build_clang_project_root"; git submodule update --init --recursive )
fi

# shellcheck source=yugabyte-bash-common/src/yugabyte-bash-common.sh
. "$build_clang_project_root/yugabyte-bash-common/src/yugabyte-bash-common.sh"
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ mypy
pycodestyle
requests
PyGithub
codecheck
1 change: 0 additions & 1 deletion src/build_clang/build_clang_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ def get_llvm_cmake_variables(self) -> Dict[str, str]:
LLVM_TARGETS_TO_BUILD='X86',

CLANG_DEFAULT_CXX_STDLIB='libc++',
#CLANG_DEFAULT_LINKER='lld',

BUILD_SHARED_LIBS=ON,

Expand Down
217 changes: 0 additions & 217 deletions src/build_clang/check_python_code.py

This file was deleted.

0 comments on commit 117ef73

Please sign in to comment.