Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit fb0667a

Browse files
committed
Move find_clangformat() call
1 parent 0ab625a commit fb0667a

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

script/formatting/formatter.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import subprocess
1515

1616
from functools import reduce
17-
from script.helpers import find_clangformat
17+
from script.helpers import CLANG_FORMAT
1818

1919
## ==============================================
2020
## CONFIGURATION
@@ -176,8 +176,6 @@ def format_dir(dir_path, update_header, clang_format_code):
176176

177177
ARGS = PARSER.parse_args()
178178

179-
CLANG_FORMAT = find_clangformat()
180-
181179
if ARGS.staged_files:
182180
PELOTON_DIR_bytes = bytes(PELOTON_DIR, 'utf-8')
183181
TARGETS = [

script/helpers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ def find_clangformat():
1212
if not path is None:
1313
break
1414
return path
15+
16+
CLANG_FORMAT = find_clangformat()

script/validators/source_validator.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import glob
1313
import functools
1414

15-
from script.helpers import find_clangformat
15+
from script.helpers import CLANG_FORMAT
1616

1717
## ==============================================
1818
## LOGGING CONFIGURATION
@@ -327,7 +327,6 @@ def validate_dir(dir_path):
327327
LOG.info("Running source validator ...")
328328
LOG.info("Peloton root : " + PELOTON_DIR)
329329

330-
CLANG_FORMAT = find_clangformat()
331330

332331
if ARGS.files:
333332
# Validate just the provided files.

0 commit comments

Comments
 (0)