Skip to content

Allow unassigned EIP number placeholder - #174

Open
JRVector9 wants to merge 3 commits into
ethereum:masterfrom
JRVector9:fix/eip-to-be-assigned-placeholder
Open

Allow unassigned EIP number placeholder#174
JRVector9 wants to merge 3 commits into
ethereum:masterfrom
JRVector9:fix/eip-to-be-assigned-placeholder

Conversation

@JRVector9

@JRVector9 JRVector9 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #13.

This keeps the unassigned-number placeholder in the default lint config. preamble-eip now reports <to be assigned> with a placeholder-specific message, while generic Uint validation still treats non-numeric values as invalid.

Checked:

  • cargo fmt --check
  • cargo check --all-features --locked
  • cargo test -p eipw-lint --features tokio
  • cargo test --workspace
  • cargo run -p eipw --quiet -- eipw-lint/tests/eipv/preamble-eip-placeholder/input.md returns one preamble-eip error for the placeholder
  • git diff --check

Comment thread eipw-lint/src/lints/preamble/uint.rs Outdated
Comment on lines +33 to +35
if self.0.as_ref() == "eip" && field.value().trim() == "<to be assigned>" {
return Ok(());
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dislike hardcoding specifics directly into the code. If we, for example, rename the field to number: or want to change the placeholder, we'd have to release a new version instead of just updating the config file.

That said, I don't think we can just return Ok(()) here, can we? We need at least one error to prevent eipw from exiting with success. Unless there's another lint that catches this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I changed this so the placeholder is configured on preamble-eip instead of hardcoded in Uint.

<to be assigned> still emits one preamble-eip error, so eipw exits unsuccessfully for that file. The configured message only replaces the generic unsigned-integer wording for that value.

I also added an eipv fixture for the default config path and reran the workspace tests.

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.

Change preamble-eip & preamble-file-name to be less annoying before an EIP number is assigned

3 participants