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 */ 020 package org.sonar.plugins.findbugs; 021 022 import org.sonar.api.*; 023 import org.sonar.api.PropertyType; 024 025 import java.util.ArrayList; 026 import java.util.List; 027 028 @Properties({ 029 @Property( 030 key = CoreProperties.FINDBUGS_EFFORT_PROPERTY, 031 defaultValue = CoreProperties.FINDBUGS_EFFORT_DEFAULT_VALUE, 032 name = "Effort", 033 description = "Effort of the bug finders. Valid values are Min, Default and Max. Setting 'Max' increases precision but also increases " + 034 "memory consumption.", 035 project = true, 036 module = true, 037 global = true), 038 @Property( 039 key = CoreProperties.FINDBUGS_TIMEOUT_PROPERTY, 040 defaultValue = CoreProperties.FINDBUGS_TIMEOUT_DEFAULT_VALUE + "", 041 name = "Timeout", 042 description = "Specifies the amount of time, in milliseconds, that FindBugs may run before it is assumed to be hung and is terminated. " + 043 "The default is 600,000 milliseconds, which is ten minutes.", 044 project = true, 045 module = true, 046 global = true, 047 type = PropertyType.INTEGER), 048 @Property( 049 key = FindbugsConstants.EXCLUDES_FILTERS_PROPERTY, 050 name = "Excludes Filters", 051 description = "Paths to findbugs filter-files with exclusions (comma-separated).", 052 project = true, module = true, global = true)}) 053 public class FindbugsPlugin extends SonarPlugin { 054 055 public List<Class<? extends Extension>> getExtensions() { 056 List<Class<? extends Extension>> list = new ArrayList<Class<? extends Extension>>(); 057 list.add(FindbugsSensor.class); 058 list.add(FindbugsConfiguration.class); 059 list.add(FindbugsExecutor.class); 060 list.add(FindbugsRuleRepository.class); 061 list.add(FindbugsProfileExporter.class); 062 list.add(FindbugsProfileImporter.class); 063 list.add(SonarWayWithFindbugsProfile.class); 064 list.add(FindbugsMavenInitializer.class); 065 return list; 066 } 067 }