Skip to main content

model-validations


2.6.0 (2022-11-29)

Added

  • Added rule to verify that DataElement has a type assigned.

Changed

  • Updated 3rd party dependencies in project:
    • Libraries:
      • org.antlr:ST4: 4.0.4 -> 4.3.4
      • com.google.code.gson:gson: 2.9.0 -> 2.10
      • org.apache.commons:commons-text: 1.9 -> 1.10.0 (vulnerability: CVE-2022-42889)
      • info.picocli:picocli: 4.6.3 -> 4.7.0
      • org.slf4j:slf4j-api: 1.7.3 -> 2.0.5
      • org.slf4j:slf4j-simple: 1.7.3 -> 2.0.5
    • Maven plugins:
      • org.codehaus.mojo:flatten-maven-plugin: 1.2.7 -> 1.3.0
  • Updated expansion resource dependencies:
    • net.democritus:Expanders: 5.14.1 -> 5.15.0
    • net.democritus.metamodel:prime-core: 2022.9.0 -> 2022.10.9

2.5.1 (2022-11-15)

  • Re-release 2.5.0

2.5.0 (2022-11-15)

Added

  • Added XmlValidationReporter, activated with --xml <file>

2.4.1 (2022-10-14)

Fixed

  • Verify that elements don't return null instead of a list of options when looking for legacy options.

2.4.0 (2022-10-06)

Added

  • Introduced any as element for a validation, as a wildcard to cover all element types.

Changed

  • Updated the descriptions of some rules in prime-validations to be more descriptive than the reason.
  • LegacyOptionsRule in prime-validation now covers options on all elements and also options that start with transient..
  • Cleaned up HTML report template to provide a clearer overview of errors.

Removed

  • Removed suggestion rules in prime-validations: Data Element should use one of the existing package names..

2.3.1 (2022-10-05)

Fixed

  • Restored original type attribute for entries in junit report.
  • Errors were not correctly picked up for the CLI to exit with an error result.

Changed

  • Switched out nsx-prime for expansion-resource-resolvers.
  • Updated expansion resource dependencies:
    • net.democritus:Expanders: 5.9.3 -> 5.14.1
    • net.democritus.metamodel:metamodel-expansion-stack: 4.7.3 -> 4.11.1
    • net.democritus.metamodel:prime-core: 2022.5.8 -> 2022.9.0

2.3.0 (2022-10-05)

Changed

  • The CLI will now return code 1 if a validation threw an exception or had validation failures of severity error.

2.2.0 (2022-08-04)

Added

  • Added rule to check for FlowElements that target DataElements from other Components.
  • Added ValidationReporter interface which can be used to add new methods of producing reports from the model validation results.
  • Added -V option to command-line interface to print the version of the application.

Changed

  • Replaced command-line interface library. The new command-line interface is still fully compatible.
  • Hidden deprecated --baseComponentsDirectory option in command-line help. (Alias for --workDirectory)

Removed

  • Removed rule to suggest the application option editorconfig.global, which is now enabled by default.

2.1.1 (2022-05-31)

Changed

  • Changed FlowElementHasTaskStatus rule to use the name of the target element instead of the flow element
  • Updated 3rd party dependencies in project:
    • Libraries:
      • com.google.code.gson:gson: 2.8.6 -> 2.9.0 (vulnerability: sonatype-2021-1694)
      • org.apache.commons:commons-text: 1.8 -> 1.9
    • Maven plugins:
      • org.apache.maven.plugins:maven-assembly-plugin: 3.2.0 -> 3.3.0
      • org.apache.maven.plugins:maven-compiler-plugin: 3.10.0 -> 3.10.1
      • org.apache.maven.plugins:maven-failsafe-plugin: 2.22.0 -> 2.22.2
      • org.apache.maven.plugins:maven-surefire-plugin: 2.22.0 -> 2.22.2
      • org.codehaus.mojo:flatten-maven-plugin: 1.1.0 -> 1.2.7
      • org.jacoco:jacoco-maven-plugin: 0.8.7 -> 0.8.8
      • org.sonarsource.scanner.maven:jacoco-maven-plugin: 3.7.0.1746 -> 3.9.1.2184

2.1.0 (2022-05-25)

Added

  • Added several new validations to prime-validations

Updated

  • Updated prime-core 2022.2.1 => 2022.5.6
  • Updated expanders 5.8.0 => 5.9.3

2.0.2 (2022-04-06)

Fixed

  • Fixed model loading if MAVEN_LOCAL_REPOSITORY is not defined. (Only applicable when running the jar directly or in jenkins)

2.0.1 (2022-04-06)

Added

  • Added ModelValidationProperties class to retrieve the version at runtime (used by expanders-maven-plugin)

Fixed

  • Fixed rule names in reports
  • Fixed classloading when run from expanders-maven-plugin

2.0.0 (2022-04-05)

Changed

  • Validation Rules are now provided by a validationGroups.xml data-resource file.
  • Rules are represented by ValidationRuleComposites
  • Rules are implemented to use Composites, not Trees
  • To add a new rule, create a class that implements ValidatableRule and add @ValidationRule and @ValidationGroup:
    @ValidationRule(
    element = "elements::Application",
    severity = ValidationSeverity.PR_ERROR,
    reason = "Base dependencies should be added for an application.",
    description = "Base dependencies should be added for an application."
    )
    @ValidationGroup("Missing Defaults")
    public class ApplicationBaseDependenciesRule implements ValidatableRule<ApplicationComposite> {}
  • Conditional Rules need to implement the ConditionalRule interface
  • To create a new validation resource project. Add the following to the <plugins> section in your pom.xml:
    <plugin>
    <groupId>net.democritus.maven.plugins</groupId>
    <artifactId>expanders-maven-plugin</artifactId>
    <version>${expanders-maven-plugin.version}</version>
    <executions>
    <execution>
    <goals>
    <goal>expansionResource</goal>
    </goals>
    </execution>
    </executions>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.10.0</version>
    <configuration>
    <showWarnings>true</showWarnings>
    <annotationProcessors>
    <!-- Gathers all ValidationRule classes and generates data/validations/validationGroups.xml -->
    <annotationProcessor>
    net.democritus.validations.compilation.ValidationAnnotationProcessor
    </annotationProcessor>
    </annotationProcessors>
    </configuration>
    </plugin>
    and add a _data.xml file pointing towards the generated validationGroups.xml:
    <dataResources>
    <dataResource>
    <path>data/validations/validationGroups.xml</path>
    <elementTypeCanonicalName>net.democritus.validations.ValidationGroup</elementTypeCanonicalName>
    </dataResource>
    </dataResources>

Fixed

  • Changed check on field 'modifiedAt' to field 'lastModifiedAt'
  • Changed check on field 'modifiedBy' to field 'lastModifiedBy'

1.1.3 (2021-09-10)

Added

  • for backwards compatibility attempt to autodetect expansion settings if conf/expansionSettings.xml does not exist

1.1.2 (2021-09-09)

Fixed

  • do not error on valid underscores

1.1.1 (2021-09-09)

Changed

  • Changed FieldNamingRule to be suggestion only, and moved reserved name validation into "error" FieldReservedNamingRule

1.1.0 (2021-09-08)

Added

  • Added standard type naming rules for c4a

Changed

  • Disabled/removed a bunch of outdated and unclear rules, and fixed some edge conditions

Fixed

  • Fixed rule guard crash aborting the entire validation

1.0.2 (2021-07-13)

Added

  • DataElementHasInfoFieldRule now also checks explicitly defined info projection

Removed

  • Removed DataElementHasDefaultFinderRule as it is no longer applicable for nsx-default-stack:2021.7.1+
  • Removed FinderPairNamingRule as fieldOperatorPair.name attribute is irrelevant
  • Removed FinderNamingRule as it was way too noisy with little actual value

1.0.1 (2021-04-02)

  • Fixed html & junit reports when writing to the current directory
  • Fixed FinderNamingRule not accepting claim finders
  • Fixed FieldEnteredAtModifiedAtTypeRule not accepting DateLong

1.0.0 (2021-03-10)

  • Initial release
    • 43 rules migrated from NS Pharo Modeler
    • per-project exclusion configuration
    • integration with Jenkins