forked from lowRISC/opentitan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
85 lines (74 loc) · 1.97 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")
load("//rules:quality.bzl", "clang_format_check", "html_coverage_report")
load("@lowrisc_lint//rules:rules.bzl", "licence_check")
package(default_visibility = ["//visibility:public"])
unbuildify = [
"./WORKSPACE", # Prevent Buildifier from inserting unnecessary newlines.
"./**/vendor/**",
"./util/lowrisc_misc-linters/**",
"./build/**",
]
buildifier(
name = "buildifier_fix",
exclude_patterns = unbuildify,
)
buildifier(
name = "buildifier_check",
diff_command = "diff -u",
exclude_patterns = unbuildify,
mode = "diff",
)
licence_check(
name = "license_check",
exclude_patterns = [".style.yapf"],
licence = """
Copyright lowRISC contributors.
Licensed under the Apache License, Version 2.0, see LICENSE for details.
SPDX-License-Identifier: Apache-2.0
""",
)
clang_format_check(
name = "clang_format_check",
exclude_patterns = [
# Vendored source code dirs
"./**/vendor/**",
# Rust cargo build dirs
"./**/target/**",
# Meson build dirs
"./build-out/**",
"./build-bin/**",
# fusesoc build dir
"./build/**",
],
mode = "diff",
)
clang_format_check(
name = "clang_format_fix",
exclude_patterns = [
# Vendored source code dirs
"./**/vendor/**",
# Rust cargo build dirs
"./**/target/**",
# Meson build dirs
"./build-out/**",
"./build-bin/**",
# fusesoc build dir
"./build/**",
],
mode = "fix",
)
html_coverage_report(
name = "html_coverage_report",
)
filegroup(
name = "cores",
srcs = [
"check_tool_requirements.core",
"topgen.core",
"topgen-reg-only.core",
],
)
exports_files(["python-requirements.txt"])