@Test public void test_description() { DefaultSensorDescriptor descriptor = new DefaultSensorDescriptor(); ActiveRules activeRules = new ActiveRulesBuilder().build(); CheckFactory checkFactory = new CheckFactory(activeRules); SoliditySensor sensor = new SoliditySensor(checkFactory, createFileLinesContextFactory()); sensor.describe(descriptor); assertThat(descriptor.name()).isEqualTo("SonarSolidity"); assertThat(descriptor.languages()).containsOnly("solidity"); }
@Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(Solidity.KEY) .name("SonarSolidity") .onlyOnFileType(Type.MAIN); }
SoliditySensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(Solidity.KEY) .name("SonarSolidity") .onlyOnFileType(Type.MAIN); } }
SoliditySensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(Solidity.KEY) .name("SonarSolidity") .onlyOnFileType(Type.MAIN); } SoliditySensor(CheckFactory checkFactory, FileLinesContextFactory fileLinesContextFactory); }
SoliditySensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(Solidity.KEY) .name("SonarSolidity") .onlyOnFileType(Type.MAIN); } SoliditySensor(CheckFactory checkFactory, FileLinesContextFactory fileLinesContextFactory); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); void analyzeFiles(SensorContext context, List<InputFile> files); NewHighlighting getSyntaxHighlighting(SolidityParsingPhase parser, SensorContext context, InputFile inputFile); }
SoliditySensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(Solidity.KEY) .name("SonarSolidity") .onlyOnFileType(Type.MAIN); } SoliditySensor(CheckFactory checkFactory, FileLinesContextFactory fileLinesContextFactory); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); void analyzeFiles(SensorContext context, List<InputFile> files); NewHighlighting getSyntaxHighlighting(SolidityParsingPhase parser, SensorContext context, InputFile inputFile); static final Version SQ_VERSION; static final ImmutableList<String> KEYWORDS; static final ImmutableList<String> KEYWORD_TYPES; }