diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e4878e..c11f815 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ concurrency: env: BUN_VERSION: 1.3.14 - HOOVERSION_VERSION: 1.1.0 + HOOVERSION_VERSION: 1.1.1 jobs: commitlint: @@ -45,7 +45,7 @@ jobs: run: bun run check-readme-version - name: Lint commits - uses: openhoo/hooversion/actions/lint@f2186561c587b58c5ea08c74c15800cdd39eab42 # v1.1.0 + uses: openhoo/hooversion/actions/lint@ac503b23b9b36ebbf39ee6103713c81f1f18b64d # v1.1.1 with: version: ${{ env.HOOVERSION_VERSION }} @@ -184,14 +184,14 @@ jobs: ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Enforce Hoolicy policy - uses: openhoo/hoolicy/actions/check@5b8cfb4339ba84edf96f84ddd66e30f4e19e7a80 # v0.3.0 + uses: openhoo/hoolicy/actions/check@46529a99335938e7284f11099bf15f7e1800e6f5 # v0.3.1 with: - version: 0.3.0 + version: 0.3.1 - name: Scan with Hooray - uses: openhoo/hooray/actions/scan@5849431da3a3fb503053d2f89282519797082074 # v0.6.4 + uses: openhoo/hooray/actions/scan@f2b28d71398749142f4d9366b0427369f3af6e02 # v0.6.5 with: - version: 0.6.4 + version: 0.6.5 policy: hooray-policy.yaml format: table output: "" @@ -208,9 +208,9 @@ jobs: fail-on: none - name: Set up HooNeedsUpdates - uses: openhoo/hooneedsupdates/actions/setup@5f29337d0c39c47c691947aae0a201d2cfca8d64 # v0.3.0 + uses: openhoo/hooneedsupdates/actions/setup@ffd31b013dafcd772bb067a0eec76f739ecd76a3 # v0.3.1 with: - version: 0.3.0 + version: 0.3.1 - name: Audit dependency freshness run: hooneedsupdates scan --fail-on unresolved . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f2b0cfe..8718d10 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ concurrency: env: BUN_VERSION: 1.3.14 - HOOVERSION_VERSION: 1.1.0 + HOOVERSION_VERSION: 1.1.1 jobs: release: @@ -82,7 +82,7 @@ jobs: if: >- (steps.current.outputs.current == 'true' || steps.manual_current.outputs.current == 'true') && (github.event_name == 'workflow_dispatch' || !startsWith(github.event.workflow_run.head_commit.message, 'chore(release):')) - uses: openhoo/hooversion/actions/prepare-release@f2186561c587b58c5ea08c74c15800cdd39eab42 # v1.1.0 + uses: openhoo/hooversion/actions/prepare-release@ac503b23b9b36ebbf39ee6103713c81f1f18b64d # v1.1.1 with: version: ${{ env.HOOVERSION_VERSION }} github-token: ${{ secrets.GITHUB_TOKEN }} @@ -93,7 +93,7 @@ jobs: if: >- steps.current.outputs.current == 'true' && startsWith(github.event.workflow_run.head_commit.message, 'chore(release):') - uses: openhoo/hooversion/actions/release@f2186561c587b58c5ea08c74c15800cdd39eab42 # v1.1.0 + uses: openhoo/hooversion/actions/release@ac503b23b9b36ebbf39ee6103713c81f1f18b64d # v1.1.1 with: version: ${{ env.HOOVERSION_VERSION }} github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.hoolicy/vendor/repository/tests/cases.yaml b/.hoolicy/vendor/repository/tests/cases.yaml index ad31051..82d05ed 100644 --- a/.hoolicy/vendor/repository/tests/cases.yaml +++ b/.hoolicy/vendor/repository/tests/cases.yaml @@ -1,8 +1,8 @@ version: 1 parameters: - branch_pattern: '^(feat|fix|docs|ci)/[a-z0-9]+(?:-[a-z0-9]+)*$' + branch_pattern: '^((feat|fix|docs|ci)/[a-z0-9]+(?:-[a-z0-9]+)*|release/v[0-9]+\.[0-9]+\.[0-9]+)$' commit_pattern: '^(feat|fix|docs|ci|test): .+$' - merge_request_title_pattern: '^(Draft: )?(feat|fix|docs|ci): .+$' + merge_request_title_pattern: '^(Draft: )?(feat|fix|docs|ci|chore)(\([a-z0-9][a-z0-9-]*\))?!?: .+$' allowed_branches: [main, develop] merge_request_title_maximum: 100 cases: @@ -11,6 +11,21 @@ cases: outcome: pass branch: feat/add-policy mergeRequestTitle: 'Draft: feat: Add policy' + - name: generated semantic release branch passes + rule: repository.git-naming + outcome: pass + branch: release/v0.3.1 + mergeRequestTitle: 'chore(release): hoolicy 0.3.1' + - name: malformed release branch fails + rule: repository.git-naming + outcome: fail + branch: release/latest + mergeRequestTitle: 'chore(release): hoolicy latest' + expect: + - key: branch:release/latest + messageContains: branch + waived: false + hasFix: false - name: ad-hoc branch name fails rule: repository.git-naming outcome: fail diff --git a/.hoolicy/vendor/repository/tests/snapshot.json b/.hoolicy/vendor/repository/tests/snapshot.json index 749a91c..548dd07 100644 --- a/.hoolicy/vendor/repository/tests/snapshot.json +++ b/.hoolicy/vendor/repository/tests/snapshot.json @@ -24,6 +24,28 @@ "ruleId": "repository.git-naming", "outcome": "pass", "findings": [] + }, + { + "name": "generated semantic release branch passes", + "ruleId": "repository.git-naming", + "outcome": "pass", + "findings": [] + }, + { + "name": "malformed release branch fails", + "ruleId": "repository.git-naming", + "outcome": "fail", + "findings": [ + { + "ruleId": "repository.git-naming", + "severity": "error", + "message": "Git name does not follow the repository convention: branch \"release/latest\"", + "key": "branch:release/latest", + "fingerprint": "4e5007da8c094dab7ee2ad2dd1728c2a1e168658c514d78f7b6f334137bbd713", + "waived": false, + "hasFix": false + } + ] } ] } diff --git a/README.md b/README.md index 9eb340a..922fbef 100644 --- a/README.md +++ b/README.md @@ -477,7 +477,7 @@ The custom test verifier is in `tests/HooSharper.Analyzers.Tests/AnalyzerVerifie The BenchmarkDotNet project measures real Roslyn analyzer and code-fix execution. It creates deterministic compilations with 100 or 1,000 candidate groups and records both execution time and managed allocations. -Code-fix application benchmarks create a fresh Roslyn workspace, diagnostic, and action for every measured invocation. Their result therefore includes fixture analysis and action registration as well as action computation and application; registration-only benchmarks isolate `RegisterCodeFixesAsync`. +Benchmark methods report distinct timing scopes. `Registration` measures only `RegisterCodeFixesAsync` against a prepared fixture; `ComputeOperations` measures only code-action operation computation, with fixture creation, analysis, registration, and application outside the measured method; `ApplyOperations` measures only application, with fixture creation, analysis, registration, and operation computation outside the measured method. `DiscoverRegisterApply` measures the end-to-end fixture discovery, registration, operation computation, and application path. `DocumentFixAll` measures Fix All operation computation and application after fixture discovery, analysis, registration, and Fix All action creation in iteration setup. Registration-only timing therefore does not include analyzer discovery or fixture construction. List the available benchmarks: @@ -575,14 +575,14 @@ To preview a release without creating commits, tags, releases, or packages, run ```bash git clone https://github.com/openhoo/hooversion.git /tmp/hooversion -git -C /tmp/hooversion checkout f2186561c587b58c5ea08c74c15800cdd39eab42 +git -C /tmp/hooversion checkout ac503b23b9b36ebbf39ee6103713c81f1f18b64d (cd /tmp/hooversion && go build -o /tmp/hooversion-bin ./cmd/hooversion) /tmp/hooversion-bin plan /tmp/hooversion-bin release --dry-run ``` The Hooversion action and installation source are pinned to the audited -`v1.1.0` commit. Update its immutable SHA and matching version input +`v1.1.1` commit. Update its immutable SHA and matching version input deliberately in both workflows when upgrading Hooversion. ## Contributing a rule diff --git a/hoolicy.lock b/hoolicy.lock index dfe366a..ca4d4c9 100644 --- a/hoolicy.lock +++ b/hoolicy.lock @@ -4,10 +4,10 @@ { "name": "repository", "git": "https://github.com/openhoo/hoolicy.git", - "ref": "v0.3.0", + "ref": "v0.3.1", "subdir": "packs/repository", - "commit": "5b8cfb4339ba84edf96f84ddd66e30f4e19e7a80", - "digest": "sha256:63f24e36e20a45fbf10d07404a870367d2b437267a1a14c703109013b386eba1", + "commit": "46529a99335938e7284f11099bf15f7e1800e6f5", + "digest": "sha256:b09429c7f194edefe4320215e587c2e565f325241c573551bd8f9c5d0bf0dc43", "vendor": ".hoolicy/vendor/repository", "release": "0.1.0" } diff --git a/hoolicy.yaml b/hoolicy.yaml index 637287d..f171501 100644 --- a/hoolicy.yaml +++ b/hoolicy.yaml @@ -11,10 +11,10 @@ budgets: packs: - name: repository git: https://github.com/openhoo/hoolicy.git - ref: v0.3.0 + ref: v0.3.1 subdir: packs/repository with: - branch_pattern: '^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)/[a-z0-9]+(?:-[a-z0-9]+)*$' + branch_pattern: '^((feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)/[a-z0-9]+(?:-[a-z0-9]+)*|release/v[0-9]+\.[0-9]+\.[0-9]+)$' commit_pattern: '^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\([a-z0-9][a-z0-9-]*\))?!?: .+$' merge_request_title_pattern: '^(Draft: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\([a-z0-9][a-z0-9-]*\))?!?: .+$' allowed_branches: [main]