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