Skip to main content

model-validations


3.7.0 (2024-10-29)

Changed

  • Updated -metamodel artifact so it contains ontologies, but not components.

3.6.2 (2024-05-31)

Fixed

  • Fixed issue when making XML or HTML report with more than 1 programExpansion, which caused the last report to overwrite the previous reports.

3.6.1 (2024-05-30)

Fixed

  • Repair backwards compatibility for references to severity

3.6.0 (2024-05-30)

Changed

  • Updated metamodel to ontology-metamodel-expanders 2024.3.8.

3.5.1 (2024-04-18)

Fixed

  • FieldFinderForOppositeLinkFieldRule only applies to Ln05 fields

3.5.0 (2024-04-08)

Changed

  • Validations can now be run with expired options. Expired options will be marked by the ExpiredOptionsRule.

3.4.1 (2023-12-14)

Fixed

  • Moved new validation for audit options to a more appropriate validation group.

3.4.0 (2023-12-14)

Added

  • Added validation to avoid duplicate use of new audit options for JEE stack that replace the implicit named fields such as enteredAt and enteredBy.

3.3.2 (2023-09-25)

Fixed

  • The validations were only executed on the first program, rather than all of them.

3.3.1 (2023-09-15)

Fixed

  • Removed TypedFindersRule since the option finders.enableTypedFinders is now redundant.

3.3.0 (2023-09-15)

Changed

  • Updated expansion resource dependencies:
    • net.democritus.metamodel:metamodel-expansion-stack: 2023.5.4 -> 2023.6.1
    • net.democritus.metamodel:prime-core: 2023.5.4 -> 2023.6.1
  • Replaced SafeRemovalNowDefaultOptionsRule with RedundantOptionsRule, which checks redundancy based on the new OptionType.redundant field.

3.2.0 (2023-09-15)

Added

  • New validation to notify about options that are redundant because they are now default behavior and can safely be removed.

Changed

  • Changed severity of JEE6 deprecation validation from WARNING to DEPRECATION.
  • Changed severity of ServiceElement deprecation from DEPRECATION to WARNING.
  • When relevant, the validation for legacy options will now also add the expiry date to the validation message.
  • Updated expansion resource dependencies:
    • net.democritus.metamodel:metamodel-expansion-stack: 2023.5.2 -> 2023.5.4
    • net.democritus.metamodel:prime-core: 2023.5.2 -> 2023.5.4

Removed

  • Removed validation rule excludes based on issue messages. Given that these are prone to occasional changes, this was a very brittle exclusion mechanism. Exclusion based on rule + element reference should be used instead.

3.1.2 (2023-06-30)

Added

  • Added suggestion to remove includeRemoteAccess TaskElement option.

Removed

  • Removed error being thrown if no validations are available. Instead, a warning is printed.
  • Removed suggestion to add 'common' options to TaskElements.

3.1.1 (2023-05-31)

Fixed

  • Validation runner failed to detect presence of validations correctly after migration to new data resource structure.

3.1.0 (2023-05-31)

Added

  • Added SCM information to deployed pom.xml artifacts

Changed

  • Pom.xml files of ModelTransmutationsMetamodel are now flattened by flatten maven plugin
  • Elevated FieldIsStatusFieldRule to Error since the option is no longer automatically added

Removed

  • Removed FieldOptionIsMultilingualRule because the multilingual option no longer supported

3.0.0 (2023-05-25)

Changed

  • Refactored annotation processor to simplify the build of validator projects. You can now simply add the validations-core as a dependency. You no longer need to attach the annotation processor or register the validationGroups.xml DataResource.

2.10.0 (2023-05-23)

Added

  • Added validations to check for applications targeting versions of JEE that are no longer supported or deprecated for removal.

Changed

  • Updated expansion resource dependencies:
    • net.democritus:Expanders: 5.22.6 -> 5.23.0
    • net.democritus:prime-data: 2023.0.4 -> 2023.1.0
    • net.democritus.metamodel:metamodel-expansion-stack: 2023.3.1 -> 2023.3.2
    • net.democritus.metamodel:prime-core: 2023.3.1 -> 2023.3.2

2.9.0 (2023-05-17)

Added

  • Added error rule to check if collection-type linkfields were used in a finder.

Changed

  • Updated expansion resource dependencies:
    • net.democritus:Expanders: 5.15.0 -> 5.22.6
    • net.democritus.metamodel:metamodel-expansion-stack: 2023.3.0 -> 2023.3.1
    • net.democritus.metamodel:prime-core: 2023.3.0 -> 2023.3.1

Removed

  • Removed all C4A specific validations.

2.8.0 (2023-05-11)

Changed

  • Reimplemented FieldIsStatusFieldRule to work on status fields targeted by FlowElements instead of random String fields called status
  • Specific critiques on specific elements will now be filtered out if the rule is excluded for that element. (This will make exclusions work more intuitive.)

Removed

  • Removed ApplicationBaseDependenciesRule

2.7.0 (2023-02-02)

Updated

  • Updated prime-core to 2023.0.2

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