Changelog model-validations

Filter x

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