Skip to content

Commit

Permalink
Convert Markdown to Asciidoc where possible
Browse files Browse the repository at this point in the history
Merged-by: Martin Grzenia <[email protected]>
  • Loading branch information
swltr authored and martingr committed Oct 29, 2024
1 parent f63de56 commit 1911e5a
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 103 deletions.
10 changes: 5 additions & 5 deletions .idea/codeStyles/README.md → .idea/codeStyles/README.adoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-FileCopyrightText: The openTCS Authors
// SPDX-License-Identifier: CC-BY-4.0

= Changelog

The changelog is maintained in link:./opentcs-documentation/src/docs/release-notes/changelog.adoc[opentcs-documentation/src/docs/release-notes/changelog.adoc].
8 changes: 0 additions & 8 deletions CHANGELOG.md

This file was deleted.

65 changes: 28 additions & 37 deletions CODE_OF_CONDUCT.md → CODE_OF_CONDUCT.adoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<!--
SPDX-FileCopyrightText: The openTCS Authors
SPDX-License-Identifier: CC-BY-4.0
-->
// SPDX-FileCopyrightText: The openTCS Authors
// SPDX-License-Identifier: CC-BY-4.0

# openTCS Code of Conduct
= openTCS Code of Conduct

## Our Pledge
== Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
Expand All @@ -17,7 +15,7 @@ and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards
== Our Standards

Examples of behavior that contributes to a positive environment for our
community include:
Expand All @@ -41,7 +39,7 @@ Examples of unacceptable behavior include:
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
== Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
Expand All @@ -53,15 +51,15 @@ comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope
== Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement
== Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
Expand All @@ -71,68 +69,61 @@ All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines
== Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction
=== 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
*Community Impact*: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
*Consequence*: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning
=== 2. Warning

**Community Impact**: A violation through a single incident or series
*Community Impact*: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
*Consequence*: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban
=== 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
*Community Impact*: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
*Consequence*: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban
=== 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
*Community Impact*: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
*Consequence*: A permanent ban from any sort of public interaction within
the community.

## Attribution
== Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
This Code of Conduct is adapted from the https://www.contributor-covenant.org[Contributor Covenant],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
https://github.com/mozilla/diversity[Mozilla's code of conduct enforcement ladder].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

https://www.contributor-covenant.org/faq. Translations are available
at https://www.contributor-covenant.org/translations.
66 changes: 32 additions & 34 deletions CONTRIBUTING.md → CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
@@ -1,45 +1,43 @@
<!--
SPDX-FileCopyrightText: The openTCS Authors
SPDX-License-Identifier: CC-BY-4.0
-->
// SPDX-FileCopyrightText: The openTCS Authors
// SPDX-License-Identifier: CC-BY-4.0

# Contributing to openTCS
= Contributing to openTCS

The following is a set of guidelines for contributing to openTCS.

This project is maintained by the openTCS development team of [Fraunhofer IML](https://www.iml.fraunhofer.de/en.html).
A public mirror of the development repository is available at [GitHub](https://github.com/opentcs/opentcs).
This project is maintained by the openTCS development team of https://www.iml.fraunhofer.de/en.html[Fraunhofer IML].
A public mirror of the development repository is available at https://github.com/opentcs/opentcs[GitHub].

You are very welcome to contribute to this project when you find a bug, want to suggest an improvement, or have an idea for a useful feature.
For this, please always create an issue and/or a pull request, and follow our style guides as described below.

## Issues
== Issues

It is required to create an issue if you want to integrate a bugfix, improvement, or feature.
Briefly and clearly describe the purpose of your contribution in the corresponding issue, using the appropriate template for it.

## Pull requests / merge requests
== Pull requests / merge requests

Pull requests fixing bugs, adding new features or improving the quality of the code and/or the documentation are very welcome!
To contribute changes, please follow these steps:

1. Before putting any significant amount of work into changes you want to make, get in touch with the maintainers.
Informing and coordinating helps to avoid conflicts with other changes made elsewhere.
If there already is an issue or a forum discussion related to the intended changes, announce your will to work on it there; if there isn't, yet, create one.
(Specific bug reports and feature/improvement suggestions should be handled in issues; loose ideas should be discussed in the forum first.)
2. Fork the repository and create a new branch for your changes.
3. Make your changes in the new branch, adhering to the coding guidelines.
4. If your changes add a new feature, consider adding documentation for it to the user's guide or the developer's guide.
If your changes change an existing feature's behaviour, check these documents and update them if necessary.
5. If your changes affect users, document them in the [changelog](opentcs-documentation/src/docs/release-notes/changelog.adoc).
6. Push your branch to your forked repository.
7. Open a pull request against the main repository's main branch.
1. Fill out the pull request template and provide a clear description of your changes and the problem they solve.
2. Provide a commit message for the pull request, adhering to the commit message guidelines described below.
. Before putting any significant amount of work into changes you want to make, get in touch with the maintainers.
Informing and coordinating helps to avoid conflicts with other changes made elsewhere.
If there already is an issue or a forum discussion related to the intended changes, announce your will to work on it there; if there isn't, yet, create one.
(Specific bug reports and feature/improvement suggestions should be handled in issues; loose ideas should be discussed in the forum first.)
. Fork the repository and create a new branch for your changes.
. Make your changes in the new branch, adhering to the coding guidelines.
. If your changes add a new feature, consider adding documentation for it to the user's guide or the developer's guide.
If your changes change an existing feature's behaviour, check these documents and update them if necessary.
. If your changes affect users, document them in the link:opentcs-documentation/src/docs/release-notes/changelog.adoc[changelog].
. Push your branch to your forked repository.
. Open a pull request against the main repository's main branch.
.. Fill out the pull request template and provide a clear description of your changes and the problem they solve.
.. Provide a commit message for the pull request, adhering to the commit message guidelines described below.

When contributing, keep unrelated changes in separate pull requests!

### Commit message guidelines
=== Commit message guidelines

When writing commit messages, please follow these guidelines:

Expand All @@ -53,17 +51,17 @@ When writing commit messages, please follow these guidelines:

Example:

```
----
Make vehicle energy level thresholds configurable
Allow a vehicle's set of energy level thresholds to be modified during
runtime via the Operations Desk application and the web API.
Co-authored-by: Martin Grzenia <[email protected]>
Co-authored-by: Stefan Walter <[email protected]>
```
----

## Coding guidelines
== Coding guidelines

In general, please adhere to the following guidelines to maintain code consistency, readability, and quality:

Expand All @@ -77,19 +75,19 @@ The following subsections contain a few more detailed guidelines we consider imp
Note that parts of the existing code may not fully adhere to these rules, yet.
When updating such code, do improve it by applying the guidelines where it makes sense, but avoid modifying large unrelated sections.

### Primary formatting rules
=== Primary formatting rules

For consistent formatting of the project's code, [Spotless](https://github.com/diffplug/spotless) is used.
For consistent formatting of the project's code, https://github.com/diffplug/spotless[Spotless] is used.
After making changes, make sure you run `./gradlew spotlessApply` to re-format the code.

### Automatic tests
=== Automatic tests

* New or changed non-trivial code should be covered by tests.
* This project uses [JUnit](https://junit.org/) for unit testing.
* This project uses https://junit.org/[JUnit] for unit testing.
* JUnit test classes and methods should omit the `public` modifier unless there is a technical reason for adding it.
* For assertions, `assertThat()` should be preferred over `assertTrue()`, as the former provides more information when failing.

### Check preconditions in subroutines
=== Check preconditions in subroutines

Methods belonging to a class's interface, i.e. `public` or `protected` methods, should check their preconditions.
They should at least check their input parameters for validity:
Expand All @@ -102,14 +100,14 @@ They should at least check their input parameters for validity:
Checking the object's internal state may also make sense for a method.
For such checks, `org.opentcs.util.Assertions.checkState()` should be used.

### Avoid single-use local variables
=== Avoid single-use local variables

Declaring local variables in subroutines that are then used only once creates unnecessary noise for the reader of the code.
In many cases, eliminating the variable by inlining its value improves the readability of the code.

## Development setup
== Development setup

### IDE: NetBeans
=== IDE: NetBeans

To build the project from NetBeans, register a Java platform named "JDK 21 - openTCS" (without the quotes) within NetBeans.
This JDK will be used by NetBeans for running the build process.
Loading

0 comments on commit 1911e5a

Please sign in to comment.