|
|
|
@ -16,12 +16,9 @@ import org.sonar.api.batch.rule.Checks; |
|
|
|
|
import org.sonar.api.batch.sensor.Sensor; |
|
|
|
|
import org.sonar.api.batch.sensor.SensorContext; |
|
|
|
|
import org.sonar.api.batch.sensor.SensorDescriptor; |
|
|
|
|
import org.sonar.api.utils.log.Logger; |
|
|
|
|
import org.sonar.api.utils.log.Loggers; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class ConfigFileSquidSensor implements Sensor { |
|
|
|
|
private final Logger LOG = Loggers.get(ConfigFileSquidSensor.class); |
|
|
|
|
private final Checks<ConfigCheck> checks; |
|
|
|
|
|
|
|
|
|
private SensorContext context; |
|
|
|
@ -42,7 +39,6 @@ public class ConfigFileSquidSensor implements Sensor { |
|
|
|
|
@Override |
|
|
|
|
public void execute(SensorContext context) { |
|
|
|
|
FilePredicates p = context.fileSystem().predicates(); |
|
|
|
|
LOG.info("ConfigFileSquidSensor FileSystem class is: {}", context.fileSystem().getClass().getName()); |
|
|
|
|
for (InputFile inputFile : context.fileSystem().inputFiles(p.hasLanguages(ConfigurationFileLanguage.KEY))) { |
|
|
|
|
checks.all().forEach(check -> { |
|
|
|
|
check.execute(context, inputFile, checks.ruleKey(check)); |
|
|
|
|