Comparing version 3.0.0-rc.7 to 3.0.0-rc.8
@@ -48,2 +48,4 @@ # Writing plugins | ||
} | ||
module.exports = [NoFoosAllowed] | ||
``` | ||
@@ -50,0 +52,0 @@ |
@@ -60,4 +60,23 @@ const chalk = require('chalk') | ||
function loadPlugin(pluginName, { reporter, config, inputSrc, fileName }) { | ||
const plugins = require(`solhint-plugin-${pluginName}`) | ||
let plugins | ||
try { | ||
plugins = require(`solhint-plugin-${pluginName}`) | ||
} catch (e) { | ||
console.error( | ||
chalk.red( | ||
`[solhint] Error: Could not load solhint-plugin-${pluginName}, make sure it's installed..` | ||
) | ||
) | ||
process.exit(1) | ||
} | ||
if (!Array.isArray(plugins)) { | ||
console.warn( | ||
chalk.yellow( | ||
`[solhint] Warning: Plugin solhint-plugin-${pluginName} doesn't export an array of rules. Ignoring it.` | ||
) | ||
) | ||
return [] | ||
} | ||
return plugins.map(Plugin => new Plugin(reporter, config, inputSrc, fileName)).map(plugin => { | ||
@@ -64,0 +83,0 @@ plugin.ruleId = `${pluginName}/${plugin.ruleId}` |
{ | ||
"name": "solhint", | ||
"version": "3.0.0-rc.7", | ||
"version": "3.0.0-rc.8", | ||
"description": "Solidity Code Linter", | ||
@@ -32,3 +32,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@solidity-parser/parser": "^0.5.2", | ||
"@solidity-parser/parser": "^0.6.0", | ||
"ajv": "^6.6.1", | ||
@@ -35,0 +35,0 @@ "antlr4": "4.7.1", |
@@ -29,2 +29,4 @@ const { assertNoWarnings, assertErrorMessage, assertWarnsCount } = require('./../../common/asserts') | ||
contractWith('function a(uint a, uint c) public returns (uint c);'), | ||
contractWith('function a(uint amount) public { foo.deposit{value: amount}(); }'), | ||
contractWith('function a(uint amount) public { foo.deposit({value: amount}); }'), | ||
contractWith( | ||
@@ -31,0 +33,0 @@ multiLine( |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
1393549
28127
+ Added@solidity-parser/parser@0.6.2(transitive)
- Removed@solidity-parser/parser@0.5.2(transitive)