Skip to content

Create separate scripts for mise tasks - #180

Merged
jayvdb merged 1 commit into
mainfrom
separate-scripts
Nov 9, 2026
Merged

jayvdb merged 1 commit into
mainfrom
separate-scripts

Conversation

@jayvdb

@jayvdb jayvdb commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added checks for identity tuple mappings and multiline inline programs in task configurations.
  • Improvements

    • Updated source line-count reporting with per-language totals and test-share percentages.
    • Improved conversion of ignore patterns for container builds and formatting of generated REST documentation.
  • Maintenance

    • Moved several configuration-processing operations into reusable scripts.
    • Updated the checks catalogue and expanded rule coverage for YAML query files.

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Mise tasks now invoke external jq, AWK, and yq programs for report generation, deployment limit checks, Dockerignore conversion, and REST Markdown tidying. The changes also add an AWK script for Dart storage declarations and introduce two static-analysis rules.

Changes: Mise task transformations

Layer / File(s) Summary
SLOC report aggregation and formatting
.mise/config.coverage.toml, .mise/sloc-languages.jq, .mise/sloc-table.awk
The SLOC task uses external jq and AWK programs to combine language counts and format the table.
Deployment limit inputs and probe generation
.mise/config.toml, .mise/verify-limits-*.yq
The task uses external yq programs to select Deployments, read annotations and rlimits, and generate probe Pods.
Dockerignore conversion
.mise/config.toml, .mise/gitignore-to-dockerignore.awk
The task uses an AWK program that preserves comments and blank lines and handles negation, anchors, and slash-free patterns.
REST Markdown tidying
.mise/config.toml, .mise/rest-md-tidy.awk
The task uses an AWK program to replace <br/> and rewrite schema-unavailable lines.

Dart REST storage rewrite

Layer / File(s) Summary
Storage-client rewrite and task update
.mise/config.dart.toml, .mise/dart-rest-storage.awk
The task configuration removes its inline storage-client rewrite. The new AWK script contains the import and storage declaration rewrites, and fails unless each expected match occurs once.

Multiline inline program rule

Layer / File(s) Summary
Rule, fixture, and catalogue entry
config/semgrep/no-multiline-inline-program.yaml, config/semgrep-tests/no-multiline-inline-program.toml.yaml, config/semgrep/comment-summary-line.yaml, CHECKS.md
The Semgrep rule detects multiline inline programs in mise configurations. Its fixture covers violations and allowed cases. The checks catalogue documents the rule, and comment-summary matching now includes .yq files.

Tuple identity map rule

Layer / File(s) Summary
Rule, tests, and catalogue entry
config/ast-grep/rules/no-tuple-identity-map.yaml, config/ast-grep/tests/no-tuple-identity-map.yaml, CHECKS.md
The ast-grep rule detects tuple identity maps in Rust .map closures. Tests include valid and invalid examples, and the checks catalogue documents the rule.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Possibly related PRs

Suggested reviewers: pierre-tenedero

Merge Risk: Minimal · up to d8ac4

This change moves inline scripts in the build tasks into separate files and adds two lint rules. No concrete problem was found, so it looks safe to merge after the usual checks.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title "Create separate scripts for mise tasks" matches the main change. The PR moves inline awk, jq, yq, and goawk programs out of mise task definitions into task-named files under .mise/ (for exa…
Full details: Title check

Explanation

The title "Create separate scripts for mise tasks" matches the main change. The PR moves inline awk, jq, yq, and goawk programs out of mise task definitions into task-named files under .mise/ (for example sloc-languages.jq, sloc-table.awk, verify-limits-probe.yq, gitignore-to-dockerignore.awk, rest-md-tidy.awk). It also adds a Semgrep rule and documentation for this practice. The title is specific and concise, and a reviewer scanning history can tell what changed. The PR objectives only say "Split out scripts," which agrees with the title.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4d40f643-dc4c-4be5-9e07-7c64e27ed341
Commits

Reviewing files that changed from the base of the PR and between 4d43b8a and d8ac4dc.

Files selected for processing: 18

  • .mise/config.coverage.toml
  • .mise/config.dart.toml
  • .mise/config.toml
  • .mise/dart-rest-storage.awk
  • .mise/gitignore-to-dockerignore.awk
  • .mise/rest-md-tidy.awk
  • .mise/sloc-languages.jq
  • .mise/sloc-table.awk
  • .mise/verify-limits-annotations.yq
  • .mise/verify-limits-apps.yq
  • .mise/verify-limits-probe.yq
  • .mise/verify-limits-rlimits.yq
  • CHECKS.md
  • config/ast-grep/rules/no-tuple-identity-map.yaml
  • config/ast-grep/tests/no-tuple-identity-map.yaml
  • config/semgrep-tests/no-multiline-inline-program.toml.yaml
  • config/semgrep/comment-summary-line.yaml
  • config/semgrep/no-multiline-inline-program.yaml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@deepsource-io

deepsource-io Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 4d43b8a...d8ac4dc on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Coverage  

Code Review Summary

Analyzer Status Updated (UTC) Details
C# Nov 9, 2026 12:26a.m. Review ↗
C & C++ Nov 9, 2026 12:26a.m. Review ↗
Docker Nov 9, 2026 12:26a.m. Review ↗
Java Nov 9, 2026 12:26a.m. Review ↗
JavaScript Nov 9, 2026 12:26a.m. Review ↗
Python Nov 9, 2026 12:26a.m. Review ↗
Rust Nov 9, 2026 12:26a.m. Review ↗
Secrets Nov 9, 2026 12:26a.m. Review ↗
Code coverage Nov 9, 2026 1:20a.m. Review ↗

Code Coverage Summary

Language Line Coverage (Overall)
Aggregate
84.0%
Python
94.2%
Rust
83.3%

➟ Additional coverage metrics may have been reported. See full coverage report ↗


Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 2 medium

Alerts:
⚠ 2 issues (≤ 0 issues of at least minor severity)

Results:
2 new issues

Category Results
Performance 2 medium

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@flakiness-io

flakiness-io Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Test Results Summary

This comment shows the latest test results for this pull request.

Commit Status Test Results CI Runs
d8ac4dc ✅ Passed 4741 passed 5 runs

View full report

ℹ️ About Flakiness.io in GitHub

Your team has set up Flakiness.io pull request comments. This comment is updated when

  • The first test results arrive for this pull request
  • A later run reports more results for the same commit
  • A new commit is pushed and tested

Flakiness.io rewrites the comment in place, so it always reflects the most recently tested commit.

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@jayvdb jayvdb changed the title Split out scripts Create separate scripts for mise tasks Nov 9, 2026
@jayvdb
jayvdb merged commit 3cd66f8 into main Nov 9, 2026
48 of 50 checks passed
@jayvdb
jayvdb deleted the separate-scripts branch November 9, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants