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
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
K_SOUP_COV_MIN_BRANCH: 100
K_SOUP_COV_MIN_LINE: 100
K_SOUP_COV_MIN_HARD: true
K_SOUP_COV_MIN_STRICT: false
K_SOUP_COV_FORMATTERS: "xml,rcov,lcov,tty"
K_SOUP_COV_DO: true
K_SOUP_COV_MULTI_FORMATTERS: true
Expand Down
1 change: 1 addition & 0 deletions gems/kettle-jem/lib/kettle/jem/templates/AGENTS.md.example
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ mise exec -C /path/to/project -- bin/kettle-soup-cover -d
- `K_SOUP_COV_MIN_LINE` – Line coverage threshold
- `K_SOUP_COV_MIN_BRANCH` – Branch coverage threshold
- `K_SOUP_COV_MIN_HARD=true` – Fail if thresholds not met
- `K_SOUP_COV_MIN_STRICT=true` – Require 100% line, branch, and method coverage

### Code Quality

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ Coverage (kettle-soup-cover / SimpleCov)
- K_SOUP_COV_MIN_LINE: Minimum line coverage threshold (integer, e.g., 100)
- K_SOUP_COV_MIN_BRANCH: Minimum branch coverage threshold (integer, e.g., 100)
- K_SOUP_COV_MIN_HARD: Fail the run if thresholds are not met (true/false)
- K_SOUP_COV_MIN_STRICT: Require 100% line, branch, and method coverage (true/false)
- K_SOUP_COV_MULTI_FORMATTERS: Enable multiple formatters at once (true/false)
- K_SOUP_COV_OPEN_BIN: Path to browser opener for HTML (empty disables auto-open)
- MAX_ROWS: Limit console output rows for simplecov-console (e.g., 1)
Expand Down
1 change: 1 addition & 0 deletions gems/kettle-jem/lib/kettle/jem/templates/mise.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ K_SOUP_COV_DO = "true"
K_SOUP_COV_FORMATTERS = "html,xml,rcov,lcov,json,tty"
K_SOUP_COV_MIN_BRANCH = "76"
K_SOUP_COV_MIN_HARD = "true"
K_SOUP_COV_MIN_STRICT = "false"
K_SOUP_COV_MIN_LINE = "92"
K_SOUP_COV_MULTI_FORMATTERS = "true"
K_SOUP_COV_OPEN_BIN = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ K_SOUP_COV_DO = "true"
K_SOUP_COV_FORMATTERS = "html,xml,rcov,lcov,json,tty"
K_SOUP_COV_MIN_BRANCH = "76"
K_SOUP_COV_MIN_HARD = "true"
K_SOUP_COV_MIN_STRICT = "false"
K_SOUP_COV_MIN_LINE = "92"
K_SOUP_COV_MULTI_FORMATTERS = "true"
K_SOUP_COV_OPEN_BIN = ""
Expand Down
11 changes: 11 additions & 0 deletions gems/kettle-jem/spec/integration/coverage_template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
include_context "with isolated kettle-jem environment"
include_context "with kettle-jem fixture contracts"

it "exposes strict coverage as an opt-in in generated project configuration" do
template_root = File.expand_path("../../lib/kettle/jem/templates", __dir__)
mise_template = File.read(File.join(template_root, "mise.toml.example"))
workflow_template = File.read(File.join(template_root, ".github/workflows/coverage.yml.example"))
contributing_template = File.read(File.join(template_root, "CONTRIBUTING.md.example"))

expect(mise_template).to include('K_SOUP_COV_MIN_STRICT = "false"')
expect(workflow_template).to include("K_SOUP_COV_MIN_STRICT: false")
expect(contributing_template).to include("K_SOUP_COV_MIN_STRICT")
end

it "disables hard coverage gates for monorepo subgem mise templates" do
recipe = {target_path: "mise.toml"}
template = <<~TOML
Expand Down
Loading