Merge pull request #301 from bsinno/add_sonar_exclusions
Add sonar exclusions
This commit is contained in:
@@ -296,7 +296,7 @@ public final class DashboardMenu extends CustomComponent {
|
|||||||
final Optional<DashboardMenuItem> findFirst = dashboardVaadinViews.stream()
|
final Optional<DashboardMenuItem> findFirst = dashboardVaadinViews.stream()
|
||||||
.filter(view -> view.getViewName().equals(viewName)).findFirst();
|
.filter(view -> view.getViewName().equals(viewName)).findFirst();
|
||||||
|
|
||||||
if (findFirst == null || !findFirst.isPresent()) {
|
if (!findFirst.isPresent()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ import org.eclipse.hawkbit.ui.rollout.event.RolloutEvent;
|
|||||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||||
import org.eclipse.hawkbit.ui.utils.SPDateTimeUtil;
|
import org.eclipse.hawkbit.ui.utils.SPDateTimeUtil;
|
||||||
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
|
|
||||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||||
import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
|
import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
|
||||||
|
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
|
||||||
import org.eclipse.hawkbit.ui.utils.UINotification;
|
import org.eclipse.hawkbit.ui.utils.UINotification;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.vaadin.addons.lazyquerycontainer.BeanQueryFactory;
|
import org.vaadin.addons.lazyquerycontainer.BeanQueryFactory;
|
||||||
@@ -610,26 +610,15 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void validate(final Object value) {
|
public void validate(final Object value) {
|
||||||
try {
|
if (isNoOfGroupsOrTargetFilterEmpty()) {
|
||||||
if (isNoOfGroupsOrTargetFilterEmpty()) {
|
uiNotification.displayValidationError(i18n.get("message.rollout.noofgroups.or.targetfilter.missing"));
|
||||||
uiNotification
|
} else {
|
||||||
.displayValidationError(i18n.get("message.rollout.noofgroups.or.targetfilter.missing"));
|
if (value != null) {
|
||||||
} else {
|
final int groupSize = getGroupSize();
|
||||||
if (value != null) {
|
new IntegerRangeValidator(i18n.get(MESSAGE_ROLLOUT_FIELD_VALUE_RANGE, 0, groupSize), 0, groupSize)
|
||||||
final int groupSize = getGroupSize();
|
.validate(Integer.valueOf(value.toString()));
|
||||||
new IntegerRangeValidator(i18n.get(MESSAGE_ROLLOUT_FIELD_VALUE_RANGE, 0, groupSize), 0,
|
|
||||||
groupSize).validate(Integer.valueOf(value.toString()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// suppress the need of preserve original exception, will blow
|
|
||||||
// up the
|
|
||||||
// log and not necessary here
|
|
||||||
catch (final InvalidValueException ex) {
|
|
||||||
// we have to throw the exception here, otherwise the UI won't
|
|
||||||
// show the vaadin validation error!
|
|
||||||
throw ex;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isNoOfGroupsOrTargetFilterEmpty() {
|
private boolean isNoOfGroupsOrTargetFilterEmpty() {
|
||||||
@@ -648,19 +637,9 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void validate(final Object value) {
|
public void validate(final Object value) {
|
||||||
try {
|
if (value != null) {
|
||||||
if (value != null) {
|
new IntegerRangeValidator(i18n.get(MESSAGE_ROLLOUT_FIELD_VALUE_RANGE, 0, 100), 0, 100)
|
||||||
new IntegerRangeValidator(i18n.get(MESSAGE_ROLLOUT_FIELD_VALUE_RANGE, 0, 100), 0, 100)
|
.validate(Integer.valueOf(value.toString()));
|
||||||
.validate(Integer.valueOf(value.toString()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// suppress the need of preserve original exception, will blow
|
|
||||||
// up the
|
|
||||||
// log and not necessary here
|
|
||||||
catch (final InvalidValueException ex) {
|
|
||||||
// we have to throw the exception here, otherwise the UI won't
|
|
||||||
// show the vaadin validation error!
|
|
||||||
throw ex;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -670,19 +649,9 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void validate(final Object value) {
|
public void validate(final Object value) {
|
||||||
try {
|
if (value != null) {
|
||||||
if (value != null) {
|
new IntegerRangeValidator(i18n.get(MESSAGE_ROLLOUT_FIELD_VALUE_RANGE, 0, 500), 0, 500)
|
||||||
new IntegerRangeValidator(i18n.get(MESSAGE_ROLLOUT_FIELD_VALUE_RANGE, 0, 500), 0, 500)
|
.validate(Integer.valueOf(value.toString()));
|
||||||
.validate(Integer.valueOf(value.toString()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// suppress the need of preserve original exception, will blow
|
|
||||||
// up the
|
|
||||||
// log and not necessary here
|
|
||||||
catch (final InvalidValueException ex) {
|
|
||||||
// we have to throw the exception here, otherwise the UI won't
|
|
||||||
// show the vaadin validation error!
|
|
||||||
throw ex;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
echo $CI_PULL_REQUEST pull request
|
echo $CI_PULL_REQUEST pull request
|
||||||
# regular sonar on master
|
# regular sonar on master
|
||||||
if [ "$CIRCLE_BRANCH" = "master" ]; then
|
if [ "$CIRCLE_BRANCH" = "master" ]; then
|
||||||
mvn verify license:check sonar:sonar -Dsonar.login=$SONAR_SERVER_USER -Dsonar.password=$SONAR_SERVER_PASSWD
|
mvn verify license:check sonar:sonar -Dsonar.login=$SONAR_SERVER_USER -Dsonar.password=$SONAR_SERVER_PASSWD -Dsonar.exclusions=**/target/generated-sources/apt/**,**/src/test/**,**/src/main/java/org/eclipse/hawkbit/repository/test/** -Dsonar.coverage.exclusions=**/src/main/java/org/eclipse/hawkbit/ui/**,**/target/generated-sources/apt/**,**/src/main/java/org/eclipse/hawkbit/repository/test/**
|
||||||
# preview in case of pull request - disabled as circle does not fill those with pull reuqests from different directories
|
# preview in case of pull request - disabled as circle does not fill those with pull reuqests from different directories
|
||||||
else
|
else
|
||||||
#if [ -n "$CI_PULL_REQUEST" ]; then
|
#if [ -n "$CI_PULL_REQUEST" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user