Socket
Socket
Sign inDemoInstall

solhint

Package Overview
Dependencies
Maintainers
4
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solhint - npm Package Compare versions

Comparing version 3.0.0-rc.7 to 3.0.0-rc.8

2

docs/writing-plugins.md

@@ -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}`

4

package.json
{
"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(

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc