@titan-suite/cli
Version:
The complete smart contract development tool
22 lines (21 loc) • 790 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const command_1 = require("@oclif/command");
const child_process_1 = require("child_process");
class Lint extends command_1.Command {
run() {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const { args } = this.parse(Lint);
const solhint = require('solhint');
child_process_1.spawn(`${solhint}`, [args.file], { stdio: 'inherit', cwd: process.cwd() });
});
}
}
Lint.description = 'Find issues and errors in a Solidity contract';
Lint.examples = ['$ titan lint <path/to/Example.sol>'];
Lint.flags = {
help: command_1.flags.help({ char: 'h' })
};
Lint.args = [{ name: 'file' }];
exports.default = Lint;