mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-29 11:52:01 +00:00
Fix buildifier warnings found in new bazel (#5517)
Fixes warnings caught in: https://buildkite.com/bazel/flatbuffers/builds/863#cff87e1d-b976-4734-8157-4b6d88c7b5e1
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
917687c7a6
commit
2f5bb2eec4
27
BUILD
27
BUILD
@@ -1,5 +1,7 @@
|
|||||||
licenses(["notice"])
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||||
|
|
||||||
package(
|
package(
|
||||||
default_visibility = ["//visibility:public"],
|
default_visibility = ["//visibility:public"],
|
||||||
features = [
|
features = [
|
||||||
@@ -86,11 +88,11 @@ cc_binary(
|
|||||||
"src/idl_gen_cpp.cpp",
|
"src/idl_gen_cpp.cpp",
|
||||||
"src/idl_gen_dart.cpp",
|
"src/idl_gen_dart.cpp",
|
||||||
"src/idl_gen_general.cpp",
|
"src/idl_gen_general.cpp",
|
||||||
"src/idl_gen_kotlin.cpp",
|
|
||||||
"src/idl_gen_go.cpp",
|
"src/idl_gen_go.cpp",
|
||||||
"src/idl_gen_grpc.cpp",
|
"src/idl_gen_grpc.cpp",
|
||||||
"src/idl_gen_js_ts.cpp",
|
"src/idl_gen_js_ts.cpp",
|
||||||
"src/idl_gen_json_schema.cpp",
|
"src/idl_gen_json_schema.cpp",
|
||||||
|
"src/idl_gen_kotlin.cpp",
|
||||||
"src/idl_gen_lobster.cpp",
|
"src/idl_gen_lobster.cpp",
|
||||||
"src/idl_gen_lua.cpp",
|
"src/idl_gen_lua.cpp",
|
||||||
"src/idl_gen_php.cpp",
|
"src/idl_gen_php.cpp",
|
||||||
@@ -137,8 +139,8 @@ cc_test(
|
|||||||
"src/util.cpp",
|
"src/util.cpp",
|
||||||
"tests/namespace_test/namespace_test1_generated.h",
|
"tests/namespace_test/namespace_test1_generated.h",
|
||||||
"tests/namespace_test/namespace_test2_generated.h",
|
"tests/namespace_test/namespace_test2_generated.h",
|
||||||
"tests/native_type_test_impl.h",
|
|
||||||
"tests/native_type_test_impl.cpp",
|
"tests/native_type_test_impl.cpp",
|
||||||
|
"tests/native_type_test_impl.h",
|
||||||
"tests/test.cpp",
|
"tests/test.cpp",
|
||||||
"tests/test_assert.cpp",
|
"tests/test_assert.cpp",
|
||||||
"tests/test_assert.h",
|
"tests/test_assert.h",
|
||||||
@@ -152,12 +154,18 @@ cc_test(
|
|||||||
"-DBAZEL_TEST_DATA_PATH",
|
"-DBAZEL_TEST_DATA_PATH",
|
||||||
],
|
],
|
||||||
data = [
|
data = [
|
||||||
|
":tests/arrays_test.bfbs",
|
||||||
|
":tests/arrays_test.fbs",
|
||||||
|
":tests/arrays_test.golden",
|
||||||
":tests/include_test/include_test1.fbs",
|
":tests/include_test/include_test1.fbs",
|
||||||
":tests/include_test/sub/include_test2.fbs",
|
":tests/include_test/sub/include_test2.fbs",
|
||||||
|
":tests/monster_extra.fbs",
|
||||||
":tests/monster_test.bfbs",
|
":tests/monster_test.bfbs",
|
||||||
":tests/monster_test.fbs",
|
":tests/monster_test.fbs",
|
||||||
|
":tests/monsterdata_extra.json",
|
||||||
":tests/monsterdata_test.golden",
|
":tests/monsterdata_test.golden",
|
||||||
":tests/monsterdata_test.json",
|
":tests/monsterdata_test.json",
|
||||||
|
":tests/native_type_test.fbs",
|
||||||
":tests/prototest/imported.proto",
|
":tests/prototest/imported.proto",
|
||||||
":tests/prototest/test.golden",
|
":tests/prototest/test.golden",
|
||||||
":tests/prototest/test.proto",
|
":tests/prototest/test.proto",
|
||||||
@@ -165,21 +173,15 @@ cc_test(
|
|||||||
":tests/unicode_test.json",
|
":tests/unicode_test.json",
|
||||||
":tests/union_vector/union_vector.fbs",
|
":tests/union_vector/union_vector.fbs",
|
||||||
":tests/union_vector/union_vector.json",
|
":tests/union_vector/union_vector.json",
|
||||||
":tests/monster_extra.fbs",
|
|
||||||
":tests/monsterdata_extra.json",
|
|
||||||
":tests/arrays_test.bfbs",
|
|
||||||
":tests/arrays_test.fbs",
|
|
||||||
":tests/arrays_test.golden",
|
|
||||||
":tests/native_type_test.fbs",
|
|
||||||
],
|
],
|
||||||
includes = [
|
includes = [
|
||||||
"include/",
|
"include/",
|
||||||
"tests/",
|
"tests/",
|
||||||
],
|
],
|
||||||
deps = [
|
deps = [
|
||||||
|
":arrays_test_cc_fbs",
|
||||||
":monster_extra_cc_fbs",
|
":monster_extra_cc_fbs",
|
||||||
":monster_test_cc_fbs",
|
":monster_test_cc_fbs",
|
||||||
":arrays_test_cc_fbs",
|
|
||||||
":native_type_test_cc_fbs",
|
":native_type_test_cc_fbs",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@@ -211,7 +213,8 @@ flatbuffer_cc_library(
|
|||||||
"--gen-mutable",
|
"--gen-mutable",
|
||||||
"--reflect-names",
|
"--reflect-names",
|
||||||
"--cpp-ptr-type flatbuffers::unique_ptr",
|
"--cpp-ptr-type flatbuffers::unique_ptr",
|
||||||
"--scoped-enums" ],
|
"--scoped-enums",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
flatbuffer_cc_library(
|
flatbuffer_cc_library(
|
||||||
@@ -220,6 +223,6 @@ flatbuffer_cc_library(
|
|||||||
flatc_args = [
|
flatc_args = [
|
||||||
"--gen-object-api",
|
"--gen-object-api",
|
||||||
"--gen-mutable",
|
"--gen-mutable",
|
||||||
"--cpp-ptr-type flatbuffers::unique_ptr" ],
|
"--cpp-ptr-type flatbuffers::unique_ptr",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|||||||
|
|
||||||
http_archive(
|
http_archive(
|
||||||
name = "io_bazel_rules_go",
|
name = "io_bazel_rules_go",
|
||||||
|
sha256 = "f04d2373bcaf8aa09bccb08a98a57e721306c8f6043a2a0ee610fd6853dcde3d",
|
||||||
urls = [
|
urls = [
|
||||||
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz",
|
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz",
|
||||||
"https://github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz",
|
"https://github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz",
|
||||||
],
|
],
|
||||||
sha256 = "f04d2373bcaf8aa09bccb08a98a57e721306c8f6043a2a0ee610fd6853dcde3d",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
|
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
Rules for building C++ flatbuffers with Bazel.
|
Rules for building C++ flatbuffers with Bazel.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||||
|
|
||||||
flatc_path = "@com_github_google_flatbuffers//:flatc"
|
flatc_path = "@com_github_google_flatbuffers//:flatc"
|
||||||
|
|
||||||
DEFAULT_INCLUDE_PATHS = [
|
DEFAULT_INCLUDE_PATHS = [
|
||||||
@@ -209,7 +211,7 @@ def flatbuffer_cc_library(
|
|||||||
reflection_name = reflection_name,
|
reflection_name = reflection_name,
|
||||||
reflection_visibility = visibility,
|
reflection_visibility = visibility,
|
||||||
)
|
)
|
||||||
native.cc_library(
|
cc_library(
|
||||||
name = name,
|
name = name,
|
||||||
hdrs = [
|
hdrs = [
|
||||||
":" + srcs_lib,
|
":" + srcs_lib,
|
||||||
|
|||||||
Reference in New Issue
Block a user