Openzeppelin-contracts: Inconsistent punctuation use in comments

Created on 29 Mar 2019  路  3Comments  路  Source: OpenZeppelin/openzeppelin-contracts

There doesn't appear to be a standard when it comes to whether to have a periods in the comments above contract functions.

ERC721.sol

/**
  * @dev Gets the owner of the specified token ID
  * @param tokenId uint256 ID of the token to query the owner of
  * @return address currently marked as the owner of the given token ID
  */
/**
  * @dev Approves another address to transfer the given token ID
  * The zero address indicates there is no approved address.
  * There can only be one approved address per token at a given time.
  * Can only be called by the token owner or an approved operator.
  * @param to address to be approved for the given token ID
  * @param tokenId uint256 ID of the token to be approved
  */

ERC20.sol

/**
  * @dev Gets the balance of the specified address.
  * @param owner The address to query the balance of.
  * @return A uint256 representing the amount owned by the passed address.
  */
/**
  * @dev Transfer token to a specified address
  * @param to The address to transfer to.
  * @param value The amount to be transferred.
  */

I don't know why I noticed...

documentation

Most helpful comment

I don't mind doing it if I have time this afternoon.

All 3 comments

Thanks for spotting this!

All @dev documentation should have punctuation. I'm not sure about @param. We are planning to write a style guide for this soon, but this simple criteria should be enough for now if someone is interested in making a PR for it.

I don't mind doing it if I have time this afternoon.

We've updated all of the @dev comments (which now have consistent punctuation). A style guide is missing still (though to be fair it may be too early to write one).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xiaoyao1991 picture xiaoyao1991  路  3Comments

sanchaymittal picture sanchaymittal  路  4Comments

spalladino picture spalladino  路  4Comments

sebastien-kr picture sebastien-kr  路  4Comments

ryana picture ryana  路  4Comments