Skip to content

Commit

Permalink
Count the lines
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed May 13, 2024
1 parent 2fd62fd commit 2f82952
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .teamcity/_self/projects/WebApp.kt
Expand Up @@ -574,7 +574,7 @@ object CheckCodeStyleBranch : BuildType({
export NODE_ENV="test"
# Find files to lint
FILES_TO_LINT=`git diff --name-only --diff-filter=d refs/remotes/origin/trunk...HEAD | grep -E '\.[jt]sx?'`
FILES_TO_LINT=`git diff --name-only --diff-filter=d refs/remotes/origin/trunk...HEAD | grep -E '\.[jt]sx?' | wc -l`
# Avoid running more than 10 parallel eslint tasks as it could OOM
if [ "%run_full_eslint%" = "true" ] || [ "${'$'}FILES_TO_LINT" -gt 10 ]; then
Expand All @@ -583,7 +583,7 @@ object CheckCodeStyleBranch : BuildType({
else
# To avoid `ENAMETOOLONG` errors linting files, we have to lint them one by one,
# instead of passing the full list of files to eslint directly.
for file in ${'$'}(git diff --name-only --diff-filter=d refs/remotes/origin/trunk...HEAD | grep -E '(\.[jt]sx?)${'$'}' || true); do
for file in "${'$'}(git diff --name-only --diff-filter=d refs/remotes/origin/trunk...HEAD | grep -E '(\.[jt]sx?)${'$'}' || true); do
( echo "Linting ${'$'}file"
yarn run eslint --format checkstyle --output-file "./checkstyle_results/eslint/${'$'}{file//\//_}.xml" "${'$'}file" ) &
done
Expand Down

0 comments on commit 2f82952

Please sign in to comment.