Skip to content

Annotate NIF-boundary arity for Credo#7

Merged
f0rest8 merged 1 commit into
mainfrom
credo-arity-annotation
Jul 10, 2026
Merged

Annotate NIF-boundary arity for Credo#7
f0rest8 merged 1 commit into
mainfrom
credo-arity-annotation

Conversation

@f0rest8

@f0rest8 f0rest8 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Silences the sole Credo refactoring finding (Credo.Check.Refactor.FunctionArity, arity 12 > max 8) on MetamorphicLog.Native.nif_signed_policy_sign.

The stub mirrors the Rust #[rustler::nif] signature one-to-one, and the ergonomic public API (MetamorphicLog.Policy.sign/2, keyword list) already hides it. Grouping the fields into a struct would only move the fan-out into a NIF decoder without improving any caller, so the check is waived inline (in-source annotation — no added dependency) for this private, @moduledoc false binding stub.

Lands ahead of the v0.1.6 tag. Part of board task #55 (Step D).

nif_signed_policy_sign mirrors the Rust #[rustler::nif] signature 1:1
(arity 12). The ergonomic public API is Policy.sign/2 (keyword list);
grouping the fields into a struct would only move the fan-out into a NIF
decoder. Waive Credo.Check.Refactor.FunctionArity inline for this private,
@moduledoc false binding stub.
@f0rest8
f0rest8 merged commit f17d48c into main Jul 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant