Skip to content

Commit

Permalink
Merge pull request #275 from Zemnmez/fix-lint
Browse files Browse the repository at this point in the history
fix lint
  • Loading branch information
Zemnmez authored May 27, 2022
2 parents ea4b77c + 19db598 commit a720a80
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bzl/fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ FIX_CSS=$(realpath $(rlocation monorepo/css/lint/lint.sh))
FIX_GO=$(realpath $(rlocation go_sdk/bin/gofmt))
FIX_JS=$(realpath $(rlocation npm/eslint/bin/eslint.sh))


echo Fixing CSS files... 1>&2
(cd $BUILD_WORKSPACE_DIRECTORY
git ls-files --cached --modified --other --exclude-standard | uniq | grep .css$ | xargs $FIX_CSS --ignore-path .gitignore --fix
echo Fixing Go files... 1>&2
$FIX_GO -s -w .
$FIX_JS --fix --ignore-pattern 'project/ck3/base_game/*' --ignore-path .gitignore '**/*.ts' '**/*.js' '**/*.tsx' '**/*.json') || true # ignore failures. it fails often
echo Fixing Typescript, Javascript, json files... 1>&2
$FIX_JS --fix --ignore-pattern 'project/ck3/base_game/*' --ignore-path .gitignore "$BUILD_WORKSPACE_DIRECTORY"'/**/*.ts' "$BUILD_WORKSPACE_DIRECTORY"'/**/*.js' "$BUILD_WORKSPACE_DIRECTORY"'/**/*.tsx' "$BUILD_WORKSPACE_DIRECTORY"'/**/*.json') || true # ignore failures. it fails often
echo Fixing bazel files... 1>&2
$FIX_BAZEL --lint=fix -r $INIT_CWD
3 changes: 3 additions & 0 deletions js/jest/rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ def jest_test(name, srcs, data = [], deps = [], jest_config = "//:jest.ts.config
"--forceExit",
]
templated_args.extend(["--config", "$(rootpath %s)" % jest_config])

# Bazel already handles timeouts.
templated_args.extend(["--testTimeout", str(1000 * 60 * 5)])
for src in srcs:
templated_args.extend(["--runTestsByPath", "$(rootpath %s)" % src])

Expand Down

0 comments on commit a720a80

Please sign in to comment.