diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index cb73476..255f33d 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-24.04 permissions: security-events: write # Upload SARIF to Code Scanning - id-token: write # OIDC for publishing results + id-token: write # OIDC for publishing results contents: read steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ce7ee37..7287e90 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,16 @@ # See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-merge-conflict + - id: check-added-large-files + - id: check-case-conflict + - repo: https://github.com/keith/pre-commit-buildifier rev: 8.5.1.1 hooks: @@ -10,3 +21,9 @@ repos: rev: v1.48.0 hooks: - id: typos + + - repo: https://github.com/rbubley/mirrors-prettier + rev: v3.9.4 + hooks: + - id: prettier + types_or: [markdown, yaml] diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..399ade2 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,27 @@ +# Bazel — handled by buildifier +*.bzl +BUILD +BUILD.bazel +WORKSPACE +WORKSPACE.bzlmod +MODULE.bazel +MODULE.bazel.lock +.bazelversion +.bazelrc + +# Generated / cache +bazel-* +**/bazel-* +.venv/ +*.runfiles/ + +# Odin source — not prettier's domain +*.odin + +# Plain text (not Markdown/YAML) +LICENSE +NOTICE + +# Personal (gitignored anyway, but exclude for safety) +TODO.md +AGENTS.md diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index 4d91f57..bfc180c 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -39,8 +39,8 @@ Supported version matrix for `rules_odin`. rules_odin downloads the Odin compiler hermetically, but the **linker** must be available on the host: -| Platform | Required Host Tool | -| -------- | ------------------------------------------------- | -| Linux | `clang` (via system package manager) | -| macOS | Xcode Command Line Tools (`xcode-select --install`)| -| Windows | MSVC Build Tools (Visual Studio) | +| Platform | Required Host Tool | +| -------- | --------------------------------------------------- | +| Linux | `clang` (via system package manager) | +| macOS | Xcode Command Line Tools (`xcode-select --install`) | +| Windows | MSVC Build Tools (Visual Studio) | diff --git a/README.md b/README.md index caa60cf..68ecb0a 100644 --- a/README.md +++ b/README.md @@ -61,15 +61,15 @@ import greetings "greetings:lib" // collection:name → lib/ directory Compiles an Odin package (directory of `.odin` files) into an executable. -| Attribute | Type | Default | Description | -| ---------------------- | ------------- | ------------ | ---------------------------------------- | -| `srcs` | label_list | **required** | Odin source files (must share a package) | -| `deps` | label_list | `[]` | `odin_library` targets to import as collections | -| `optimization` | string | `"none"` | One of: none, minimal, speed, size, aggressive | -| `debug` | bool | `True` | Include debug symbols | -| `defines` | string_dict | `{}` | Compile-time `-define:` values | -| `extra_compiler_flags` | string_list | `[]` | Additional flags passed to `odin build` | -| `vet` | bool | `False` | Enable `-vet` checks | +| Attribute | Type | Default | Description | +| ---------------------- | ----------- | ------------ | ----------------------------------------------- | +| `srcs` | label_list | **required** | Odin source files (must share a package) | +| `deps` | label_list | `[]` | `odin_library` targets to import as collections | +| `optimization` | string | `"none"` | One of: none, minimal, speed, size, aggressive | +| `debug` | bool | `True` | Include debug symbols | +| `defines` | string_dict | `{}` | Compile-time `-define:` values | +| `extra_compiler_flags` | string_list | `[]` | Additional flags passed to `odin build` | +| `vet` | bool | `False` | Enable `-vet` checks | ### `odin_library` @@ -81,10 +81,10 @@ Groups Odin source files into a library that can be imported by `odin_binary` ta ## Supported Odin Versions -| Version | Status | -| ------------ | --------- | -| dev-2026-06 | Supported | -| dev-2026-05 | Supported | +| Version | Status | +| ----------- | --------- | +| dev-2026-06 | Supported | +| dev-2026-05 | Supported | See [COMPATIBILITY.md](COMPATIBILITY.md) for the full version matrix.