Consensys / vscode-solidity-auditor

Solidity language support and visual security auditor for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=tintinweb.solidity-visual-auditor
GNU General Public License v3.0
572 stars 60 forks source link

Map truffle style dependencies #2

Closed shayanb closed 5 years ago

shayanb commented 5 years ago

It is possible to import contracts using @ which truffle pulls using npm install. However these contracts will be installed in npm-modules which truffle maps to the contract folder.

In this scenario, it is not possible to jump/see the definition of imported functions.

e.g. import "@ensdomains/ens/contracts/ENS.sol"; in https://github.com/ensdomains/ethregistrar/blob/master/contracts/BaseRegistrarImplementation.sol

tintinweb commented 5 years ago

Hey @shayanb, I've recently added some hacky magic to figure out import paths (see https://github.com/tintinweb/vscode-solidity-auditor/blob/master/src/extension.js#L52). it is already released. does this fix the issue for you

cheers, tin

shayanb commented 5 years ago

Seems like this bug as it was mentioned above is fixed, however still does not jump to declaration possibly due to https://github.com/tintinweb/vscode-solidity-auditor/issues/5