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

com.structurizr.inspection.model.ElementDescriptionInspection Maven / Gradle / Ivy

The newest version!
package com.structurizr.inspection.model;

import com.structurizr.inspection.Inspector;
import com.structurizr.inspection.Violation;
import com.structurizr.model.Element;
import com.structurizr.util.StringUtils;

abstract class ElementDescriptionInspection extends AbstractElementInspection {

    public ElementDescriptionInspection(Inspector inspector) {
        super(inspector);
    }

    @Override
    protected Violation inspect(Element element) {
        if (StringUtils.isNullOrEmpty(element.getDescription())) {
            return violation("The " + terminologyFor(element).toLowerCase() + " \"" + nameOf(element) + "\" is missing a description.");
        }

        return noViolation();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy