How to use the solhint/lib/index.processStr function in solhint

To help you get started, we’ve selected a few solhint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github juanfranblanco / vscode-solidity / src / linter / solhint.ts View on Github external
public validate(filePath: string, documentText: string): Diagnostic[] {
        return linter
            .processStr(documentText, this.config.build())
            .messages
            .map(e => this.toDiagnostic(e));
    }
github titan-suite / ide-alpha / src / components / Lint.tsx View on Github external
const Linting: React.SFC = ({ contract }) => {
  const report = linter.processStr(contract, configAsJson)
  return (
    
      
        
          
            {report.errorCount} Errors {report.warningCount} Warnings
          
        
        
          {report.messages.map((curError: any, index: number) => (
            <pre style="{{">              {curError.message} on Line {curError.line} Column{' '}
              {curError.column}
            </pre>
          ))}

solhint

Solidity Code Linter

MIT
Latest version published 4 months ago

Package Health Score

69 / 100
Full package analysis

Popular solhint functions