Skip to content

Add dsf-linter integration as lint goal in dsf-maven-plugin - #486

Merged
hhund merged 21 commits into
datasharingframework:issue/431_linter_into_dsf_maven_pluginfrom
khalilmalla95:main
Nov 17, 2026
Merged

hhund merged 21 commits into
datasharingframework:issue/431_linter_into_dsf_maven_pluginfrom
khalilmalla95:main

Conversation

@khalilmalla95

Copy link
Copy Markdown

Integrates the dsf-linter library (0.1.2) into the Maven build by adding a new lint Mojo that validates BPMN, FHIR and plugin configurations from built JAR files. Enabled for test-plugin-v1 and test-plugin-v2.

Closes #431

Integrates the dsf-linter library (0.1.2) into the Maven build by adding a new lint Mojo that validates BPMN, FHIR and plugin configurations from built JAR files. Enabled for test-plugin-v1 and test-plugin-v2.
Replace the removed OverallLinterResult.getTotalErrors() call with
getPluginErrors() so dsf-maven-plugin compiles again.

Also align failure handling with DsfLinter.success(): fail the build
only when success() is false, and warn when errors remain under
failOnErrors=false instead of reporting a false pass.
Exclude linter-core runtime stubs that pollute the dsf-maven-plugin
classpath. linter-core pulls hapi-fhir-base 5.7.9 and camunda-engine into
the plugin realm, which breaks generate-fhir-bundle with a missing
ca.uhn.fhir.util.Logs class while DSF itself uses HAPI 8.4.2.

Also set failOnErrors=false on the lint executions for
dsf-bpe-test-plugin-v1 and v2. Those modules are intentional fixtures and
produce expected lint findings; failing the reactor build on them blocked
CI after the lint goal was wired in.
Apply the project Eclipse formatter to LintPluginMojo so the CI
formatter/impsort/license check passes. No behavioral changes.
Add spring-context and camunda-engine to dsf-maven-plugin so JAR lint
can resolve @Bean/@scope and JavaDelegate via reflection.

Keep Camunda's transitive HAPI excluded so generate-fhir-bundle continues
to use HAPI 8.x. This removes the false PLUGIN_DEFINITION_SPRING_* and
BPMN_*_NOT_IMPLEMENTING_JAVA_DELEGATE findings on the test plugins.
Use the unversioned activity-definition StructureDefinition profile in
dsf-bpe-test-plugin-v1 so the FHIR lint check no longer reports
ACTIVITY_DEFINITION_PROFILE_NO_PLACEHOLDER.
Replace legacy Task.instantiatesUri/fixedUri with Task.instantiatesCanonical
and fixedCanonical using the |#{version} form expected by DSF Task profiles
and the linter cross-check.
The linter correctly flags that continue-send-test is missing from the
static ActivityDefinition. That is intentional here: the message is added
only at runtime via FhirResourceModifier, a pattern used only in this DSF
test plugin. Suppress the findings via exclusions instead of changing
dsf-linter.
camunda-engine 7.24.0 does not pull HAPI; the old hapi-fhir-base 5.7.9
conflict came from linter-core and remains excluded there. Keep camunda
as a direct, versioned dependency for JavaDelegate reflection only.
The |1.0.0 profile suffix in dsf-test.xml is intentional to verify API v1
BPE stripping behavior. Suppress ACTIVITY_DEFINITION_PROFILE_NO_PLACEHOLDER
via dsf-linter-exclusions.json so the new lint goal does not fail CI.
@hhund hhund self-assigned this Nov 17, 2026
@hhund hhund added this to the 2.2.0 milestone Nov 17, 2026
@hhund
hhund changed the base branch from develop to issue/431_linter_into_dsf_maven_plugin November 17, 2026 17:23
@hhund
hhund merged commit 9b6392c into datasharingframework:issue/431_linter_into_dsf_maven_plugin Nov 17, 2026
20 checks passed
@hhund hhund linked an issue Nov 17, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate DSF Linter as Maven plugin goal

2 participants