diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 0000000..5fb67b8
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,44 @@
+---
+name: Bug report
+description: File a new bug
+labels: [bug, triage]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Before requesting: search [existing issues](../../../../labels/bug).
+ - type: textarea
+ attributes:
+ label: Current Behavior
+ description: Description of the current behavior.
+ validations:
+ required: true
+ - type: textarea
+ attributes:
+ label: Expected Behavior
+ description: Description of the expected behavior.
+ validations:
+ required: true
+ - type: textarea
+ attributes:
+ label: Steps To Reproduce
+ description: 'Example steps to reproduce the behavior:'
+ placeholder: |
+ 1. In this environment...
+ 2. With this config...
+ 3. Run '...'
+ 4. See error...
+ validations:
+ required: true
+ - type: input
+ attributes:
+ label: Environment - OS
+ description: Linux or Windows
+ validations:
+ required: true
+ - type: textarea
+ attributes:
+ label: Anything else
+ description: Further hints, links, or references? Any additional information probably helping in root cause analysis.
+ validations:
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
new file mode 100644
index 0000000..fcfbeb0
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,29 @@
+---
+name: Feature request
+description: Request an enhancement for this maven plugin
+labels: [enhancement]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Before requesting: search [existing issues](../../../../labels/enhancement).
+ - type: textarea
+ attributes:
+ label: Description
+ description: Describe the feature you're requesting.
+ placeholder: This feature adds functionality to ...
+ validations:
+ required: true
+ - type: textarea
+ attributes:
+ label: Motivation
+ description: Describe additional context such as examples or use cases helping in understanding the feature request.
+ placeholder: 'This feature would be helpful because ... so that the following use case is addressed: ...'
+ validations:
+ required: true
+ - type: textarea
+ attributes:
+ label: Proposed Solution (optional)
+ description: Sketch an implementation idea, possibly considering multiple approaches.
+ validations:
+ required: false
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 0000000..783b685
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,11 @@
+### Proposed changes
+
+Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the [supported keywords](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) here in this description (not in the title of the PR).
+
+### Checklist
+
+Before creating a PR, run through this checklist and mark each as complete:
+- [ ] I have read the [`CONTRIBUTING`](CONTRIBUTING.md) document
+- [ ] If applicable, I have added tests that prove my fix is effective or that my feature works
+- [ ] If applicable, I have checked that any relevant tests pass after adding my changes
+- [ ] I have updated any relevant documentation
diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml
index 82cf81e..7219950 100644
--- a/.github/workflows/maven-build.yml
+++ b/.github/workflows/maven-build.yml
@@ -3,12 +3,13 @@ name: maven-build
on:
push:
branches: ['**/**']
+ pull_request:
+ branches: [main]
+ types: [opened, synchronize, reopened, ready_for_review]
jobs:
build:
runs-on: ubuntu-latest
env:
- S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY: ${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY }}
- S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY: ${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY }}
COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_USERNAME: ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_USERNAME }}
COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_TOKEN: ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_TOKEN }}
COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PASSPHRASE: ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PASSPHRASE }}
@@ -17,26 +18,24 @@ jobs:
MARKDOWN2HTML_MAVEN_PLUGIN_FAIL_ON_ERROR: true
steps:
- name: ๐ Checkout the repository
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- - name: Set up JDK and Maven
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
+ - name: ๐งฑ Set up JDK and Maven
+ uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
with:
distribution: adopt
java-version: 17
gpg-private-key: ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PRIVATE_KEY }}
- name: ๐ Get the project version
id: project_version
- run: echo "project_version=$(mvn help:evaluate -Dexpression=project.version
- -q -DforceStdout)" >> $GITHUB_OUTPUT
+ run: echo "project_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
- name: ๐ Store cache key
id: cache_key
- run: echo "cache_key=${{ runner.os }}-mvn-${{ hashFiles('**/pom.xml') }}-${{
- github.sha }}" >> $GITHUB_OUTPUT
+ run: echo "cache_key=${{ runner.os }}-mvn-${{ hashFiles('**/pom.xml') }}-${{ github.sha }}" >> $GITHUB_OUTPUT
- name: ๐พ Prepare cache using cache key
id: prepare-cache
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
+ uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
with:
path: |
/home/runner/.m2
@@ -45,25 +44,8 @@ jobs:
- name: ๐ Generate settings.xml for Maven
uses: whelk-io/maven-settings-xml-action@9dc09b23833fa9aa7f27b63db287951856f3433d # v22
with:
- repositories: >
- [
- {
- "id": "s3",
- "name": "s3.sbb.polarion.maven.repo",
- "url": "s3://sbb-polarion-maven-repo/polarion.mvn",
- "releases": {
- "enabled": "true",
- "updatePolicy": "never"
- }
- }
- ]
servers: >
[
- {
- "id": "s3",
- "username": "${env.S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY}",
- "password": "${env.S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY}"
- },
{
"id": "github",
"username": "${env.GITHUB_ACTOR}",
@@ -91,8 +73,12 @@ jobs:
]
- name: ๐ Print settings.xml
run: cat /home/runner/.m2/settings.xml
- - name: ๐ฆ Build with Maven
- run: mvn --batch-mode clean package # sonar:sonar
+ - name: ๐ฆ Build with Maven for Pushes
+ if: github.event_name == 'push'
+ run: mvn --batch-mode clean package sonar:sonar -Dsonar.branch.name=${{ github.head_ref }}
+ - name: ๐ฆ Build with Maven for PRs
+ if: github.event_name == 'pull_request'
+ run: mvn --batch-mode clean package sonar:sonar -Dsonar.pullrequest.base=${{ github.base_ref }} -Dsonar.pullrequest.branch=${{ github.head_ref }} -Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
outputs:
project_version: ${{ steps.project_version.outputs.project_version }}
cache_key: ${{ steps.cache_key.outputs.cache_key }}
@@ -103,21 +89,19 @@ jobs:
runs-on: ubuntu-latest
if: ${{ !endsWith(needs.build.outputs.project_version, '-SNAPSHOT') && github.ref == 'refs/heads/main' }}
env:
- S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY: ${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY }}
- S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY: ${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY }}
COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_USERNAME: ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_USERNAME }}
COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_TOKEN: ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_TOKEN }}
COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PASSPHRASE: ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PASSPHRASE }}
steps:
- name: ๐งฑ Set up JDK and Maven
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
+ uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
with:
distribution: adopt
java-version: 17
gpg-private-key: ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PRIVATE_KEY }}
- name: ๐พ Restore cache using cache key
id: restore-cache
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
+ uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
with:
path: |
/home/runner/.m2
@@ -126,7 +110,7 @@ jobs:
- name: ๐ฆ Deploy artifacts to Maven Central
run: mvn --batch-mode -Dmaven.test.skip=true deploy -P gpg-sign -P nexus-staging
- # deploy to GitHub Packages
+ # Deploy release to GitHub Packages
deploy-github-packages:
needs: build
runs-on: ubuntu-latest
@@ -135,26 +119,23 @@ jobs:
contents: write
packages: write
env:
- S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY: ${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY }}
- S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY: ${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY }}
GITHUB_TOKEN: ${{ github.token }}
steps:
- name: ๐งฑ Set up JDK and Maven
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
+ uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
with:
distribution: adopt
java-version: 17
- name: ๐พ Restore cache using cache key
id: restore-cache
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
+ uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
with:
path: |
/home/runner/.m2
/home/runner/work
key: ${{ needs.build.outputs.cache_key }}
- name: ๐ฆ Deploy artifacts to GitHub Packages
- run: mvn --batch-mode -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dmaven.source.skip=true
- deploy -P deploy-github-packages
+ run: mvn --batch-mode -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dmaven.source.skip=true deploy -P deploy-github-packages
- name: ๐ฆ Upload assets to GitHub Release
run: |-
gh release upload v${{ needs.build.outputs.project_version }} target/*-${{ needs.build.outputs.project_version }}.jar
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index 40da70b..841ba18 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -1,31 +1,23 @@
---
name: PR checks
-
on:
pull_request:
- types:
- - opened
- - edited
- - synchronize
- - reopened
- - unlocked
-
+ types: [opened, edited, synchronize, reopened, unlocked]
permissions:
contents: read
-
jobs:
check-conventional-commit:
name: Check commit messages
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
- ref: "${{ github.event.pull_request.head.ref }}"
- repository: "${{ github.event.pull_request.head.repo.full_name }}"
+ ref: ${{ github.event.pull_request.head.ref }}
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
- - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
- cache: "pip" # caching pip dependencies
+ python-version: 3.x
- run: pip install commitizen
- name: Check commit messages
run: cz check --rev-range origin/${GITHUB_BASE_REF}..
diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml
index 567bde2..57493be 100644
--- a/.github/workflows/release-please.yml
+++ b/.github/workflows/release-please.yml
@@ -12,7 +12,7 @@ jobs:
steps:
- name: release-please
id: release
- uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4
+ uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4
with:
release-type: maven
- default-branch: main
+ target-branch: main
diff --git a/.gitignore b/.gitignore
index 8aaa4f6..6dcbcb0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,36 @@
-target
-bin
-.project
-.classpath
-.settings
-
-.idea
-*.iml
\ No newline at end of file
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+replay_pid*
+.idea/*
+
+# code style config
+!.idea/codeStyles
+.idea/codeStyles/*
+!.idea/codeStyles/Project.xml
+!.idea/codeStyles/codeStyleConfig.xml
+
+.vscode/*
+
+target/
+*.iml
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 3453ed1..4c8b30e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -5,6 +5,7 @@ repos:
rev: 1.17.0
hooks:
- id: yamlfix
+ args: [-c, .yamlfix.toml]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
@@ -24,12 +25,12 @@ repos:
name: Sensitive data leak - URLs
entry: (? **Note:** This is a template. Please make necessary changes and modify the template as per your needs. For reference please use the following resources.
-
# Repository Coding Standards
The purpose of the Coding Standards is to create a baseline for collaboration and review within various aspects of our open source project and community, from core code to themes to plugins.
@@ -10,13 +8,81 @@ Following the standards means anyone will be able to understand a section of cod
If you are planning to contribute, you need to familiarize yourself with these standards, as any code you submit will need to comply with them.
-## Language-specific Standards
-* Language 1
-* Language 2
+## Java Coding Standards and Best Practices
+
+This document outlines the coding standards and best practices to be followed when writing Java code for this project. Consistency in coding style and adherence to best practices not only improve code readability but also facilitate collaboration and maintenance.
+
+### Coding Standards Guidelines
+
+Please refer to the following coding standards guidelines for detailed recommendations:
+
+1. [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html) - Google's Java style guide offers comprehensive guidelines on coding style, naming conventions, documentation, and more.
+
+2. [Oracle's Java Code Conventions](https://www.oracle.com/java/technologies/javase/codeconventions-contents.html) - Oracle provides a set of conventions for writing Java code, covering formatting, naming conventions, and other aspects of coding style.
+
+### Linters
+
+We recommend using the following linters to enforce coding standards and best practices in your Java code:
+
+1. [Checkstyle](https://checkstyle.org/) - Checkstyle is a static code analysis tool that checks Java code against a set of coding standards. It can detect violations of coding conventions, potential bugs, and other code quality issues.
+
+2. [FindBugs](http://findbugs.sourceforge.net/) - FindBugs is a static analysis tool that detects potential bugs in Java code. It can identify common programming errors, performance issues, and security vulnerabilities.
+
+3. [PMD](https://pmd.github.io/) - PMD is a source code analyzer that finds common programming flaws like unused variables, empty catch blocks, and unnecessary object creation. It provides actionable feedback to improve code quality.
+
+4. [SpotBugs](https://spotbugs.github.io/) - SpotBugs is the successor of FindBugs, offering more features and improved bug detection capabilities. It performs static analysis to identify bugs and other issues in Java bytecode.
+
+## Python Coding Standards and Best Practices
+
+This document outlines the coding standards and best practices to be followed when writing Python code for this project. Consistency in coding style and adherence to best practices not only improve code readability but also facilitate collaboration and maintenance.
+
+### Coding Standards Guidelines
+
+Please refer to the following coding standards guidelines for detailed recommendations:
+
+1. [PEP 8](https://pep8.org/) - Python Enhancement Proposal 8 provides the de facto style guide for Python code, covering formatting, naming conventions, and more.
+
+2. [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html) - Google's Python style guide offers comprehensive guidelines on coding style, naming conventions, documentation, and more.
+
+### Linters
+
+We recommend using the following linters to enforce coding standards and best practices in your Python code:
+
+1. [flake8](https://flake8.pycqa.org/en/latest/) - Flake8 combines multiple linters including pycodestyle, pyflakes, and McCabe complexity checker to analyze your code against the PEP 8 style guide and detect various errors and inconsistencies.
+
+2. [pylint](https://pylint.pycqa.org/) - Pylint analyzes Python code for errors, potential bugs, and code smells, providing detailed reports with suggestions for improvement.
+
+3. [black](https://black.readthedocs.io/en/stable/) - Black is an opinionated code formatter for Python that automatically reformats your code to ensure consistent style adherence.
+
+4. [mypy](http://mypy-lang.org/) - Mypy is a static type checker for Python that helps detect and prevent type-related errors using optional static typing.
+
+
+## Docker Best Practices and Guidelines
+
+This document outlines the best practices and guidelines to be followed when working with Docker for this project. Adhering to these practices ensures consistency, security, and efficiency in Dockerfile and container management.
+
+### Best Practices Guidelines
+
+Please refer to the following best practices guidelines for detailed recommendations:
+
+1. [Docker Official Best Practices](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) - Docker's official documentation provides a comprehensive guide on best practices for writing Dockerfiles. It covers various aspects including image size optimization, layer caching, and security considerations.
+
+2. [Google Container Best Practices](https://cloud.google.com/solutions/best-practices-for-building-containers) - Google Cloud offers best practices for building and deploying containers, covering topics like image security, resource optimization, and container orchestration.
+
+3. [Red Hat Container Best Practices](https://www.redhat.com/en/topics/containers/container-best-practices) - Red Hat provides best practices for building and managing containers, focusing on security, performance, and scalability aspects.
+
+4. [Microsoft Dockerfile best practices](https://docs.microsoft.com/en-us/dotnet/architecture/microservices/docker-application-development-process/docker-app-development-workflow) - Microsoft offers best practices for Dockerfile development, including multi-stage builds, image tagging, and Docker Compose usage.
+
+### Linters and Static Analysis Tools
+
+While Dockerfiles are not typically linted like source code, you can use static analysis tools to ensure adherence to best practices and detect potential issues:
+
+1. [Hadolint](https://github.com/hadolint/hadolint) - Hadolint is a Dockerfile linter that checks Dockerfiles for common mistakes and best practices violations. It provides suggestions for improving Dockerfile quality and security.
+
+2. [Docker Bench for Security](https://github.com/docker/docker-bench-security) - Docker Bench for Security is a script that checks for dozens of common best-practices around deploying Docker containers in production.
+
+3. [Trivy](https://github.com/aquasecurity/trivy) - Trivy is a vulnerability scanner for containers and other artifacts, providing detailed reports on security vulnerabilities in Docker images.
-## Tool-specific Settings
-* Tool 1 settings
-* Tool 2 settings
+---
-For reference please check the following repos:
-* https://github.com/sbb-design-systems/sbb-angular/blob/main/CODING_STANDARDS.md
+This setup provides both the high-level guidelines for coding standards and best practices, as well as practical tools (linters) that can be used to enforce these standards in your project.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 17443c0..700d25a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,90 +1,56 @@
# Contributing
-> **Note:** This is a template for Contributing.md. Please make necessary changes in the links and content and modify the template as per your needs.
-
We appreciate all kinds of contributions. The following is a set of guidelines for contributing to this repository on GitHub.
These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
-#### Table Of Contents
-
-[Code of Conduct](#code-of-conduct)
+## Table Of Contents
+[Prerequisites](#prerequisites)
-[I just have a question!](#i-just-have-a-question)
+[Asking Questions](#asking-questions)
[What should I know before I get started?](#what-should-i-know-before-i-get-started)
* [Tools and Packages](#tools-and-packages)
* [Design Decisions](#design-decisions)
[How Can I Contribute?](#how-can-i-contribute)
-* [Issues and Bugs](#issue)
-* [Feature Requests](#feature)
-* [Pull Requests Guidelines](#submit-pr)
-* [Your First Code Contribution](#your-first-code-contribution)
-* [Coding Rules](#rules)
-* [Commit Message Guidelines](#commit)
-
-
-## Code of Conduct
-
-This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md).
-By participating, you are expected to uphold this code.
-
-
-## I just have a question!
-
-Please ask the questions in the discussions page.
+* [Reporting Bugs](#reporting-bugs)
+* [Suggesting Enhancements](#suggesting-enhancements)
+* [Submitting Changes](#submitting-changes)
+* [Commit Message Guidelines](#commit-message-guidelines)
+* [Coding Rules](#coding-rules)
-* [Github Discussions, the official message board](https://github.com/SchweizerischeBundesbahnen/open-source-repo-template/discussions)
+## Prerequisites
+This project and everyone participating in it are governed by our [Code of Conduct](https://github.com/SchweizerischeBundesbahnen/.github/blob/main/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
-## What should I know before I get started?
-
-### Tools and Packages
-Information or links about the tools and packages that need to be used.
-### Design Decisions
-Information or links about the Design Decisions or Design Architecture.
-
-## Found an Issue?
-If you find a bug in the source code or a mistake in the documentation, you can help us by
-[submitting an issue](#submit-issue) to our [GitHub Repository](https://github.com/SchweizerischeBundesbahnen/open-source-repo-template/issues/new). Including an issue
-reproduction (via StackBlitz, JsBin, Plunkr, etc.) is the absolute best way to help the team quickly
-diagnose the problem. Screenshots are also helpful.
-
-You can help the team even more and [submit a Pull Request](#submit-pr) with a fix.
-
-
-## Want a Feature?
-You can *request* a new feature by [submitting an issue](#submit-issue)
-to our [GitHub Repository](https://github.com/SchweizerischeBundesbahnen/open-source-repo-template/issues/new).
-If you would like to *implement* a new feature, please submit an issue with
-a proposal for your work first, to be sure that we can use it.
-Please consider what kind of change it is:
+## Asking questions
+Do not know how something in this project works? Curious if this project can achieve your desired functionality? Please ask questions in this project discussions [here](../../discussions)
-* For a **Major Feature**, first open an issue and outline your proposal so that it can be
- discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
- and help you to craft the change so that it is successfully accepted into the project.
-* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
+## How Can I Contribute?
+### Reporting Bugs
+To report a bug, [submit an issue](../../issues/new) with the labelย `bug`. Please ensure the bug has not already been reported.ย **If the bug is a potential security vulnerability, please report it using ourย [security policy](https://github.com/SchweizerischeBundesbahnen/.github/blob/main/SECURITY.md).**
-### Submitting an Issue
-If your issue appears to be a bug, and hasn't been reported, open a new issue.
-Providing the following information will increase the
-chances of your issue being dealt with quickly:
+Providing the following information will increase the chances of your issue being dealt with quickly:
* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
* **Toolchain and Environment Details** - which versions of libraries, toolchain, platform etc
-* **Motivation for or Use Case** - explain what are you trying to do and why the current behavior
- is a bug for you
+* **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you
* **Browsers and Operating System** - is this a problem with all browsers?
-* **Reproduce the Error** - provide a live example (using StackBlitz or similar) or a unambiguous set of steps
-* **Screenshots** - myybe screenshots can help the team
- triage issues far more quickly than a text description.
+* **Reproduce the Error** - provide a live example or a unambiguous set of steps
+* **Screenshots** - maybe screenshots can help the team to triage issues far more quickly than a text description
* **Related Issues** - has a similar issue been reported before?
-* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
- causing the problem (line of code or commit)
+* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be causing the problem (line of code or commit)
-You can file new issues by providing the above information [here](https://github.com/SchweizerischeBundesbahnen/open-source-repo-template/issues/new).
+You can help the team even more by [submitting changes](#submitting-changes) with a fix.
+### Suggesting Enhancements
+To suggest a feature or enhancement, please [submit an issue](../../issues/new) with the labelย `enhancement`. Please ensure the feature or enhancement has not already been suggested.
-### Submitting a Pull Request (PR)
+Please consider what kind of change it is:
+
+* For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
+* **Small Features** can be crafted and directly [submitted changes](#submitting-changes).
+
+### Submitting Changes
Before you submit your Pull Request (PR) consider the following guidelines:
* Make your changes in a new git branch:
@@ -94,17 +60,19 @@ Before you submit your Pull Request (PR) consider the following guidelines:
```
* Create your patch, **including appropriate test cases**.
-* Follow our [Coding Rules](#rules).
+* Follow our [Coding Rules](#coding-rules).
* Test your changes with our supported browsers and screen readers.
* Run tests and ensure that all tests pass.
* Commit your changes using a descriptive commit message that follows our
- [commit message conventions](#commit). Adherence to these conventions
+ [commit message conventions](#commit-message-guidelines). Adherence to these conventions
is necessary because release notes are automatically generated from these messages.
```shell
- git commit -a
+ git commit -a --gpg-sign
```
- Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
+ Note: The optional commit `-a` command line option will automatically "add" and "rm" edited files.
+
+ Note: The command line option `-S/--gpg-sign` generates a signed commit, which is required to make a contribution (See [Developer Certificate of Origin](./LICENSES/DCO.txt))
* Push your branch to GitHub:
@@ -113,28 +81,15 @@ Before you submit your Pull Request (PR) consider the following guidelines:
```
* In GitHub, send a pull request to `sbb-your-project:main`.
- The PR title and message should as well conform to the [commit message conventions](#commit).
+ The PR title and message should as well conform to the [commit message conventions](#commit-message-guidelines).
+
+### Commit Message Guidelines
+This project uses [Conventional Commits](https://www.conventionalcommits.org/) to generate the Changelog using the [Release Please GitHub action](.github/workflows/release-please.yml).
+For comprehensive information, please consult the [Release Please documentation](https://github.com/googleapis/release-please).
-## Coding Rules
+### Coding Rules
To ensure consistency throughout the source code, keep these rules in mind as you are working:
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
-* All public API methods **must be documented**.
-* Also see [CODING_STANDARDS](./CODING_STANDARDS.md)
-
-## Commit Message Guidelines
-
-This project uses [Conventional Commits](https://www.conventionalcommits.org/) to generate the changelog.
-As an example, please refer to: https://github.com/sbb-design-systems/sbb-angular
-
-
-## Your First Code Contribution
-
-Unsure where to begin contributing to Atom? You can start by looking through these `beginner` and `help-wanted` issues:
-
-* [Beginner issues][beginner] - issues which should only require a few lines of code, and a test or two.
-* [Help wanted issues][help-wanted] - issues which should be a bit more involved than `beginner` issues.
-
-## Attribution
-
-This CONTRIBUTING guideline is adapted from the [sbb-design-systems/sbb-angular](https://github.com/sbb-design-systems/sbb-angular)
\ No newline at end of file
+* All API methods **must be documented**.
+* Also see [CODING_STANDARDS.md](./CODING_STANDARDS.md)
diff --git a/LICENSE.md b/LICENSES/Apache.txt
similarity index 100%
rename from LICENSE.md
rename to LICENSES/Apache.txt
diff --git a/LICENSES/DCO.txt b/LICENSES/DCO.txt
new file mode 100644
index 0000000..49b8cb0
--- /dev/null
+++ b/LICENSES/DCO.txt
@@ -0,0 +1,34 @@
+Developer Certificate of Origin
+Version 1.1
+
+Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
+
+Everyone is permitted to copy and distribute verbatim copies of this
+license document, but changing it is not allowed.
+
+
+Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+(a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+(b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+(c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+(d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
diff --git a/LICENSES/SBB.txt b/LICENSES/SBB.txt
new file mode 100644
index 0000000..f1cdf0a
--- /dev/null
+++ b/LICENSES/SBB.txt
@@ -0,0 +1,14 @@
+Copyright 2024 SBB AG and contributors
+Version 1.0
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/README.md b/README.md
index c59e789..693a917 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,14 @@
+[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_html5diff&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_html5diff)
+[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_html5diff&metric=bugs)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_html5diff)
+[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_html5diff&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_html5diff)
+[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_html5diff&metric=coverage)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_html5diff)
+[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_html5diff&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_html5diff)
+[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_html5diff&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_html5diff)
+[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_html5diff&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_html5diff)
+[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_html5diff&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_html5diff)
+[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_html5diff&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_html5diff)
+[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_html5diff&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_html5diff)
+
This is a maintenance project of DaisyDiff in Java. The initial commit is a checkout of version 1.2 of [old DaisyDiff project](https://code.google.com/archive/p/daisydiff).
For more documentation see [daisydiff.github.io](https://daisydiff.github.io/).
@@ -37,7 +48,7 @@ public static void diffHTML(InputSource oldSource, InputSource newSource, Conten
/**
* Diffs two html files word for word as source, outputting the result to
* the specified consumer.
- */
+ */
public static void diffTag(String oldText, String newText, ContentHandler consumer) throws Exception;
}
diff --git a/RELEASE.md b/RELEASE.md
new file mode 100644
index 0000000..63bc60e
--- /dev/null
+++ b/RELEASE.md
@@ -0,0 +1,19 @@
+
+# Guidelines for Releases
+
+## Code Ownership and Automated Release Management
+
+Releases within our project are exclusively overseen by designated code owners, as outlined in the [/ .github / CODEOWNERS](/.github/CODEOWNERS) file. Our release process is automated using the Release Please GitHub action, which is configured in [/ .github / workflows / release-please.yml](/.github/workflows/release-please.yml).
+
+## Overview of the Workflow:
+
+1. For the initial release, the Release Please GitHub action generates a pull request entitled "chore(main): release 1.0.0", marking the commencement of version 1.0.0. This pull request necessitates approval as required.
+
+2. Following the triumphant launch of the initial version, the action automatically generates another pull request to advance the version to 1.0.1-SNAPSHOT. Prompt approval of this pull request is encouraged post the inaugural release.
+
+3. Whenever alterations are introduced to the main branch, the Release Please GitHub action dynamically creates or updates the existing pull request, titled "chore(main): release X.Y.Z", where X.Y.Z denotes the version calculated based on Git message history.
+
+4. Subsequent to each release, the process iterates to update the version to X.Y.Z-SNAPSHOT, thereby preparing a new pull request for the forthcoming X.Y.Z version release.
+
+
+For comprehensive information, please consult the [Release Please documentation](https://github.com/googleapis/release-please).
diff --git a/pom.xml b/pom.xml
index be34dce..17dd4d2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,6 +44,19 @@
3.3.1
3.2.7
+
+ 0.8.12
+ SchweizerischeBundesbahnen_${project.artifactId}
+ schweizerischebundesbahnen
+ ${project.artifactId}
+ https://sonarcloud.io
+ jacoco
+ reuseReports
+ java
+ ${project.basedir}/target/site/jacoco/jacoco.xml
+ true
+ true
+
1.7.0
true
@@ -258,5 +271,4 @@
-