Skip to content

Commit 2e256fc

Browse files
authored
fix: kokoro lint builds and lint script (GoogleCloudPlatform#1334)
1 parent d5f5da6 commit 2e256fc

File tree

5 files changed

+6
-46
lines changed

5 files changed

+6
-46
lines changed

.kokoro/lint.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ env_vars: {
77
}
88

99
env_vars: {
10-
key: "RUN_CS_CHECK"
11-
value: "true"
10+
key: "TRAMPOLINE_BUILD_FILE"
11+
value: "github/php-docs-samples/testing/run_cs_check.sh"
1212
}

.kokoro/lint.sh

Lines changed: 0 additions & 33 deletions
This file was deleted.

.kokoro/php74.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,3 @@ env_vars: {
1515
key: "GOOGLE_ALT_CREDENTIALS_FILENAME"
1616
value: "service-account-kokoro1.json"
1717
}
18-
env_vars: {
19-
key: "RUN_CS_CHECK"
20-
value: "true"
21-
}

.kokoro/system_tests.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ mkdir -p build/logs
5050

5151
export PULL_REQUEST_NUMBER=$KOKORO_GITHUB_PULL_REQUEST_NUMBER
5252

53-
# Run code standards check when appropriate
54-
if [ "${RUN_CS_CHECK}" = "true" ]; then
55-
bash testing/run_cs_check.sh
56-
fi
57-
5853
# If we are running REST tests, disable gRPC
5954
if [ "${RUN_REST_TESTS_ONLY}" = "true" ]; then
6055
GRPC_INI=$(php -i | grep grpc.ini | sed 's/^Additional .ini files parsed => //g' | sed 's/,*$//g' )

testing/run_cs_check.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@ elif [ -f "./php-cs-fixer" ]; then
2323
PHP_CS_FIXER="./php-cs-fixer"
2424
fi
2525

26-
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
27-
$PHP_CS_FIXER fix --dry-run --diff --config="$DIR/../.php_cs.dist" --path-mode=intersection .
26+
PROJECT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.."
27+
DIR="${1:-$PROJECT_ROOT}"
28+
29+
$PHP_CS_FIXER fix --dry-run --diff --config="${PROJECT_ROOT}/.php_cs.dist" --path-mode=intersection $DIR

0 commit comments

Comments
 (0)