mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-09-27 20:10:51 -04:00
bazel: add golangci-lint to //:check target (#1494)
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
e92c08be31
commit
f7713df833
7 changed files with 158 additions and 56 deletions
|
@ -65,6 +65,36 @@ def sh_template(name, **kwargs):
|
|||
**kwargs
|
||||
)
|
||||
|
||||
def sh_test_template(name, **kwargs):
|
||||
"""Build a sh_test from a template
|
||||
|
||||
Args:
|
||||
name: name
|
||||
**kwargs: **kwargs
|
||||
"""
|
||||
script_name = name + "-script"
|
||||
|
||||
tags = kwargs.get("tags", [])
|
||||
data = kwargs.get("data", [])
|
||||
data.append("//bazel/sh:base_lib")
|
||||
substitutions = kwargs.pop("substitutions", [])
|
||||
substitutions["@@BASE_LIB@@"] = "$(rootpath //bazel/sh:base_lib)"
|
||||
template = kwargs.pop("template", [])
|
||||
|
||||
_sh_template(
|
||||
name = script_name,
|
||||
tags = tags,
|
||||
data = data,
|
||||
substitutions = substitutions,
|
||||
template = template,
|
||||
)
|
||||
|
||||
native.sh_test(
|
||||
name = name,
|
||||
srcs = [script_name],
|
||||
**kwargs
|
||||
)
|
||||
|
||||
def repo_command(name, **kwargs):
|
||||
"""Build a sh_binary that executes a single command.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue