001/* 002 * Sonar, open source software quality management tool. 003 * Copyright (C) 2008-2012 SonarSource 004 * mailto:contact AT sonarsource DOT com 005 * 006 * Sonar is free software; you can redistribute it and/or 007 * modify it under the terms of the GNU Lesser General Public 008 * License as published by the Free Software Foundation; either 009 * version 3 of the License, or (at your option) any later version. 010 * 011 * Sonar is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 014 * Lesser General Public License for more details. 015 * 016 * You should have received a copy of the GNU Lesser General Public 017 * License along with Sonar; if not, write to the Free Software 018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 019 */ 020package org.sonar.plugins.findbugs; 021 022import com.google.common.collect.ImmutableList; 023import org.sonar.api.CoreProperties; 024import org.sonar.api.Extension; 025import org.sonar.api.Properties; 026import org.sonar.api.Property; 027import org.sonar.api.PropertyType; 028import org.sonar.api.SonarPlugin; 029 030import java.util.List; 031 032@Properties({ 033 @Property( 034 key = CoreProperties.FINDBUGS_EFFORT_PROPERTY, 035 defaultValue = CoreProperties.FINDBUGS_EFFORT_DEFAULT_VALUE, 036 name = "Effort", 037 description = "Effort of the bug finders. Valid values are Min, Default and Max. Setting 'Max' increases precision but also increases " + 038 "memory consumption.", 039 project = true, 040 module = true, 041 global = true), 042 @Property( 043 key = CoreProperties.FINDBUGS_TIMEOUT_PROPERTY, 044 defaultValue = CoreProperties.FINDBUGS_TIMEOUT_DEFAULT_VALUE + "", 045 name = "Timeout", 046 description = "Specifies the amount of time, in milliseconds, that FindBugs may run before it is assumed to be hung and is terminated. " + 047 "The default is 600,000 milliseconds, which is ten minutes.", 048 project = true, 049 module = true, 050 global = true, 051 type = PropertyType.INTEGER), 052 @Property( 053 key = FindbugsConstants.EXCLUDES_FILTERS_PROPERTY, 054 name = "Excludes Filters", 055 description = "Paths to findbugs filter-files with exclusions (comma-separated).", 056 project = true, module = true, global = true)}) 057public class FindbugsPlugin extends SonarPlugin { 058 059 public List<Class<? extends Extension>> getExtensions() { 060 return ImmutableList.of( 061 FindbugsSensor.class, 062 FindbugsConfiguration.class, 063 FindbugsExecutor.class, 064 FindbugsRuleRepository.class, 065 FindbugsProfileExporter.class, 066 FindbugsProfileImporter.class, 067 SonarWayWithFindbugsProfile.class, 068 FindbugsMavenInitializer.class); 069 } 070}