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

Error: Item does not contain return parameters should point to source line #420

Open
mwawrusch opened this issue Nov 13, 2022 · 3 comments

Comments

@mwawrusch
Copy link

The following is an output from running docgen. Would be helpful to have information which line and source filed casued it.

Error: Item does not contain return parameters

    at parseNatspec (/Users/martinwawrusch/Dev/roji/smartcontracts/roji-smartcontracts-evm-nfts/node_modules/solidity-docgen/src/utils/natspec.ts:71:15)
    at natspec (/Users/martinwawrusch/Dev/roji/smartcontracts/roji-smartcontracts-evm-nfts/node_modules/solidity-docgen/src/common/properties.ts:18:22)
    at /Users/martinwawrusch/Dev/roji/smartcontracts/roji-smartcontracts-evm-nfts/node_modules/solidity-docgen/src/site.ts:115:51
    at Object.get [as natspec] (/Users/martinwawrusch/Dev/roji/smartcontracts/roji-smartcontracts-evm-nfts/node_modules/solidity-docgen/src/utils/memoized-getter.ts:17:19)
    at lookupProperty (/Users/martinwawrusch/Dev/roji/smartcontracts/roji-smartcontracts-evm-nfts/node_modules/handlebars/lib/handlebars/runtime.js:130:26)
    at Object.eval (eval at createFunctionContext (/Users/martinwawrusch/Dev/roji/smartcontracts/roji-smartcontracts-evm-nfts/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js:265:23), <anonymous>:16:64)
    at main (/Users/martinwawrusch/Dev/roji/smartcontracts/roji-smartcontracts-evm-nfts/node_modules/handlebars/lib/handlebars/runtime.js:230:22)
    at ret (/Users/martinwawrusch/Dev/roji/smartcontracts/roji-smartcontracts-evm-nfts/node_modules/handlebars/lib/handlebars/runtime.js:250:12)
    at ret (/Users/martinwawrusch/Dev/roji/smartcontracts/roji-smartcontracts-evm-nfts/node_modules/handlebars/lib/handlebars/compiler/compiler.js:548:21)
    at /Users/martinwawrusch/Dev/roji/smartcontracts/roji-smartcontracts-evm-nfts/node_modules/solidity-docgen/src/render.ts:74:14
    ```
@frangio
Copy link
Contributor

frangio commented Nov 15, 2022

I added source location in the error message in the latest version, but I haven't been able to test it because these errors are supposed to be unreachable. 🙂

Please try it now and let me know what piece of code is causing it.

@frangio frangio closed this as completed Nov 15, 2022
@frangio frangio reopened this Nov 15, 2022
@frangio
Copy link
Contributor

frangio commented Dec 29, 2022

Closing for lack of follow up.

@frangio frangio closed this as completed Dec 29, 2022
@DenkevichOleg
Copy link

DenkevichOleg commented Sep 9, 2024

piece of code that causing it (any public variable):

pragma solidity 0.8.23;

contract Test {
  /// @notice Shows the address where protocol fee are received
  /// @dev variable. changing in setFeeDestination()
  /// @return Address where protocol fee are received
  address public protocolFeeDestination;
}

Error:
ItemError: Item does not contain return parameters (contracts/Test.sol:7)

even if put /// @return to public variables description is not good idea (or it is good?) - some contracts are already deployed with that. so should it cause error?

@frangio frangio reopened this Sep 9, 2024
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

No branches or pull requests

3 participants