Files
codeql/javascript/extractor/BUILD.bazel
Paolo Tranquilli 9f5782b67b Bazel: introduce buildifier formatting
This introduces tooling and enforcement for formatting bazel files.

The tooling is provided as a bazel run target from
[keith/buildifier-prebuilt](https://github.com/keith/buildifier-prebuilt).

This is used in a [`pre-commit`](https://pre-commit.com/) hook for those
having that installed. In turn this is used in a CI check. Relying on a
`pre-commit` action gives us easy checking that buildifying did not
change anything in the files and printing the diff, without having to
hand-roll the check ourselves.

This enforcement will make usage of gazelle easier, as gazelle itself
might reformat files, even outside of `go`. Having them properly
formatted will allow gazelle to leave them unchanged, without needing
to configure awkward exclude directives.
2024-04-24 15:49:48 +02:00

57 lines
1.7 KiB
Python

load("@rules_pkg//pkg:mappings.bzl", "pkg_files")
load("@semmle_code//:common.bzl", "codeql_fat_jar", "codeql_java_project")
java_library(
name = "deps",
visibility = [":__subpackages__"],
exports = [
"@semmle_code//extractor:html",
"@semmle_code//extractor:yaml",
"@semmle_code//resources/lib/java:commons-compress",
"@semmle_code//resources/lib/java:gson",
"@semmle_code//resources/lib/java:jericho-html",
"@semmle_code//resources/lib/java:slf4j-api",
"@semmle_code//resources/lib/java:snakeyaml",
"@semmle_code//third_party:jackson",
"@semmle_code//third_party:logback",
"@semmle_code//util-java7",
"@semmle_code//util-java8",
],
)
codeql_java_project(
name = "extractor",
deps = [
":deps",
],
)
codeql_fat_jar(
name = "extractor-javascript",
srcs = [
":extractor",
"@semmle_code//extractor:html",
"@semmle_code//extractor:xml-trap-writer",
"@semmle_code//extractor:yaml",
"@semmle_code//resources/lib/java:commons-compress",
"@semmle_code//resources/lib/java:gson",
"@semmle_code//resources/lib/java:jericho-html",
"@semmle_code//resources/lib/java:slf4j-api",
"@semmle_code//resources/lib/java:snakeyaml",
"@semmle_code//third_party:jackson",
"@semmle_code//third_party:logback",
"@semmle_code//util-java7",
"@semmle_code//util-java8",
],
main_class = "com.semmle.js.extractor.Main",
)
pkg_files(
name = "tools-extractor",
srcs = [
":extractor-javascript",
],
prefix = "tools",
visibility = ["//visibility:public"],
)