Search in sources :

Example 1 with File

use of org.sonar.api.resources.File in project sonarqube by SonarSource.

the class AbstractDeprecatedXooRuleSensor method doAnalyse.

private void doAnalyse(SensorContext context, String languageKey) {
    RuleKey ruleKey = RuleKey.of(XooRulesDefinition.XOO_REPOSITORY, getRuleKey());
    if (activeRules.find(ruleKey) == null) {
        return;
    }
    for (InputFile inputFile : fs.inputFiles(fs.predicates().hasLanguage(languageKey))) {
        File sonarFile = File.create(inputFile.relativePath());
        sonarFile = context.getResource(sonarFile);
        processFile(inputFile, sonarFile, context, ruleKey, languageKey);
    }
}
Also used : RuleKey(org.sonar.api.rule.RuleKey) InputFile(org.sonar.api.batch.fs.InputFile) File(org.sonar.api.resources.File) InputFile(org.sonar.api.batch.fs.InputFile)

Aggregations

InputFile (org.sonar.api.batch.fs.InputFile)1 File (org.sonar.api.resources.File)1 RuleKey (org.sonar.api.rule.RuleKey)1