// Path: src/main/java/com/pablissimo/sonar/model/TsLintIssue.java
// public class TsLintIssue {
//     private String name;
//     private TsLintPosition startPosition;
//     private TsLintPosition endPosition;
//     private String failure;
//     private String ruleName;
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public TsLintPosition getStartPosition() {
//         return startPosition;
//     }
// 
//     public void setStartPosition(TsLintPosition startPosition) {
//         this.startPosition = startPosition;
//     }
// 
//     public TsLintPosition getEndPosition() {
//         return endPosition;
//     }
// 
//     public void setEndPosition(TsLintPosition endPosition) {
//         this.endPosition = endPosition;
//     }
// 
//     public String getFailure() {
//         return failure;
//     }
// 
//     public void setFailure(String failure) {
//         this.failure = failure;
//     }
// 
//     public String getRuleName() {
//         return ruleName;
//     }
// 
//     public void setRuleName(String ruleName) {
//         this.ruleName = ruleName;
//     }
// }


import com.pablissimo.sonar.model.TsLintIssue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.batch.fs.FileSystem;
import org.sonar.api.batch.rule.ActiveRule;
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.batch.sensor.issue.NewIssue;
import org.sonar.api.batch.sensor.issue.NewIssueLocation;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.config.Settings;
import org.sonar.api.rule.RuleKey;
import java.io.File;
import java.io.IOException;
import java.util.*;
            } else {
                if (config.getConfigFile() == null && config.getPathToTsConfig() == null) {
                    LOG.warn("Path to tslint.json and tsconfig.json configuration files either not defined or not found - at least one is required. Skipping tslint analysis.");
                    return;
                }
            }
        }

        boolean skipTypeDefFiles = settings.getBoolean(TypeScriptPlugin.SETTING_EXCLUDE_TYPE_DEFINITION_FILES);

        Collection<ActiveRule> allRules = ctx.activeRules().findByRepository(TsRulesDefinition.REPOSITORY_NAME);
        HashSet<String> ruleNames = new HashSet<>();
        for (ActiveRule rule : allRules) {
            ruleNames.add(rule.ruleKey().rule());
        }

        FileSystem fs = ctx.fileSystem();
        List<String> paths = new ArrayList<>();

        for (InputFile file : fs.inputFiles(fs.predicates().hasLanguage(TypeScriptLanguage.LANGUAGE_KEY))) {
            if (shouldSkipFile(file.file(), skipTypeDefFiles)) {
                continue;
            }

            String pathAdjusted = file.absolutePath();
            paths.add(pathAdjusted);
        }

        List<String> jsonResults = this.executor.execute(config, paths);

// Path: src/main/java/com/pablissimo/sonar/model/TsLintIssue.java
// public class TsLintIssue {
//     private String name;
//     private TsLintPosition startPosition;
//     private TsLintPosition endPosition;
//     private String failure;
//     private String ruleName;
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public TsLintPosition getStartPosition() {
//         return startPosition;
//     }
// 
//     public void setStartPosition(TsLintPosition startPosition) {
//         this.startPosition = startPosition;
//     }
// 
//     public TsLintPosition getEndPosition() {
//         return endPosition;
//     }
// 
//     public void setEndPosition(TsLintPosition endPosition) {
//         this.endPosition = endPosition;
//     }
// 
//     public String getFailure() {
//         return failure;
//     }
// 
//     public void setFailure(String failure) {
//         this.failure = failure;
//     }
// 
//     public String getRuleName() {
//         return ruleName;
//     }
// 
//     public void setRuleName(String ruleName) {
//         this.ruleName = ruleName;
//     }
// }


// Path: src/main/java/com/pablissimo/sonar/TsLintSensor.java
import com.pablissimo.sonar.model.TsLintIssue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.batch.fs.FileSystem;
import org.sonar.api.batch.rule.ActiveRule;
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.batch.sensor.issue.NewIssue;
import org.sonar.api.batch.sensor.issue.NewIssueLocation;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.config.Settings;
import org.sonar.api.rule.RuleKey;
import java.io.File;
import java.io.IOException;
import java.util.*;

            } else {
                if (config.getConfigFile() == null && config.getPathToTsConfig() == null) {
                    LOG.warn("Path to tslint.json and tsconfig.json configuration files either not defined or not found - at least one is required. Skipping tslint analysis.");
                    return;
                }
            }
        }

        boolean skipTypeDefFiles = settings.getBoolean(TypeScriptPlugin.SETTING_EXCLUDE_TYPE_DEFINITION_FILES);

        Collection<ActiveRule> allRules = ctx.activeRules().findByRepository(TsRulesDefinition.REPOSITORY_NAME);
        HashSet<String> ruleNames = new HashSet<>();
        for (ActiveRule rule : allRules) {
            ruleNames.add(rule.ruleKey().rule());
        }

        FileSystem fs = ctx.fileSystem();
        List<String> paths = new ArrayList<>();

        for (InputFile file : fs.inputFiles(fs.predicates().hasLanguage(TypeScriptLanguage.LANGUAGE_KEY))) {
            if (shouldSkipFile(file.file(), skipTypeDefFiles)) {
                continue;
            }

            String pathAdjusted = file.absolutePath();
            paths.add(pathAdjusted);
        }

        List<String> jsonResults = this.executor.execute(config, paths);

        Map<String, List<TsLintIssue>> issues = this.parser.parse(jsonResults);