Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/cli/commands/quality.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ See [standard tiers](../../tiers-standard.md) and [strict tiers](../../tiers-str
| `deadnix` | curated | `*.txt` | none | dx | |
| `detekt` | curated | `*.yml`, `*.yaml` | none | dx | |
| `djlint` | catalog | `djlint.toml`, `*.djlintrc` | none | dx | |
| `docstrfmt` | catalog | `docstrfmt.toml` | override copy | dx | |
| `elvis` | catalog | `elvis.config`, `*.config` | none | dx | |
| `errcheck` | curated | `*.txt` | none | dx | |
| `eslint` | catalog | `eslint.config.mjs`, `eslint.config.js`, `eslint.config.cjs`, `eslint.config.ts`, `.eslintrc*` | extends | dx | |
Expand All @@ -448,7 +449,6 @@ See [standard tiers](../../tiers-standard.md) and [strict tiers](../../tiers-str
| `govet` | curated | `*.json` | none | dx | |
| `gplint` | catalog | `*.gplintrc`, `*.json` | none | dx | |
| `graphql_eslint` | catalog | `*.json` | none | dx | |
| `docstrfmt` | catalog | `docstrfmt.toml` | override copy | dx | |
| `hadolint` | curated | `*.yaml`, `*.yml` | none | dx | |
| `hlint` | catalog | `.hlint.yaml` | override copy | dx | |
| `julialint` | curated | `*.toml` | none | dx | |
Expand Down
7 changes: 7 additions & 0 deletions quality/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ load(":real_pipeline_tests.bzl", "real_pipeline_unit_tests", "rustc_request_anal
load(":registry_tests.bzl", "registry_unit_tests")
load(":sources_tests.bzl", "sources_registry_tests")
load(":support_tests.bzl", "support_unit_tests")
load(":tools_tests.bzl", "tools_unit_tests")
load(":wrapper_owners.bzl", "wrapper_unit_tests")

package(default_visibility = ["//visibility:public"])
Expand All @@ -55,6 +56,7 @@ exports_files([
"sources.bzl",
"support.bzl",
"tool_config_docs.bzl",
"tool_defs.bzl",
"tools.bzl",
"unavailable_tool.bzl",
] + glob(["families/*.bzl"]))
Expand Down Expand Up @@ -627,6 +629,8 @@ diff_test(

overlap_unit_tests(name = "overlap_tests")

tools_unit_tests(name = "tools_unit")

support_unit_tests(name = "support_unit")

alias(
Expand Down Expand Up @@ -705,6 +709,7 @@ test_suite(
":registry_unit",
":sources_registry",
":support_unit",
":tools_unit",
":wrapper_owners_unit",
],
)
Expand Down Expand Up @@ -769,8 +774,10 @@ real_source_target(
"support.bzl",
"support_tests.bzl",
"tool_config_docs.bzl",
"tool_defs.bzl",
"tools.bzl",
"tools_gen.bzl",
"tools_tests.bzl",
"wrapper_owners.bzl",
"roslyn.bzl",
"go_analysis.bzl",
Expand Down
3 changes: 2 additions & 1 deletion quality/adapters.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Deterministic synthetic adapter registry."""

load(":tools.bzl", "TOOLS", "is_canonical_token")
load(":tool_defs.bzl", "is_canonical_token")
load(":tools.bzl", "TOOLS")

SYNTHETIC_ADAPTERS = {
"fmt-a": {"format": ["rust"]},
Expand Down
2 changes: 1 addition & 1 deletion quality/curated_defaults.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Curated quality defaults."""

load(":tools.bzl", "is_canonical_token")
load(":tool_defs.bzl", "is_canonical_token")

# Julia lints with julialint only. Its extra fetch over typos is the dx_julia_lint package set
# (21 packages, about 4.2 MB); the 1.12.5 runtime (about 288 MB on linux_x86_64) is already
Expand Down
25 changes: 25 additions & 0 deletions quality/families/ansible_tools.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""Quality tool rows for the ansible family."""

load("//quality:tool_defs.bzl", "config", "row", "severity", "tool")

TOOLS = [
tool(
id = "ansible_lint",
adapters = {"lint": ["ansible"]},
config = config(suffixes = [".ansible-lint", ".yml", ".yaml"], tier_active = True, tier_source = "ansible-lint moderate and production profiles"),
severity = severity(default = "warning", categories = {"internal-error": "error", "load-failure": "error", "syntax-check": "error"}),
support = [
row(
capability = "lint",
classes = ["ansible"],
family = "ansible",
fix = "supported",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64"],
unsupported = {
"windows_arm64": "ansible-core does not run on Windows",
"windows_x86_64": "ansible-core does not run on Windows",
},
),
],
),
]
133 changes: 133 additions & 0 deletions quality/families/beam_tools.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
"""Quality tool rows for the beam family."""

load("//quality:tool_defs.bzl", "config", "row", "severity", "tool")

TOOLS = [
tool(
id = "credo",
adapters = {"lint": ["elixir"]},
config = config(suffixes = [".exs"], tier_active = True),
severity = severity(default = "warning"),
support = [
row(
capability = "lint",
classes = ["elixir"],
family = "elixir",
fix = "check_only",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64", "windows_arm64", "windows_x86_64"],
),
],
),
tool(
id = "dialyzer",
adapters = {"typecheck": ["erlang", "elixir"]},
severity = severity(default = "error"),
support = [
row(
capability = "typecheck",
classes = ["erlang"],
context = "target_coupled",
family = "erlang",
fix = "check_only",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64", "windows_arm64", "windows_x86_64"],
),
row(
capability = "typecheck",
classes = ["elixir"],
context = "target_coupled",
family = "elixir",
fix = "check_only",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64"],
unsupported = {
"windows_arm64": "dialyzer on Windows is pending #6321",
"windows_x86_64": "dialyzer on Windows is pending #6008",
},
),
],
),
tool(
id = "elvis",
adapters = {"lint": ["erlang"]},
config = config(suffixes = ["elvis.config", ".config"], tier_active = True),
severity = severity(default = "warning"),
support = [
row(
capability = "lint",
classes = ["erlang"],
family = "erlang",
fix = "check_only",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64", "windows_arm64", "windows_x86_64"],
),
],
),
tool(
id = "elixirc",
adapters = {"typecheck": ["elixir"]},
concerns = {"typecheck": "unused_code"},
severity = severity(default = "warning"),
support = [
row(
capability = "typecheck",
classes = ["elixir"],
context = "target_coupled",
family = "elixir",
fix = "check_only",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64"],
unsupported = {
"windows_arm64": "The elixirc replay needs a POSIX shell",
"windows_x86_64": "The elixirc replay needs a POSIX shell",
},
),
],
),
tool(
id = "erlc",
adapters = {"typecheck": ["erlang"]},
concerns = {"typecheck": "unused_code"},
severity = severity(default = "warning"),
support = [
row(
capability = "typecheck",
classes = ["erlang"],
context = "target_coupled",
family = "erlang",
fix = "check_only",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64", "windows_arm64", "windows_x86_64"],
),
],
),
tool(
id = "erlfmt",
adapters = {"format": ["erlang"]},
config = config(kind = "none", tier_active = True),
support = [
row(
capability = "format",
classes = ["erlang"],
family = "erlang",
fix = "supported",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64", "windows_arm64", "windows_x86_64"],
),
],
),
tool(
id = "mix_format",
adapters = {"format": ["elixir"]},
config = config(
suffixes = [".exs"],
files = [".formatter.exs"],
ext = "exs",
comment = "#",
tier_active = True,
),
support = [
row(
capability = "format",
classes = ["elixir"],
family = "elixir",
fix = "supported",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64", "windows_arm64", "windows_x86_64"],
),
],
),
]
31 changes: 31 additions & 0 deletions quality/families/bicep_tools.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""Quality tool rows for the bicep family."""

load("//quality:tool_defs.bzl", "config", "row", "tool")

TOOLS = [
tool(
id = "bicep",
adapters = {
"format": ["bicep"],
"lint": ["bicep"],
},
config = config(suffixes = ["bicepconfig.json"], files = ["bicepconfig.json"], tier_active = True, stage_native = True),
support = [
row(
capability = "format",
classes = ["bicep"],
family = "bicep",
fix = "supported",
transport = "single",
),
row(
capability = "lint",
classes = ["bicep"],
context = "target_coupled",
family = "bicep",
fix = "check_only",
transport = "single",
),
],
),
]
102 changes: 102 additions & 0 deletions quality/families/cc_tools.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
"""Quality tool rows for the cc family."""

load("//quality:tool_defs.bzl", "config", "row", "severity", "tool")

TOOLS = [
tool(
id = "clang_format",
adapters = {"format": ["c", "cpp", "cuda", "objc", "objcpp"]},
config = config(suffixes = [".clang-format"], files = [".clang-format"], tier_active = True),
support = [
row(
capability = "format",
classes = ["c", "cpp"],
family = "cc",
fix = "supported",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64", "windows_arm64", "windows_x86_64"],
),
row(
capability = "format",
classes = ["cuda"],
family = "cuda",
fix = "supported",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64", "windows_arm64", "windows_x86_64"],
),
row(
capability = "format",
classes = ["objc", "objcpp"],
family = "objc",
fix = "supported",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64", "windows_arm64", "windows_x86_64"],
),
],
),
tool(
id = "clang_syntax",
adapters = {"typecheck": ["c", "cpp", "objc", "objcpp"]},
support = [
row(
capability = "typecheck",
classes = ["c", "cpp"],
context = "target_coupled",
family = "cc",
fix = "check_only",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64", "windows_arm64", "windows_x86_64"],
),
row(
capability = "typecheck",
classes = ["objc", "objcpp"],
context = "target_coupled",
family = "objc",
fix = "check_only",
platforms = ["macos_arm64"],
unsupported = {
"linux_arm64": "objc_library builds only with an Apple toolchain",
"linux_x86_64": "objc_library builds only with an Apple toolchain",
"windows_arm64": "objc_library builds only with an Apple toolchain",
"windows_x86_64": "objc_library builds only with an Apple toolchain",
},
),
],
),
tool(
id = "clang_tidy",
adapters = {"lint": ["c", "cpp", "cuda", "objc", "objcpp"]},
config = config(suffixes = [".clang-tidy"], tier_active = True),
severity = severity(categories = {
"bugprone-": "warning",
"cert-": "warning",
"clang-analyzer-": "warning",
"clang-diagnostic-error": "error",
"cppcoreguidelines-": "warning",
"misc-": "warning",
"modernize-": "warning",
"performance-": "warning",
"readability-": "warning",
}),
support = [
row(
capability = "lint",
classes = ["c", "cpp"],
context = "target_coupled",
family = "cc",
fix = "check_only",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64", "windows_arm64", "windows_x86_64"],
),
],
),
tool(
id = "nvcc_syntax",
adapters = {"typecheck": ["cuda"]},
support = [
row(
capability = "typecheck",
classes = ["cuda"],
context = "target_coupled",
family = "cuda",
fix = "check_only",
platforms = ["linux_arm64", "linux_x86_64", "windows_x86_64"],
),
],
),
]
20 changes: 20 additions & 0 deletions quality/families/cloudformation_tools.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""Quality tool rows for the cloudformation family."""

load("//quality:tool_defs.bzl", "config", "row", "tool")

TOOLS = [
tool(
id = "cfn_lint",
adapters = {"lint": ["cloudformation"]},
config = config(suffixes = [".cfnlintrc", ".yaml", ".yml"], tier_active = True),
support = [
row(
capability = "lint",
classes = ["cloudformation"],
family = "cloudformation",
fix = "check_only",
platforms = ["linux_arm64", "linux_x86_64", "macos_arm64", "windows_arm64", "windows_x86_64"],
),
],
),
]
Loading
Loading