All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.jball.sonar.hybris.java.RulesList Maven / Gradle / Ivy

There is a newer version: 0.7.0
Show newest version
/*
 * SonarQube Java Custom Rules Example
 * Copyright (C) 2016-2016 SonarSource SA
 * mailto:contact AT sonarsource DOT com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
package de.jball.sonar.hybris.java;

import de.jball.sonar.hybris.java.checks.AvoidJalo;
import de.jball.sonar.hybris.java.checks.ModelConstructor;
import de.jball.sonar.hybris.java.checks.ModelServiceSaveAll;
import org.sonar.plugins.java.api.JavaCheck;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public final class RulesList {
	private RulesList() {
	}

	public static List> getChecks() {
		List> checks = new ArrayList<>();
		checks.addAll(getJavaChecks());
		checks.addAll(getJavaTestChecks());
		return Collections.unmodifiableList(checks);
	}

	public static List> getJavaChecks() {
		return Collections.unmodifiableList(Arrays.asList(
				ModelConstructor.class,
				ModelServiceSaveAll.class,
				AvoidJalo.class));
	}

	public static List> getJavaTestChecks() {
		return Collections.emptyList();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy