diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000..2d44537 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,32 @@ +# Bulk formatting and lint-fix commits — ignore in git blame +# See: https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view + +# style: cargo fmt +b2be7102fef2b42d7546ef66c8fd02f06b130bc4 +26d30b622dc4d17d160999f043e8be9985cea263 +8da4c4278a87ced1420fc6e7a9ea2c567e4e7b97 + +# style: apply rustfmt to registry handlers +8336166e0e541f213d0f3b20d55ea509bbb2f2d8 + +# style: fix formatting +a9125e6287e9f31fff0720e7c1c07cdc5e94c9db +bbdefff07cf588ad5f848bec9031f4e51cc47c41 +ac4020d34f72b08e1eb3dc0c4248128b1012ddb5 + +# Fix formatting +08eea07cfe05ac64e9d6d4a7f8314f269d834e9c +c7098a4aed2a880dff418abe48c5016ea5ac20e0 + +# Fix code formatting +0a97b00278c59a267c0fc7cdca7eb2bd7aa5decf + +# Fix clippy warnings +cf9feee5b2116e216cbcd6b0d3ae1fe5e93cf7d5 +2f86b4852a9c9a1a5691e8b48da8be3fb45f6d0c + +# fix: clippy let_and_return warning +dab3ee805edbd2e6fb3cffda9c9618468880153e + +# fix: resolve clippy warnings and format code +00fbd201127defee9c24a8edeb01eba3c053f306 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b4df748..f84daff 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,16 +1,14 @@ -## Summary +## What - + -## Changes +## Why - + ## Checklist -- [ ] passes -- [ ] passes -- [ ] passes -- [ ] No in production code -- [ ] New public API has documentation -- [ ] CHANGELOG updated (if user-facing change) +- [ ] Tests pass (`cargo test`) +- [ ] No new clippy warnings (`cargo clippy -- -D warnings`) +- [ ] Updated CHANGELOG.md (if user-facing change) +- [ ] New registry? See CONTRIBUTING.md checklist diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 6371e25..0000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,15 +0,0 @@ -## What does this PR do? - - - -## Related issue - - - -## Checklist - -- [ ] `cargo fmt` passes -- [ ] `cargo clippy` passes with no warnings -- [ ] `cargo test --lib --bin nora` passes -- [ ] New functionality includes tests -- [ ] CHANGELOG.md updated (if user-facing change) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2979a85..050085a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,13 @@ on: permissions: read-all jobs: + typos: + name: Typos + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: crate-ci/typos@02ea592e44b3a53c302f697cddca7641cd051c3d # v1.45.0 + test: name: Test runs-on: ubuntu-latest diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2b437c..f9d0220 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -107,16 +107,19 @@ All three must pass. CI will enforce this. - Run `cargo fmt` before committing - Fix all `cargo clippy` warnings +- No `unwrap()` in production code (use proper error handling) - Follow Rust naming conventions - Keep functions short and focused - Add tests for new functionality ## Pull Request Process -1. Update CHANGELOG.md if the change is user-facing -2. Add tests for new features or bug fixes -3. Ensure CI passes (fmt, clippy, test, security checks) -4. Keep PRs focused — one feature or fix per PR +1. Branch from `main`, use descriptive branch names (`feat/`, `fix/`, `chore/`) +2. Update CHANGELOG.md if the change is user-facing +3. Add tests for new features or bug fixes +4. Ensure CI passes (fmt, clippy, test, security checks) +5. Keep PRs focused — one feature or fix per PR +6. PRs are squash-merged to keep a clean history ## Commit Messages @@ -131,6 +134,20 @@ Use conventional commits: Example: `feat: add npm scoped package support` +## New Registry Checklist + +When adding a new registry type (Docker, npm, Maven, etc.), ensure all of the following: + +- [ ] Handler in `nora-registry/src/registry/` +- [ ] Health check endpoint +- [ ] Metrics (Prometheus) +- [ ] OpenAPI spec update +- [ ] Startup log line +- [ ] Dashboard UI tile +- [ ] Playwright e2e test +- [ ] CHANGELOG entry +- [ ] COMPAT.md update + ## Reporting Issues - Use GitHub Issues with the provided templates diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 0000000..9affa0a --- /dev/null +++ b/_typos.toml @@ -0,0 +1,10 @@ +[default.extend-words] +# HashiCorp is not a typo +Hashi = "Hashi" +# flate2 is a Rust crate for compression +flate = "flate" +# grep pattern fragment in lint script +validat = "validat" + +[files] +extend-exclude = ["vendor/", "*.lock", "target/", "fuzz/corpus/"]