Skip to content

Latest commit

 

History

History
86 lines (60 loc) · 4.79 KB

CONTRIBUTING.adoc

File metadata and controls

86 lines (60 loc) · 4.79 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 master branch to the main repositories master branch. Do this by:

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

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

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 you can fallback to installing Java Development Kit 8 or higher directly.

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 are using the Google Style Guide. The style guide 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 the Google Style Guide file. Download the file code style file.

Note

Installation of code style (download the file first):

Under File → Settings → Editor → Code Style (Windows) or Preferences → Editor → Code Style (OSX) press the gear button and choose Import Scheme. Then, select the downloaded theme file and Apply the style.

Working With The Code

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

  • Add the ASF license header comment to all new .java files (you can copy from existing files in the project).

  • Add yourself as an @author to the .java files you modify.

  • 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.