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

### Description


### Affected Linter Version


### To Reproduce


### Expected Behavior


### Actual Behavior


### Linter Output / Error Message

```
Paste linter output or stack trace here ...
```

### Screenshots

8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
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.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Feature Request
about: Use this template if you want to request a new feature or linting rule
labels: needs triage, enhancement
---

### Related Problem


### Proposed Solution


### Additional Context

44 changes: 44 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: 2
updates:
# Java / Maven dependencies
- package-ecosystem: "maven"
directory: "/"
target-branch: "develop"
schedule:
interval: "weekly"
day: "sunday"
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
groups:
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: 5
groups:
github-actions:
patterns:
- "*"
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Closes #issuenumber(s).

### Changes


### How Was This Patch Tested?

- [ ] Unit tests
- [ ] Manual executed tests
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: DSF Linter Build

on:
push:
branches: [ "main", "develop", "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" ]
schedule:
- cron: '11 15 * * 0' # Sundays, 15:11

permissions: {}

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

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 25
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 25
cache: 'maven'

- name: Build with Maven
run: mvn verify --batch-mode --fail-at-end
54 changes: 54 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CodeQL Analysis

on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]
schedule:
- cron: '11 15 * * 0' # Sundays, 15:11

permissions: {}

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
name: 'codeql: ${{ matrix.language }}'
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 25
if: ${{ matrix.language == 'java-kotlin' }}
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 25
cache: 'maven'

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: security-extended, security-and-quality

- name: Build with Maven
if: ${{ matrix.language == 'java-kotlin' }}
run: mvn package --batch-mode --fail-at-end -DskipTests

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: '/language:${{ matrix.language }}'
54 changes: 54 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: DSF Linter Publish with Maven

on:
pull_request:
types: closed
branches: [ "main" ]

jobs:
publish:
# Only run if pull requests are merged, omit running if pull requests are closed without merging
if: github.event.pull_request.merged
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
cache: 'maven'

- name: Import GPG key
run: |
echo "${{ secrets.MAVEN_GPG_PRIVATE_KEY }}" | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG

- name: Create Maven settings.xml with Sonatype credentials
run: |
mkdir -p ~/.m2
cat > ~/.m2/settings.xml <<EOF
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>central</id>
<username>${{ secrets.OSSRH_USERNAME }}</username>
<password>${{ secrets.OSSRH_TOKEN }}</password>
</server>
</servers>
</settings>
EOF

- name: Publish to Maven Central
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
run: mvn --batch-mode --fail-at-end -P release -Dgpg.passphrase="${MAVEN_GPG_PASSPHRASE}" clean deploy
10 changes: 4 additions & 6 deletions linter-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>dev.dsf.utils.linter</groupId>
<groupId>dev.dsf.linter</groupId>
<artifactId>dsf-linter</artifactId>
<version>0.1.2</version>
</parent>

<artifactId>linter-cli</artifactId>

<properties>
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- linter-cli is an executable fat-JAR, not a library – skip Central publication -->
<maven.deploy.skip>true</maven.deploy.skip>
</properties>

<dependencies>
<dependency>
<groupId>dev.dsf.utils.linter</groupId>
<groupId>dev.dsf.linter</groupId>
<artifactId>linter-core</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down Expand Up @@ -48,7 +47,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<phase>package</phase>
Expand Down
41 changes: 30 additions & 11 deletions linter-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,14 @@

<!-- Parent coordinates if needed -->
<parent>
<groupId>dev.dsf.utils.linter</groupId>
<groupId>dev.dsf.linter</groupId>
<artifactId>dsf-linter</artifactId>
<version>0.1.2</version>
</parent>

<artifactId>linter-core</artifactId>

<properties>
<!-- Java 25 compilation -->
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- Byte Buddy version (check for a version that at least somewhat supports Java 21) -->
<bytebuddy.version>1.15.8</bytebuddy.version>
</properties>

Expand Down Expand Up @@ -79,7 +73,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.18.0</version>
<version>2.18.6</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -156,11 +150,38 @@

<build>
<plugins>
<!-- Attach sources JAR (required by Maven Central) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Attach Javadoc JAR (required by Maven Central) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Maven Shade Plugin: Creates executable JAR with all dependencies -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -189,9 +210,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M9</version>
<configuration>
<!-- If Byte Buddy complains about Java 17 not supported, set this property: -->
<argLine>-Dnet.bytebuddy.experimental=true</argLine>
</configuration>
</plugin>
Expand Down
Loading
Loading