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
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:

env:
BUN_VERSION: 1.3.14
HOOVERSION_VERSION: 1.1.0
HOOVERSION_VERSION: 1.1.1

jobs:
commitlint:
Expand All @@ -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 }}

Expand Down Expand Up @@ -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: ""
Expand All @@ -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 .
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ concurrency:

env:
BUN_VERSION: 1.3.14
HOOVERSION_VERSION: 1.1.0
HOOVERSION_VERSION: 1.1.1

jobs:
release:
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
19 changes: 17 additions & 2 deletions .hoolicy/vendor/repository/tests/cases.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand Down
22 changes: 22 additions & 0 deletions .hoolicy/vendor/repository/tests/snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
]
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions hoolicy.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
4 changes: 2 additions & 2 deletions hoolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Loading