OpenZeppelin / solidity-docgen

Documentation generator for Solidity projects
MIT License
441 stars 116 forks source link

Cannot generate docs from flattened file #261

Open mswezey23 opened 3 years ago

mswezey23 commented 3 years ago

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.`
frangio commented 3 years ago

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?