|
|
|
@ -5,7 +5,7 @@ const profile = { |
|
|
|
|
name: 'solhint', |
|
|
|
|
displayName: 'solhint', |
|
|
|
|
description: 'lint solidity files', |
|
|
|
|
methods: ['lint'] |
|
|
|
|
methods: ['lint', 'createConfigFile'] |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
type Report = {
|
|
|
|
@ -22,6 +22,10 @@ export class Solhint extends Plugin { |
|
|
|
|
super(profile); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async createConfigFile () { |
|
|
|
|
await this.call('fileManager', 'writeFile', '.solhint.json', config) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async lint(fileName: string) { |
|
|
|
|
const content = await this.call('fileManager', 'readFile', fileName) |
|
|
|
|
const reporters = processStr(content, { |
|
|
|
|