solidity-docgen icon indicating copy to clipboard operation
solidity-docgen copied to clipboard

Cannot generate docs from flattened file

Open mswezey23 opened this issue 4 years ago • 1 comments

Steps to reproduce:

  1. flatten: npx truffle-flattener ./contracts/WrappedShift.sol >> ./build/flattened/WrappedShift.sol
  2. generate docs: npx solidity-docgen -i ./build/flattened/

Error:

    Error: Solidity was unable to compile. build/flattened/WrappedShift.sol: ParserError: Multiple SPDX license identifiers found in source file. Use "AND" or "OR" to combine multiple 
    licenses. Please see https://spdx.org for more information.`

mswezey23 avatar Dec 03 '20 19:12 mswezey23

This is a Solidity error, unrelated to solidity-docgen. You may be able to work around the error using a Solidity version earlier than 0.6.8, following steps like those in the readme.

That said, why are you using a flattened contract as the input?

frangio avatar Dec 04 '20 01:12 frangio