Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(definitions): comments filtering #35

Merged
merged 2 commits into from
Feb 22, 2025
Merged

fix(definitions): comments filtering #35

merged 2 commits into from
Feb 22, 2025

Conversation

beeb
Copy link
Owner

@beeb beeb commented Feb 22, 2025

According to the rules implemented by solc, the only comments that constitute NatSpec are:

  • The last multiline doc-comment before a definition
  • The block of last contiguous single-line doc-comments before a definition
/// @dev This should be ignored
/**
  * @dev This should be ignored
  */
/// @notice  This is NatSpec
/// @param a This is NatSpec
function foo(uint256 a) internal { }

/// @dev This should be ignored

/// @notice  This is NatSpec
/// @param a This is NatSpec
function foo(uint256 a) internal { }

/**
 * @dev This should be ignored
 */
/**
 * @notice This is NatSpec
 * @param a This is NatSpec
 */
function foo(uint256 a) internal { }

@beeb beeb merged commit dc25919 into main Feb 22, 2025
12 checks passed
@beeb beeb deleted the filter-comments branch February 22, 2025 13:46
@beeb-release-plz beeb-release-plz bot mentioned this pull request Feb 22, 2025
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