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
If the format tests fail, most can be fixed by running format_fix
in the relevant folder:
If the format tests fail, most can be fixed by running `format`
in the relevant package:
```
bazel run //rslib:format_fix
bazel run //pylib:format_fix
bazel run //pylib/rsbridge:format_fix
bazel run //qt:format_fix
bazel run //rslib:format
bazel run //pylib:format
bazel run //pylib/rsbridge:format
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:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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