Skip to content

Latest commit

 

History

History
85 lines (58 loc) · 4.78 KB

CONTRIBUTING.adoc

File metadata and controls

85 lines (58 loc) · 4.78 KB

Contributing to Chaos Monkey for Spring Boot

This document should help you get started if you want to contribute or hack on the code.

This is your first contribution to an open source project? You can learn how to fork a project and how to create your first Pull Request from the excellent First Contributions initiative.

If you are unsure where to start, please head over to our Issue Tracker where we have marked good beginner friendly issues.

Using GitHub Issues

We are using GitHub issues to track bugs, improvements and new features. If you have a general question on how to use Chaos Monkey for Spring Boot, please ask on Stack Overflow using the tag #spring-boot-chaos-monkey.

Reporting Bugs

Please help us to speed up problem diagnosis by providing as much information as possible. A small sample project that reproduces the error would be optimal for us.

Requests for Improvements & New Features

New Pull Requests are highly welcome. However, before you provide us with a PR, please consider opening an issue using our GitHub issue tracker. This gives us the possibility to discuss the changes in details. If you’re interested in an improvement or a new feature, try to provide us with your use case.

Reporting Security Vulnerabilities

If you found a security vulnerability please do not disclosure it publicly until we had a chance to fix it.

Please do not use our issue tracker for security vulnerabilities you found. Instead use [email protected] to disclose them responsibly. You can use our public PGP (Fingerprint: 0x8921EEE5722496E4) key to encrypt your communication if needed.

Project Setup

Fork and clone the repository

Note

To keep your fork in sync with the main project, link your main branch to the main repositories main branch. Do this by:

git remote add upstream https://github.com/codecentric/chaos-monkey-spring-boot.git

To fetch upstream changes switch to your main branch with git checkout main and then run git pull upstream main.

Chaos Monkey for Spring Boot is a Java based Spring Boot plugin. On Unix based systems we recommend using sdkman to manage your Java installations. On Windows we recommend using scoop with the Java Bucket to manage your Java installations.

In order to work with the code you need to use Maven. Chaos Monkey for Spring Boot uses the Maven Wrapper. To build and test the code you can run

./mvnw clean verify

We also use project Lombok in our codebase. Please consult their setup page to see how you can install the plugin for your favorite IDE.

We use a custom eclipse code style to format our code consistently. The code style is enforced via Spotless. A check for style violations can be run via ./mvnw spotless:check. Use ./mvnw spotless:apply to fix these violations.

Note

./mvnw verify also runs spotless while ./mvnw test does not.

IntelliJ Setup

If you’re using IntelliJ then we highly recommend installing our code style.

Note

Installation of code style:

Under File → Settings → Editor → Code Style (Windows) or Preferences → Editor → Code Style (OSX) press the gear button and choose Import SchemeEclipse XML Profile. Then, select the code-style.xml (in the root of the repository) file and Apply the style.

Working With The Code

Considering these recommendations will help us in getting your pull request merged.

  • Document your changes. This includes in code documentation but also user documentation.

  • Test your changes. Use ./mvnw verify to run all build pipeline checks.

  • It would be great to follow Chris Beam’s recommendations on How to Write a Git Commit Message.

  • Please update the Changes section.

  • Please make sure to run the tests before you commit your changes. Using Maven you can run ./mvnw verify which will run all tests and checks when you run the command in the root folder of the repository.