{"id":36951054,"url":"https://github.com/eclipse-score/score_rust_policies","last_synced_at":"2026-02-05T14:11:27.365Z","repository":{"id":327397149,"uuid":"1108430021","full_name":"eclipse-score/score_rust_policies","owner":"eclipse-score","description":"Centralized Rust linting and formatting policies for S-CORE, including safety-critical guidelines.","archived":false,"fork":false,"pushed_at":"2025-12-16T09:34:53.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-19T22:40:45.411Z","etag":null,"topics":["formatting","linting","policy","rust","score"],"latest_commit_sha":null,"homepage":"https://eclipse-score.github.io/score_rust_policies","language":"Starlark","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-score.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-02T12:45:20.000Z","updated_at":"2025-12-16T09:34:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/eclipse-score/score_rust_policies","commit_stats":null,"previous_names":["eclipse-score/score_rust_policies"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/eclipse-score/score_rust_policies","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Fscore_rust_policies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Fscore_rust_policies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Fscore_rust_policies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Fscore_rust_policies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-score","download_url":"https://codeload.github.com/eclipse-score/score_rust_policies/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Fscore_rust_policies/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28385571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T12:01:30.995Z","status":"ssl_error","status_checked_at":"2026-01-13T12:00:09.625Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["formatting","linting","policy","rust","score"],"created_at":"2026-01-13T12:05:37.102Z","updated_at":"2026-02-05T14:11:27.354Z","avatar_url":"https://github.com/eclipse-score.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"# score_rust_policies\nCentralized Rust linting and formatting policies for the Eclipse Safe Open Vehicle Core (S-CORE). This repository packages shared Rust lint/format defaults so every S-CORE crate can use the same safety-focused rules.\n\n## Goals\n- Provide one set of vetted Rust linting and formatting defaults for S-CORE projects.\n- Distribute those policies as a Bazel module (`score_rust_policies`) so bzlmod users can depend on them directly.\n- Keep tooling configurations (e.g., Clippy, rustfmt) versioned and auditable in one place.\n\n## Clippy policy levels\n- `clippy/strict/clippy.toml`: ASIL-B–oriented settings for safety-critical code (enables `pedantic`/`nursery`, disallows `panic`/`unwrap`/`expect`, forbids debug/print macros, and enforces size/complexity thresholds).\n- `clippy/relaxed/clippy.toml`: For tooling, generators, and tests where controlled panics/unwraps and debug printing are acceptable. Still forbids `todo` and `unimplemented`.\n\n## How to use Clippy in consumers\n- Wire configs in your repo’s `.bazelrc` (mirrors `tests/.bazelrc`):\n  ```\n  build:clippy-strict  --@rules_rust//rust/settings:clippy.toml=@score_rust_policies//clippy/strict:clippy.toml\n  build:clippy-relaxed --@rules_rust//rust/settings:clippy.toml=@score_rust_policies//clippy/relaxed:clippy.toml\n  ```\n- Exclude targets that shouldn’t be linted (e.g., generated code, some tests) by tagging them `no-clippy`:\n  ```\n  rust_test(\n      name = \"my_test\",\n      srcs = [...],\n      tags = [\"no-clippy\"],\n  )\n  ```\n- Add a dedicated lint target (pattern from `rules_rust`):\n  ```\n  load(\"@rules_rust//rust:defs.bzl\", \"rust_clippy\")\n\n  rust_clippy(\n      name = \"clippy\",\n      deps = [\"//src/rust/...\"],\n      tags = [\"manual\"],\n      testonly = True,\n      visibility = [\"//visibility:public\"],\n  )\n  ```\n  Then run `bazel build --config=clippy-strict //:clippy` (or `--config=clippy-relaxed`).\n\n## Local validation\n- From `tests/` (consumer workspace with a local_path_override) run:\n  - `bazel build --config=strict //:sample_clippy`\n  - `bazel build --config=relaxed //:sample_clippy`\n- The `tests/.bazelrc` sets the strict/relaxed Clippy configs to `@score_rust_policies//clippy/{strict,relaxed}:clippy.toml` via `@rules_rust//rust/settings:clippy.toml`.\n\n## Using with Bazel (bzlmod)\n- Add to your `MODULE.bazel`:\n  ```\n  bazel_dep(name = \"score_rust_policies\", version = \"0.0.4\")\n  ```\n- During local development you can pin a checkout with:\n  ```\n  local_path_override(\n      module_name = \"score_rust_policies\",\n      path = \"\u003cpath-to-this-repo\u003e\",\n  )\n  ```\n- Reference policy files in Bazel targets with:\n  - `@score_rust_policies//clippy:clippy.toml` for safety components.\n  - `@score_rust_policies//clippy:clippy_relaxed.toml` for tooling/tests.\n- When running Clippy directly, pass the config you need: `cargo clippy --config-path path/to/clippy/clippy.toml`.\n\n## Repository layout\n- `MODULE.bazel`: Bazel module metadata for `score_rust_policies`.\n- `BUILD.bazel`: repo root package (tooling configs live in subpackages).\n- `LICENSE.md`: Apache License 2.0.\n- `CONTRIBUTION.md`: contribution process and links to S-CORE guidelines.\n- `.gitignore`: common ignores for Bazel and development tooling.\n- `clippy/`: Clippy configs exported as `@score_rust_policies//clippy/{strict,relaxed}:clippy.toml`.\n- `tests/`: consumer workspace that depends on this module via `local_path_override` and runs Clippy with strict/relaxed configs.\n- (planned) `rustfmt/`: rustfmt defaults when added.\n\n## Contributing\nSee `CONTRIBUTION.md` for how to propose and review policy changes. All contributions require ECA/DCO sign-off and follow the Eclipse Foundation project handbook.\n\n## License\nApache License 2.0. See `LICENSE.md`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-score%2Fscore_rust_policies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-score%2Fscore_rust_policies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-score%2Fscore_rust_policies/lists"}