Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
12c9462
Add dsf-linter integration as lint goal in dsf-maven-plugin
khalilmalla95 Mar 10, 2026
9dd70ce
Update dsf-linter to version 0.1.3 in pom.xml
khalilmalla95 Apr 29, 2026
4acf1ca
Change default values for HTML and JSON report generation to false in…
khalilmalla95 Apr 29, 2026
e1ec338
Add QUICKSTART.md for dsf-maven-plugin usage instructions
khalilmalla95 Apr 29, 2026
7563cbe
Remove QUICKSTART.md as it is no longer relevant
khalilmalla95 Apr 29, 2026
a538623
Add MAVEN_LINTER_USAGE.md with usage instructions for dsf-maven-plugin
khalilmalla95 Apr 29, 2026
61fb7bb
Update groupId for dsf-linter dependencies in pom.xml
khalilmalla95 Apr 29, 2026
fe18bc1
Add support for exclusion rules in dsf-maven-plugin lint goal
khalilmalla95 May 5, 2026
cf73a5e
Expand MAVEN_LINTER_USAGE.md with exclusion rules and configuration d…
khalilmalla95 May 5, 2026
e039943
Merge remote-tracking branch 'upstream/develop'
khalilmalla95 Nov 9, 2026
d3efaa8
Fix LintPluginMojo compile error against linter-core 0.1.3
khalilmalla95 Nov 16, 2026
5de0ffb
Fix maven-plugin classpath clash and keep test-plugin lint non-fatal
khalilmalla95 Nov 16, 2026
ac12396
Format LintPluginMojo to satisfy formatter-maven-plugin
khalilmalla95 Nov 16, 2026
bea8e16
Fix lint false positives by restoring Mojo reflection classpath
khalilmalla95 Nov 16, 2026
9c35aa7
Remove version suffix from test plugin ActivityDefinition profile
khalilmalla95 Nov 16, 2026
0191263
Align continue-send-test StructureDefinition with instantiatesCanonical
khalilmalla95 Nov 16, 2026
b3fef2b
Exclude continue-send-test AD lint findings in v2 test plugin
khalilmalla95 Nov 16, 2026
fa60d55
Drop unnecessary HAPI exclusion from camunda-engine dependency
khalilmalla95 Nov 17, 2026
754ab75
Revert "Remove version suffix from test plugin ActivityDefinition pro…
khalilmalla95 Nov 17, 2026
a1c1e7d
Document intentional ActivityDefinition profile version in v1 test pl…
khalilmalla95 Nov 17, 2026
13b1fd3
Exclude intentional ActivityDefinition profile version in test plugin v1
khalilmalla95 Nov 17, 2026
9b6392c
Merge pull request #486 from khalilmalla95/main
hhund Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions MAVEN_LINTER_USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Maven Linter Quick Start

## Enable (pom.xml)
```xml
<plugin>
<groupId>dev.dsf</groupId>
<artifactId>dsf-maven-plugin</artifactId>
<executions>
<execution>
<id>lint-plugin</id>
<goals>
<goal>lint</goal>
</goals>
</execution>
</executions>
</plugin>
```

## Run
- `mvn verify`
- `mvn deploy`
- `mvn install`
- `mvn dsf-maven-plugin:lint`

## Parameters
- Skip: `-Ddsf.lint.skip=true`
- Do not fail build: `-Ddsf.lint.failOnErrors=false`
- HTML Report: `-Ddsf.lint.html=true`
- JSON Report: `-Ddsf.lint.json=true`
- Verbose Logs: `-Ddsf.lint.verbose=true`
- Report path: `-Ddsf.lint.reportPath=target/dsf-linter-report`
- Exclusion rules: `-Ddsf.lint.exclusionsFile=path/to/dsf-linter-exclusions.json`

## Excluding Issues

Users often encounter known, intentional, or external findings that clutter reports and make triage harder.
The exclusion system lets you suppress specific lint items from HTML and JSON reports without touching the plugin source.

### Option A — Auto-discovery (recommended)

Place a file named `dsf-linter-exclusions.json` in your project root. The plugin picks it up automatically — no extra configuration needed.

### Option B — Explicit file

Pass the path via the Maven property:

```bash
mvn verify -Ddsf.lint.exclusionsFile=path/to/my-exclusions.json
```

Or configure it permanently in `pom.xml`:

```xml
<plugin>
<groupId>dev.dsf</groupId>
<artifactId>dsf-maven-plugin</artifactId>
<configuration>
<exclusionsFile>${project.basedir}/dsf-linter-exclusions.json</exclusionsFile>
</configuration>
<executions>
<execution>
<id>lint-plugin</id>
<goals><goal>lint</goal></goals>
</execution>
</executions>
</plugin>
```

### Exclusion file format

```json
{
"affectsExitStatus": false,
"rules": [
{ "type": "BPMN_PROCESS_HISTORY_TIME_TO_LIVE_MISSING" },
{ "severity": "WARN", "file": "update-allow-list.bpmn" },
{ "messageContains": "optional field" }
]
}
```

**Rule fields** (AND-combined within a rule; multiple rules are OR-combined):

| Field | Match | Example |
|---|---|---|
| `type` | Exact, case-insensitive `LintingType` name | `"BPMN_PROCESS_HISTORY_TIME_TO_LIVE_MISSING"` |
| `severity` | Exact, case-insensitive severity | `"WARN"`, `"ERROR"`, `"INFO"` |
| `file` | Case-insensitive substring of the file name | `"update-allow-list"` |
| `messageContains` | Case-insensitive substring of the description | `"optional field"` |

**`affectsExitStatus`:**

| Value | Behaviour |
|---|---|
| `false` *(default)* | Excluded items are fully suppressed — hidden from reports **and** not counted towards build failure |
| `true` | Excluded items are hidden from reports, but their error count **still** causes a build failure |
10 changes: 10 additions & 0 deletions dsf-bpe/dsf-bpe-test-plugin-v1/dsf-linter-exclusions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"affectsExitStatus": false,
"rules": [
{
"type": "ACTIVITY_DEFINITION_PROFILE_NO_PLACEHOLDER",
"file": "dsf-test.xml",
"messageContains": "activity-definition|1.0.0"
}
]
}
40 changes: 24 additions & 16 deletions dsf-bpe/dsf-bpe-test-plugin-v1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,29 @@
</dependencies>

<build>
<plugins>
<plugin>
<groupId>dev.dsf</groupId>
<artifactId>dsf-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate-config-doc</goal>
</goals>
</execution>
</executions>
<configuration>
<configDocPackages>dev.dsf.bpe.test.spring.config</configDocPackages>
</configuration>
</plugin>
</plugins>
<plugins>
<plugin>
<groupId>dev.dsf</groupId>
<artifactId>dsf-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-config-doc</id>
<goals>
<goal>generate-config-doc</goal>
</goals>
</execution>
<execution>
<id>lint-plugin</id>
<goals>
<goal>lint</goal>
</goals>
</execution>
</executions>
<configuration>
<configDocPackages>dev.dsf.bpe.test.spring.config</configDocPackages>
<exclusionsFile>${project.basedir}/dsf-linter-exclusions.json</exclusionsFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
-->
<ActivityDefinition xmlns="http://hl7.org/fhir">
<meta>
<!-- Version suffix is intentional: API v1 BPE silently strips it on load (see ProcessPluginImpl.createFhirConfig / modifyActivityDefinition). Used to verify that behavior. -->
<profile value="http://dsf.dev/fhir/StructureDefinition/activity-definition|1.0.0" />
<tag>
<system value="http://dsf.dev/fhir/CodeSystem/read-access-tag" />
Expand Down
10 changes: 10 additions & 0 deletions dsf-bpe/dsf-bpe-test-plugin-v2/dsf-linter-exclusions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"affectsExitStatus": false,
"rules": [
{
"type": "BPMN_NO_ACTIVITY_DEFINITION_FOUND_FOR_MESSAGE",
"file": "test.bpmn",
"messageContains": "continue-send-test"
}
]
}
36 changes: 22 additions & 14 deletions dsf-bpe/dsf-bpe-test-plugin-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,28 @@

<build>
<plugins>
<plugin>
<groupId>dev.dsf</groupId>
<artifactId>dsf-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate-config-doc</goal>
</goals>
</execution>
</executions>
<configuration>
<configDocPackages>dev.dsf.bpe.test.spring.config</configDocPackages>
</configuration>
</plugin>
<plugin>
<groupId>dev.dsf</groupId>
<artifactId>dsf-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-config-doc</id>
<goals>
<goal>generate-config-doc</goal>
</goals>
</execution>
<execution>
<id>lint-plugin</id>
<goals>
<goal>lint</goal>
</goals>
</execution>
</executions>
<configuration>
<configDocPackages>dev.dsf.bpe.test.spring.config</configDocPackages>
<exclusionsFile>${project.basedir}/dsf-linter-exclusions.json</exclusionsFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
<baseDefinition value="http://dsf.dev/fhir/StructureDefinition/task" />
<derivation value="constraint" />
<differential>
<element id="Task.instantiatesUri">
<path value="Task.instantiatesUri" />
<fixedUri value="http://dsf.dev/bpe/Process/test/#{version}" />
<element id="Task.instantiatesCanonical">
<path value="Task.instantiatesCanonical" />
<fixedCanonical value="http://dsf.dev/bpe/Process/test|#{version}" />
</element>
<element id="Task.input">
<path value="Task.input" />
Expand Down
51 changes: 50 additions & 1 deletion dsf-maven/dsf-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,42 @@
<scope>provided</scope>
</dependency>

<dependency>
<dependency>
<groupId>dev.dsf.linter</groupId>
<artifactId>linter-core</artifactId>
<exclusions>
<!-- Runtime stubs from linter-core collide with this plugin's own
HAPI 8.x / process-API / BPMN stack and break other goals
(e.g. generate-fhir-bundle: missing ca.uhn.fhir.util.Logs). -->
<exclusion>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-base</artifactId>
</exclusion>
<exclusion>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine</artifactId>
</exclusion>
<exclusion>
<groupId>dev.dsf</groupId>
<artifactId>dsf-bpe-process-api-v1</artifactId>
</exclusion>
<exclusion>
<groupId>dev.dsf</groupId>
<artifactId>dsf-bpe-process-api-v2</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>dev.dsf</groupId>
<artifactId>dsf-bpe-process-api-v1</artifactId>
<exclusions>
<!-- Brought in explicitly below for JavaDelegate reflection in lint. -->
<exclusion>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine</artifactId>
</exclusion>
<!-- Brought in explicitly below for @Bean/@Scope reflection in lint. -->
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
Expand Down Expand Up @@ -89,6 +117,16 @@
</exclusions>
</dependency>

<!-- Lint reflection only: JavaDelegate must be loadable for ClassInspector.
Declared directly (not via linter-core) so the version stays explicit.
camunda-engine 7.24.0 does not pull HAPI; old HAPI 5.7.9 is excluded on
linter-core above. -->
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine</artifactId>
<version>7.24.0</version>
</dependency>

<dependency>
<groupId>org.operaton.bpm.model</groupId>
<artifactId>operaton-bpmn-model</artifactId>
Expand All @@ -97,6 +135,17 @@
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<!-- Lint reflection: @Bean / @Scope on plugin @Configuration classes. -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
Expand Down
Loading
Loading