bazel

📁 checkmk/checkmk 📅 4 days ago
15
总安装量
14
周安装量
#22519
全站排名
安装命令
npx skills add https://github.com/checkmk/checkmk --skill bazel

Agent 安装分布

amp 14
github-copilot 14
codex 14
kimi-cli 14
gemini-cli 14
cursor 14

Skill 文档

Running Tests

Execution & Filtering

# Run all tests in a package (recursive with /...)
bazel test //packages/cmk-messaging/...
# Run specific target
bazel test //packages/cmk-messaging:unit
# Filter specific tests (regex supported)
bazel test //packages/cmk-messaging:unit --test_filter="test_connection*"
bazel test //packages/...:all --test_filter=".*integration.*"

Output & Debugging

# Output: all (verbose), errors (concise), summary
bazel test //packages/cmk-messaging:unit --test_output=errors
# Detailed summary
bazel test //packages/... --test_summary=detailed
# Reproduce flakes (run 100x, stop on failure)
bazel test //packages/cmk-messaging:unit \
  --runs_per_test=100 \
  --runs_per_test_detects_flakes \
  --test_output=streamed

Discovery

bazel query 'tests(//packages/cmk-messaging/...)'

Linting

Standard Linters

# Run all linters (interactive by default)
bazel lint //packages/cmk-messaging:all
# Common options
bazel lint --fix //packages/...    # Auto-apply fixes
bazel lint --diff //packages/...   # Show diffs
bazel lint --quiet //packages/...  # Show only issues

Specific Checks

# Mypy (Type Checking)
bazel build --config=mypy //packages/cmk-messaging:all
# Clippy (Rust)
bazel build --config=clippy //packages/cmk-agent-ctl:all

bazel mod

# Update the lockfile, e.g. after adding a new bazel_dep to MODULE.bazel
bazel mod deps --lockfile_mode=update