mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-04 16:21:11 +00:00
Fix BUILD.bazel style violations (#8081)
`buildifier` was complaining as follows:
#### :bazel: buildifier: found 2 lint issues in your WORKSPACE, BUILD and *.bzl files
<pre><code>tests/ts/bazel_repository_test_dir/BUILD:3:1: <a href="https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#out-of-order-load">out-of-order-load</a>: Load statement is out of its lexicographical order.
ts/BUILD.bazel:2:1: <a href="https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#out-of-order-load">out-of-order-load</a>: Load statement is out of its lexicographical order.</pre></code>
This can be fixed locally like so:
$ buildifier -lint fix $(git ls-files | grep -e '/BUILD.bazel$' -e '/BUILD$' -e '\<WORKSPACE$')
I also took this opportunity to fix one of the filenames.
I accidentally introduced these errors in #8078.
This commit is contained in:
32
tests/ts/bazel_repository_test_dir/BUILD.bazel
Normal file
32
tests/ts/bazel_repository_test_dir/BUILD.bazel
Normal file
@@ -0,0 +1,32 @@
|
||||
load("@aspect_rules_js//js:defs.bzl", "js_test")
|
||||
load("@aspect_rules_js//npm:defs.bzl", "npm_link_package")
|
||||
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
|
||||
load("@npm//:defs.bzl", "npm_link_all_packages")
|
||||
|
||||
npm_link_all_packages(name = "node_modules")
|
||||
|
||||
npm_link_package(
|
||||
name = "node_modules/flatbuffers",
|
||||
src = "@com_github_google_flatbuffers//ts:flatbuffers",
|
||||
)
|
||||
|
||||
flatbuffer_ts_library(
|
||||
name = "one_fbs",
|
||||
srcs = ["one.fbs"],
|
||||
)
|
||||
|
||||
flatbuffer_ts_library(
|
||||
name = "two_fbs",
|
||||
srcs = ["two.fbs"],
|
||||
deps = [":one_fbs"],
|
||||
)
|
||||
|
||||
js_test(
|
||||
name = "import_test",
|
||||
data = [
|
||||
"package.json",
|
||||
":node_modules/flatbuffers",
|
||||
":two_fbs",
|
||||
],
|
||||
entry_point = "import_test.js",
|
||||
)
|
||||
Reference in New Issue
Block a user