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
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by ToolConfig from .toolconfig.pkl. Edit that file instead.
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100

[*.{rs,py,pyi}]
indent_size = 4

[*.go]
indent_style = tab

[{Makefile,*.mk}]
indent_style = tab

[*.{md,markdown}]
max_line_length = 80
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
contents: read
services:
postgres:
image: postgres:18.6-alpine
image: postgres:18.6-alpine@sha256:9ba53c7d41ea093baf5c1ba635ba5434c4f979880527d49bb7d9237d3193085b
env:
POSTGRES_USER: sqlc
POSTGRES_PASSWORD: sqlc
Expand Down Expand Up @@ -97,6 +97,14 @@ jobs:
with:
persist-credentials: false

- name: Install ToolConfig
uses: jdx/mise-action@90f833d396d0cc3674b631d2d225e306476c303a # v5.2.10
with:
install_args: toolconfig

- name: Check and generate the ToolConfig files
uses: mathematic-inc/toolconfig-action@1baf7b021e8bf6f0e20737753c13af0fc93c8570 # v2026.11.0

- name: Install buf
uses: bufbuild/buf-action@37ac33d8960807670a6e9719080e885197b09cc6 # v1.7.0
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
analyze:
name: Analyze (${{ matrix.language }})
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
strict-gate:
name: Strict Dependabot gate
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/hk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ jobs:
fetch-depth: 0
persist-credentials: false
- name: Install tools
uses: jdx/mise-action@b44d12e7d0d8ee7461bb893e1b1993500433185b # v5.2.7
uses: jdx/mise-action@90f833d396d0cc3674b631d2d225e306476c303a # v5.2.10
- name: Check and generate the ToolConfig files
uses: mathematic-inc/toolconfig-action@1baf7b021e8bf6f0e20737753c13af0fc93c8570 # v2026.11.0
- name: Audit dependencies
if: github.event_name == 'schedule'
run: cargo-deny --locked --workspace check
- name: Run checks
if: github.event_name != 'schedule'
run: hk check --all --slow
run: hk check --all --slow --skip-step toolconfig
4 changes: 4 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
release-please:
environment: release
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
contents: read
services:
postgres:
image: postgres:18.6-alpine
image: postgres:18.6-alpine@sha256:9ba53c7d41ea093baf5c1ba635ba5434c4f979880527d49bb7d9237d3193085b
env:
POSTGRES_USER: sqlc
POSTGRES_PASSWORD: sqlc
Expand Down Expand Up @@ -55,6 +55,15 @@ jobs:
with:
targets: wasm32-wasip1

- name: Install ToolConfig
uses: jdx/mise-action@90f833d396d0cc3674b631d2d225e306476c303a # v5.2.10
with:
install_args: toolconfig
cache: false

- name: Check and generate the ToolConfig files
uses: mathematic-inc/toolconfig-action@1baf7b021e8bf6f0e20737753c13af0fc93c8570 # v2026.11.0

- name: Format check
run: cargo fmt --all --check

Expand Down
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,25 @@
_sqlc_dev.yaml
.memsearch
/dist/

# BEGIN TOOLCONFIG GENERATED FILES
.toolconfig-stage-*
/.github/actionlint.yaml
/.gitleaks.toml
/.hadolint.yaml
/.oxfmtrc.json
/.oxlintrc.json
/.pinact.yaml
/.rumdl.toml
/.ryl.toml
/.shellcheckrc
/buf.yaml
/deny.toml
/knip.json
/lychee.toml
/ruff.toml
/rustfmt.toml
/tombi.toml
/ty.toml
/typos.toml
# END TOOLCONFIG GENERATED FILES
231 changes: 231 additions & 0 deletions .hk/org.pkl
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
// ToolConfig writes this file to `.hk/org.pkl` from `hk/org.pkl` in
// mathematic-inc/toolconfig-config. Make changes in that repository.
amends "package://github.com/jdx/hk/releases/download/v2.13.0/[email protected]#/Config.pkl"

import "package://github.com/jdx/hk/releases/download/v2.13.0/[email protected]#/Builtins.pkl"

min_hk_version = "2.13.0"
hide_warnings = List("missing-profiles")
exclude =
List(
"**/CHANGELOG.md",
"**/dist/**",
"**/gen/**",
"**/generated/**",
"**/node_modules/**",
"**/target/**",
"**/vendor/**",
)

local oxfmtFiles =
List(
"**/*.astro",
"**/*.cjs",
"**/*.css",
"**/*.cts",
"**/*.graphql",
"**/*.hbs",
"**/*.html",
"**/*.js",
"**/*.json",
"**/*.jsonc",
"**/*.jsx",
"**/*.mjs",
"**/*.mts",
"**/*.scss",
"**/*.svelte",
"**/*.ts",
"**/*.tsx",
"**/*.vue",
)

local rustFiles = List("Cargo.toml", "Cargo.lock", "**/Cargo.toml", "**/*.rs")
local goFiles = List("go.mod", "go.sum", "**/*.go")
local slow = List("slow")

steps {
// The other steps read the tool settings that ToolConfig writes. Git ignores those files, so a
// fresh clone does not have them.
["toolconfig"] {
glob = "**/*"
exclusive = true
check = "toolconfig generate --strict"
}

["bom"] = Builtins.byte_order_marker
["case-conflicts"] = Builtins.check_case_conflict
["executables-have-shebangs"] = Builtins.check_executables_have_shebangs
["large-files"] = Builtins.check_added_large_files
["merge-conflicts"] = Builtins.check_merge_conflict
["mixed-line-endings"] = Builtins.mixed_line_ending
["newlines"] = Builtins.newlines
["private-keys"] = Builtins.detect_private_key
["symlinks"] = Builtins.check_symlinks
["trailing-whitespace"] = Builtins.trailing_whitespace
["typos"] = (Builtins.typos) {
check = "typos --force-exclude {{ files }} || exit 1"
}

["ryl-markdown"] = (Builtins.ryl_markdown) {
depends = "typos"
}
["rumdl-format"] = (Builtins.rumdl_format) {
depends = "ryl-markdown"
}
["rumdl"] = (Builtins.rumdl) {
depends = "rumdl-format"
}
["harper"] = (Builtins.harper) {
types = List("markdown")
check =
"harper-cli --no-color lint --quiet --format compact --ignore SpellCheck,UseTitleCase,SplitWords,SentenceCapitalization,OxfordComma,OrthographicConsistency,NumericRangeEnDash,MissingTo,MassNouns,DisjointPrefixes,PhrasalVerbAsCompoundNoun,ExpandConfiguration,ExpandControl,ExpandMemoryShorthands,WrongNegative {{ files }}"
output_summary = "hide"
depends = "rumdl"
}
["lychee"] = (Builtins.lychee) {
types = List("markdown", "html")
depends = "rumdl"
}

["pkl-format"] = (Builtins.pkl_format) {
shell = null
fix = "pkl format --write {{ files }}"
}
["pkl"] = (Builtins.pkl) {
check = new Script {
windows = "pkl eval {{ files }} >NUL"
other = "pkl eval {{ files }} >/dev/null"
}
depends = "pkl-format"
}
["tombi-format"] = (Builtins.tombi_format) {
depends = "typos"
}
["tombi"] = (Builtins.tombi) {
depends = "tombi-format"
}
["mise"] = (Builtins.mise) {
check = "mise -C {{workspace}} fmt --check"
fix = "mise -C {{workspace}} fmt"
workspace_indicator = "mise.toml"
depends = "tombi"
}
["jq"] = (Builtins.jq) {
check = "jq empty {{ files }}"
check_diff = null
fix = null
}

["jactionlint"] = (Builtins.jactionlint) {
check = "jactionlint {{ files }}"
check_diff = null
fix = "jactionlint --fix {{ files }}"
}
["ghalint"] = (Builtins.ghalint_workflow) {
depends = "jactionlint"
}
["pinact"] = (Builtins.pinact) {
check = "pinact run --fix=false --no-api {{ files }}"
check_diff = null
}
["zizmor"] = (Builtins.zizmor) {
check = "zizmor --no-progress {{ files }}"
check_diff = null
fix = "zizmor --no-progress --fix {{ files }}"
depends = "pinact"
}

["hadolint"] = Builtins.hadolint
["ruff-format"] = Builtins.ruff_format
["ruff"] = (Builtins.ruff) {
depends = "ruff-format"
}
["ty"] = (Builtins.ty) {
depends = "ruff"
}
["python-ast"] = Builtins.python_check_ast
["python-debug-statements"] = Builtins.python_debug_statements
["shellharden"] = Builtins.shellharden
["shellcheck"] = (Builtins.shellcheck) {
depends = "shellharden"
}
["shfmt"] = (Builtins.shfmt) {
depends = "shellcheck"
}
["ryl"] = Builtins.ryl

// rumdl, tombi and sort-package-json own Markdown, TOML and package.json. YAML is not here,
// because oxfmt writes `{ bar: 0 }` in a flow mapping and the braces rule of ryl rejects it.
["oxfmt"] = (Builtins.oxfmt) {
glob = oxfmtFiles
exclude = super.exclude + List("**/package.json")
}
["oxlint"] = (Builtins.ox_lint) {
depends = "oxfmt"
}
["sort-package-json"] = Builtins.sort_package_json

["buf-format"] = Builtins.buf_format
["buf-lint"] = (Builtins.buf_lint) {
depends = "buf-format"
}

["cargo-fmt"] = (Builtins.cargo_fmt) {
glob = rustFiles
workspace_indicator = null
check = "cargo fmt --all --check"
fix = "cargo fmt --all"
}
["cargo-clippy"] = (Builtins.cargo_clippy) {
glob = rustFiles
workspace_indicator = null
check = "cargo clippy --workspace --all-features --all-targets -- -D warnings"
fix =
"cargo clippy --fix --workspace --all-features --all-targets --allow-dirty --allow-staged -- -D warnings"
profiles = slow
}
["cargo-deny"] = (Builtins.cargo_deny) {
glob = List("Cargo.toml", "Cargo.lock", "deny.toml", "**/Cargo.toml")
workspace_indicator = null
check = "cargo-deny --locked --workspace check"
profiles = slow
}

["go-fmt"] = (Builtins.go_fmt) {
glob = goFiles
}
["go-mod-tidy"] = (Builtins.gomod_tidy) {
depends = "go-fmt"
}
["go-vet"] = (Builtins.go_vet) {
depends = "go-mod-tidy"
profiles = slow
}

["gitleaks"] = (Builtins.gitleaks) {
glob = "**/*"
check = "gitleaks git --redact --verbose --no-banner --timeout 60 --log-opts=--all ."
profiles = slow
}
["kingfisher"] = (Builtins.kingfisher) {
glob = "**/*"
check = "kingfisher scan {{ files }} --no-update-check --no-validate --quiet --redact"
profiles = slow
}
}

hooks {
["commit-msg"] {
steps {
["conventional-commit"] = Builtins.check_conventional_commit
}
}
["pre-push"] {
steps {
["checks"] {
glob = "**/*"
check = "hk check --all --slow"
}
}
}
}
3 changes: 1 addition & 2 deletions .pinact.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
version: 3

rules:
- ignore: true
conditions:
- expr: ActionName == "dtolnay/rust-toolchain"
- expr: ActionName == "dtolnay/rust-toolchain" && ActionVersion matches "^[0-9a-f]{40}$"
5 changes: 4 additions & 1 deletion .rumdl.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[MD013]
line-length = 80

[global]
disable = ["MD013", "MD057"]
exclude = ["**/dist/**", "**/gen/**", "**/generated/**", "**/node_modules/**", "**/target/**", "**/vendor/**", "**/CHANGELOG.md"]
Loading
Loading