public WebSensor(Web web, RulesProfile profile, NoSonarFilter noSonarFilter, ModuleFileSystem fileSystem, FileLinesContextFactory fileLinesContextFactory) { this.web = web; this.noSonarFilter = noSonarFilter; this.annotationCheckFactory = AnnotationCheckFactory.create(profile, WebRulesRepository.REPOSITORY_KEY, CheckClasses.getCheckClasses()); this.fileSystem = fileSystem; this.fileLinesContextFactory = fileLinesContextFactory; }
public ObjectiveCSquidSensor(RulesProfile profile) { this.annotationCheckFactory = AnnotationCheckFactory.create(profile, CheckList.REPOSITORY_KEY, CheckList.getChecks()); }
public XmlSensor(RulesProfile profile, ModuleFileSystem fileSystem, ResourcePerspectives resourcePerspectives) { this.annotationCheckFactory = AnnotationCheckFactory.create(profile, CheckRepository.REPOSITORY_KEY, CheckRepository.getCheckClasses()); this.fileSystem = fileSystem; this.resourcePerspectives = resourcePerspectives; }
public CSharpSquidSensor(CSharp cSharp, CSharpResourcesBridge cSharpResourcesBridge, ResourceCreationLock resourceCreationLock, MicrosoftWindowsEnvironment microsoftWindowsEnvironment, RulesProfile profile, NoSonarFilter noSonarFilter, FileLinesContextFactory fileLinesContextFactory, CSharpCheck[] cSharpChecks) { super(microsoftWindowsEnvironment); this.cSharp = cSharp; this.cSharpResourcesBridge = cSharpResourcesBridge; this.resourceCreationLock = resourceCreationLock; this.noSonarFilter = noSonarFilter; this.fileLinesContextFactory = fileLinesContextFactory; Collection<Class> allChecks = CSharpCheck.toCollection(cSharpChecks); allChecks.addAll(CheckList.getChecks()); this.annotationCheckFactory = AnnotationCheckFactory.create(profile, CSharpSquidConstants.REPOSITORY_KEY, allChecks); }
@Override public boolean shouldExecuteOnProject(Project project) { boolean hasLangFiles = !fs.mainFiles(language).isEmpty() || !fs.testFiles(language).isEmpty(); if (hasLangFiles) { checkFactory = AnnotationCheckFactory.create(qProfile, DefaultCommonRulesRepository.keyForLanguage(language), CommonRulesConstants.CLASSES); activeChecks = checkFactory.getChecks(); } return !activeChecks.isEmpty(); }