Skip to content

Commit

Permalink
Restore lint, remove hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
restingbull committed Dec 8, 2023
1 parent bebfc11 commit 3250bff
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
1 change: 0 additions & 1 deletion .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ tasks:
name: "Example - Trivial Bzlmod (Ubuntu 18.04)"
platform: ubuntu1804
working_directory: examples/trivial
- bazel clean --expunge --async && bazel shutdown
build_flags:
- "--enable_bzlmod=true"
test_flags:
Expand Down
19 changes: 19 additions & 0 deletions src/main/kotlin/bootstrap.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.
load("@released_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library")
load("@rules_java//java:defs.bzl", "java_binary")
load("//kotlin:lint.bzl", _ktlint_fix = "ktlint_fix", _ktlint_test = "ktlint_test")
load("//third_party:jarjar.bzl", "jar_jar")

def kt_bootstrap_library(name, deps = [], neverlink_deps = [], **kwargs):
Expand All @@ -34,6 +35,24 @@ def kt_bootstrap_library(name, deps = [], neverlink_deps = [], **kwargs):
**kwargs
)

_ktlint_test(
name = "%s_ktlint_test" % name,
srcs = srcs,
visibility = ["//visibility:private"],
config = "//:ktlint_editorconfig",
tags = ["no-ide", "ktlint"],
)

_ktlint_fix(
name = "%s_ktlint_fix" % name,
srcs = srcs,
visibility = ["//visibility:private"],
config = "//:ktlint_editorconfig",
tags = ["no-ide", "ktlint"],
deps = deps + ["%s_neverlink" % name],
**kwargs
)

def kt_bootstrap_binary(
name,
main_class,
Expand Down

0 comments on commit 3250bff

Please sign in to comment.