format_fix -> format; rename svelte-check for consistency
This commit is contained in:
parent
bd6fb9b234
commit
5bb3d7c114
@ -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:
|
||||||
|
@ -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",
|
||||||
],
|
],
|
||||||
|
@ -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",
|
||||||
]),
|
]),
|
||||||
|
@ -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",
|
||||||
],
|
],
|
||||||
|
@ -42,7 +42,7 @@ filegroup(
|
|||||||
)
|
)
|
||||||
|
|
||||||
prettier_test(
|
prettier_test(
|
||||||
name = "format",
|
name = "format_check",
|
||||||
srcs = glob(["*.ts"]),
|
srcs = glob(["*.ts"]),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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",
|
||||||
]),
|
]),
|
||||||
|
@ -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",
|
||||||
|
@ -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",
|
||||||
|
@ -51,7 +51,7 @@ filegroup(
|
|||||||
################
|
################
|
||||||
|
|
||||||
prettier_test(
|
prettier_test(
|
||||||
name = "format",
|
name = "format_check",
|
||||||
srcs = glob(["*.ts"]),
|
srcs = glob(["*.ts"]),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user