Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
name: Bug Report
about: Use this template for reporting a bug
labels: needs triage, bug report
---

<!--
Please only report issues here that are specific to the DSF Linter itself.
For general questions, please use the communication channels of your parent organization, e.g. Zulip in case of the Medical Informatics Initiative (MII) or the Network University Medicine (NUM).
-->

<!-- IMPORTANT: Please make sure to remove any sensitive information from your logs, descriptions and screenshots! -->

### Description
<!-- A clear and concise description of what the bug is. -->


### Affected DSF Linter Version
<!-- Please list the affected DSF Linter version or versions, e.g.:

* 0.1.2

-->


### To Reproduce
<!-- Write a step by step guide and list configuration options necessary to reproduce the behavior, e.g.:

Configuration:
* Some option enabled
* A specific config parameter set to `some value`

Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

-->


### Expected Behavior
<!-- A clear and concise description of what you expected to happen. -->


### Logs
<!-- If applicable, add log file excerpts from your Linter execution. **Please make sure to remove any sensitive data**. Please make sure to include full stack traces if available. -->

*CLI / Maven Output:*
```text
Log output here ...
```

### Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: DSF Documentation
url: https://dsf.dev/process-development/linter-tool/linter-tool.html
about: Read the DSF Linter documentation.
- name: Getting Help
url: https://github.com/datasharingframework/dsf-linter/discussions
about: For general questions about the DSF Linter, please use GitHub Discussions.
- name: MII / NUM Related Questions
url: https://mii.zulipchat.com/#narrow/channel/392426-Data-Sharing-Framework-.28DSF.29/topic/DSF.20Linter/with/574964964
about: For questions about the use of the DSF Linter in the Medical Informatics Initiative (MII) or the Network University Medicine (NUM), please use the channels in the MII Zulipchat.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Feature Request
about: Use this template if you want to request a new feature
labels: needs triage, enhancement
---

<!--
Please only report feature requests here that are specific to the DSF Linter itself.
-->
<!-- IMPORTANT: Please make sure to remove any sensitive information from your input! -->


### Related Problem
<!-- Is your feature request related to a problem? Please describe.
A clear and concise description of the problem . Ex. I'm always frustrated when \[...\] -->

### Describe the Solution You’d Like
<!-- A clear and concise description of what you want to happen. -->

### Describe Alternatives You’ve Considered
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
47 changes: 47 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: 2
updates:
# Java / Maven dependencies
- package-ecosystem: "maven"
directory: "/"
target-branch: "develop"
schedule:
interval: "weekly"
day: "sunday"
open-pull-requests-limit: 15
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
groups:
jackson:
patterns:
- "com.fasterxml.jackson*"
fhir:
patterns:
- "hapi-fhir*"
- "org.hl7.fhir*"
slf4j:
patterns:
- "org.slf4j*"
testing-tools:
patterns:
- "org.junit*"
- "org.mockito*"
safe-patch-updates:
update-types:
- "patch"
remaining-minor-updates:
update-types:
- "minor"

# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "develop"
schedule:
interval: "weekly"
day: "sunday"
open-pull-requests-limit: 10
groups:
github-actions:
patterns:
- "*"
30 changes: 30 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines.
2. Ensure you have added or run the appropriate tests for your PR.
3. If the PR is unfinished, mark the pull request as draft.
4. Be sure to keep the PR description updated to reflect all changes.
5. Please write your PR title to summarize what this PR proposes.
6. If possible, provide a concise example to reproduce the issue for a faster review.
-->

<!-- IMPORTANT: Please make sure to remove any sensitive information from your input! -->


Closes #issuenumber(s).

### Changes
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
-->


### How Was This Patch Tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a different way from regular unit tests, please clarify how you tested step by step, ideally copy and pastetable, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->
- [ ] Unit tests
- [ ] Integration tests
- [ ] Manual executed tests
206 changes: 206 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
name: DSF Linter Build

on:
push:
branches: [ "release/*", "hotfix/*" ]
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-M[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-RC[0-9]+
pull_request:
branches: [ "main", "develop" ]
types: [opened, synchronize, reopened, closed]
schedule:
- cron: '11 15 * * 0' # Sundays, 15:11

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

env:
MVN_BATCH_MODE_FAIL_AT_END: --batch-mode --fail-at-end
MVN_SKIP_MOST: -P!generate-source-and-javadoc-jars -Dimpsort.skip=true -Dformatter.skip=true -Dlicense.skip=true -Denforcer.skip -Dmaven.buildNumber.skip=true -DskipShadePlugin=true

jobs:
codeql:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: java-kotlin
build-mode: manual
- language: javascript-typescript
build-mode: none
name: 'codeql: ${{ matrix.language }}'
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 25
if: ${{ matrix.language == 'java-kotlin' }}
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'zulu'
java-version: 25
cache: 'maven'
- name: Initialize CodeQL
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: security-extended, security-and-quality
- name: Minimal Maven Build
if: ${{ matrix.language == 'java-kotlin' }}
run: mvn package $MVN_BATCH_MODE_FAIL_AT_END $MVN_SKIP_MOST -DskipTests
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
with:
category: "/language:${{matrix.language}}"

maven-quick:
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
version: ${{ steps.version.outputs.version }}
main: ${{ steps.main.outputs.main }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 25
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'zulu'
java-version: 25
cache: 'maven'
- name: Minimal Maven Build
run: mvn install $MVN_BATCH_MODE_FAIL_AT_END $MVN_SKIP_MOST -DskipTests -DbuildNumber=${GITHUB_SHA} -DscmBranch=${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}
- name: Upload quick-build results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: quick_build
path: |
./**/target
- name: Get Maven project version
id: version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:3.6.3:exec)" >> $GITHUB_OUTPUT
- name: Checkout main branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: main
- name: Check if ref is main HEAD
id: main
run: echo "main=$( [ "$GITHUB_SHA" = "$(git rev-parse HEAD)" ] && echo true || echo false )" >> $GITHUB_OUTPUT

maven-full:
runs-on: ubuntu-latest
needs: maven-quick
permissions:
contents: read
strategy:
fail-fast: false
matrix:
mvn:
- name: JavaDoc
cmd: mvn javadoc:javadoc $MVN_BATCH_MODE_FAIL_AT_END -Dformatter.skip=true -Denforcer.skip -Dmaven.buildNumber.skip=true -DskipShadePlugin=true
- name: Formatter, Impsort, Enforcer
cmd: mvn compile test-compile $MVN_BATCH_MODE_FAIL_AT_END -Dmaven.buildNumber.skip=true
- name: Unit Tests
cmd: mvn dependency:properties surefire:test $MVN_BATCH_MODE_FAIL_AT_END $MVN_SKIP_MOST
name: ${{ matrix.mvn.name }}
timeout-minutes: 8
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Download quick-build results
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: quick_build
path: ./
- name: Set up JDK 25
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'zulu'
java-version: 25
cache: 'maven'
- name: Install quick-build artifacts to local repository
run: |
VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:3.6.3:exec)
mvn install:install-file \
-Dfile="linter-core/target/linter-core-${VERSION}.jar" \
-DpomFile=linter-core/pom.xml
- name: ${{ matrix.mvn.name }}
run: ${{ matrix.mvn.cmd }}

maven-deploy:
if: ${{ !endsWith(needs.maven-quick.outputs.version, '-SNAPSHOT') && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
needs: [codeql, maven-quick, maven-full]
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Download quick-build results
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: quick_build
path: ./
- name: Set up JDK 25
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'zulu'
java-version: 25
cache: 'maven'
server-id: central
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Deploy to Maven Central
run: mvn deploy -Dimpsort.skip=true -Dformatter.skip=true -Dlicense.skip=true -DskipTests -Ppublish-to-maven-central -Dmaven.buildNumber.skip=true -DbuildNumber=${GITHUB_SHA} -DscmBranch=${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

release-assets:
if: ${{ !endsWith(needs.maven-quick.outputs.version, '-SNAPSHOT') && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
needs: [maven-quick, maven-full]
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 25
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'zulu'
java-version: 25
cache: 'maven'
- name: Build executable JAR
run: mvn --batch-mode clean package -pl linter-cli -am -DskipTests
- name: Compute SHA256 checksum
run: |
VERSION="${GITHUB_REF_NAME#v}"
JAR="linter-cli/target/linter-cli-${VERSION}.jar"
sha256sum "$JAR" > "linter-cli-${VERSION}.jar.sha256"
- name: Upload release assets
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION="${GITHUB_REF_NAME#v}"
JAR="linter-cli/target/linter-cli-${VERSION}.jar"
CHECKSUM="linter-cli-${VERSION}.jar.sha256"
if ! gh release view "${GITHUB_REF_NAME}" >/dev/null 2>&1; then
gh release create "${GITHUB_REF_NAME}" --title "${GITHUB_REF_NAME}" --generate-notes --draft
fi
gh release upload "${GITHUB_REF_NAME}" "$JAR" "$CHECKSUM" --clobber
Loading