format_fix -> format; rename svelte-check for consistency

This commit is contained in:
Damien Elmes 2020-11-12 20:11:40 +10:00
parent bd6fb9b234
commit 5bb3d7c114
9 changed files with 26 additions and 20 deletions

View File

@ -60,14 +60,20 @@ bazel test //...
## Fixing formatting ## Fixing formatting
If the format tests fail, most can be fixed by running format_fix If the format tests fail, most can be fixed by running `format`
in the relevant folder: in the relevant package:
``` ```
bazel run //rslib:format_fix bazel run //rslib:format
bazel run //pylib:format_fix bazel run //pylib:format
bazel run //pylib/rsbridge:format_fix bazel run //pylib/rsbridge:format
bazel run //qt:format_fix bazel run //qt:format
```
If you're in one of those folders, you can use the short form:
```
bazel run format
``` ```
Currently the typescript code needs to be formatted differently: Currently the typescript code needs to be formatted differently:

View File

@ -47,7 +47,7 @@ py_test(
) )
py_test( py_test(
name = "format", name = "format_check",
srcs = [ srcs = [
"//pylib/tools:py_source_files", "//pylib/tools:py_source_files",
"//pylib/anki:py_source_files", "//pylib/anki:py_source_files",
@ -66,7 +66,7 @@ py_test(
) )
py_binary( py_binary(
name = "format_fix", name = "format",
srcs = [ srcs = [
"tests/run_format.py", "tests/run_format.py",
], ],

View File

@ -33,14 +33,14 @@ rust_library(
) )
rustfmt_test( rustfmt_test(
name = "format", name = "format_check",
srcs = glob([ srcs = glob([
"*.rs", "*.rs",
]), ]),
) )
rustfmt_fix( rustfmt_fix(
name = "format_fix", name = "format",
srcs = glob([ srcs = glob([
"*.rs", "*.rs",
]), ]),

View File

@ -82,7 +82,7 @@ py_test(
) )
py_test( py_test(
name = "format", name = "format_check",
srcs = glob([ srcs = glob([
"**/*.py", "**/*.py",
]), ]),
@ -99,7 +99,7 @@ py_test(
) )
py_binary( py_binary(
name = "format_fix", name = "format",
srcs = [ srcs = [
"tests/run_format.py", "tests/run_format.py",
], ],

View File

@ -42,7 +42,7 @@ filegroup(
) )
prettier_test( prettier_test(
name = "format", name = "format_check",
srcs = glob(["*.ts"]), srcs = glob(["*.ts"]),
) )

View File

@ -134,14 +134,14 @@ rust_test(
) )
rustfmt_test( rustfmt_test(
name = "format", name = "format_check",
srcs = glob([ srcs = glob([
"src/**/*.rs", "src/**/*.rs",
]), ]),
) )
rustfmt_fix( rustfmt_fix(
name = "format_fix", name = "format",
srcs = glob([ srcs = glob([
"src/**/*.rs", "src/**/*.rs",
]), ]),

View File

@ -57,7 +57,7 @@ exports_files(["congrats.html"])
################ ################
prettier_test( prettier_test(
name = "format", name = "format_check",
srcs = glob([ srcs = glob([
"*.ts", "*.ts",
"*.svelte", "*.svelte",
@ -72,7 +72,7 @@ eslint_test(
) )
svelte_check( svelte_check(
name = "svelte-check", name = "svelte_check",
srcs = glob([ srcs = glob([
"*.ts", "*.ts",
"*.svelte", "*.svelte",

View File

@ -99,7 +99,7 @@ exports_files(["graphs.html"])
################ ################
prettier_test( prettier_test(
name = "format", name = "format_check",
srcs = glob([ srcs = glob([
"*.ts", "*.ts",
"*.svelte", "*.svelte",
@ -117,7 +117,7 @@ eslint_test(
) )
svelte_check( svelte_check(
name = "svelte-check", name = "svelte_check",
srcs = glob([ srcs = glob([
"*.ts", "*.ts",
"*.svelte", "*.svelte",

View File

@ -51,7 +51,7 @@ filegroup(
################ ################
prettier_test( prettier_test(
name = "format", name = "format_check",
srcs = glob(["*.ts"]), srcs = glob(["*.ts"]),
) )