From 75b7845d44f4bf201beae01a9507dc68cffc8797 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 22 Nov 2020 10:59:42 +0000 Subject: [PATCH] Move contribution guidelines to a separate file Signed-off-by: Graham --- CONTRIBUTING.md | 68 ++++++++++++++++++++++++++++++++++++++++++++ README.md | 65 ------------------------------------------ all/build.gradle.kts | 1 + 3 files changed, 69 insertions(+), 65 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..71640ef1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,68 @@ +## Contributing to OpenRS2 + +## Introduction + +OpenRS2 is still in the early stages of development. The current focus is on +building underlying infrastructure, such as the deobfuscator, rather than +game content. This approach will make it much quicker to build game content in +the long run, but it does mean OpenRS2 won't be particularly useful in the short +term. + +If you're interested in contributing new features, you should discuss your +plans in our [Discord][discord] server first. I have rough plans in my head for +the future development direction. Communicating beforehand will avoid the need +for significant changes to be made at the code review stage and make it less +likely for your contribution to be dropped entirely. + +## Code style + +All source code must be formatted with [IntelliJ IDEA][idea]'s built-in +formatter before each commit. The 'Optimize imports' option should also be +selected. Do not select 'Rearrange entries'. + +OpenRS2's code style settings are held in `.idea/codeStyles/Project.xml` in the +repository, and IDEA should use them automatically after importing the Gradle +project. + +Kotlin code must pass all of [ktlint][ktlint]'s tests. + +Always use `//` for single-line comments and `/*` for multi-line comments. + +## Commit messages + +Commit messages should follow the ['seven rules'][commitmsg] described in +'How to Write a Git Commit Message', with the exception that the summary line +can be up to 72 characters in length (as OpenRS2 does not use email-based +patches). + +You should use tools like [interactive rebase][rewriting-history] to ensure the +commit history is tidy. + +## Developer Certificate of Origin + +OpenRS2 uses version 1.1 of the [Developer Certificate of Origin][dco] (DCO) to +certify that contributors agree to license their code under OpenRS2's license +(see the License section below). To confirm that a contribution meets the +requirements of the DCO, a `Signed-off-by:` line must be added to the Git +commit message by passing `--signoff` to the `git commit` invocation. + +If you intend to make a large number of contributions, run the following +commands from the repository root to add `Signed-off-by:` line to all your +commit messages by default: + +``` +echo -e "\n\nSigned-off-by: $(git config user.name) <$(git config user.email)>" > .git/commit-template +git config commit.template .git/commit-template +``` + +The full text of the DCO is available in the `DCO` file. + +OpenRS2 does not distribute any of Jagex's intellectual property, and care +should be taken to avoid inadvertently including any in contributions. + +[commitmsg]: https://chris.beams.io/posts/git-commit/#seven-rules +[dco]: https://developercertificate.org/ +[discord]: https://chat.openrs2.org/ +[idea]: https://www.jetbrains.com/idea/ +[ktlint]: https://github.com/pinterest/ktlint#readme +[rewriting-history]: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History diff --git a/README.md b/README.md index 15dd1833..3feec5c2 100644 --- a/README.md +++ b/README.md @@ -53,66 +53,6 @@ material from being accidentally included in the repository. Run `./gradlew` to download the dependencies, build the code, run the unit tests and package it. -## Contributing - -OpenRS2 is still in the early stages of development. The current focus is on -building underlying infrastructure, such as the deobfuscator, rather than -game content. This approach will make it much quicker to build game content in -the long run, but it does mean OpenRS2 won't be particularly useful in the short -term. - -If you're interested in contributing new features, you should discuss your -plans in our [Discord][discord] server first. I have rough plans in my head for -the future development direction. Communicating beforehand will avoid the need -for significant changes to be made at the code review stage and make it less -likely for your contribution to be dropped entirely. - -### Code style - -All source code must be formatted with [IntelliJ IDEA][idea]'s built-in -formatter before each commit. The 'Optimize imports' option should also be -selected. Do not select 'Rearrange entries'. - -OpenRS2's code style settings are held in `.idea/codeStyles/Project.xml` in the -repository, and IDEA should use them automatically after importing the Gradle -project. - -Kotlin code must pass all of [ktlint][ktlint]'s tests. - -Always use `//` for single-line comments and `/*` for multi-line comments. - -### Commit messages - -Commit messages should follow the ['seven rules'][commitmsg] described in -'How to Write a Git Commit Message', with the exception that the summary line -can be up to 72 characters in length (as OpenRS2 does not use email-based -patches). - -You should use tools like [interactive rebase][rewriting-history] to ensure the -commit history is tidy. - -### Developer Certificate of Origin - -OpenRS2 uses version 1.1 of the [Developer Certificate of Origin][dco] (DCO) to -certify that contributors agree to license their code under OpenRS2's license -(see the License section below). To confirm that a contribution meets the -requirements of the DCO, a `Signed-off-by:` line must be added to the Git -commit message by passing `--signoff` to the `git commit` invocation. - -If you intend to make a large number of contributions, run the following -commands from the repository root to add `Signed-off-by:` line to all your -commit messages by default: - -``` -echo -e "\n\nSigned-off-by: $(git config user.name) <$(git config user.email)>" > .git/commit-template -git config commit.template .git/commit-template -``` - -The full text of the DCO is available in the `DCO` file. - -OpenRS2 does not distribute any of Jagex's intellectual property, and care -should be taken to avoid inadvertently including any in contributions. - ### Versioning OpenRS2 uses [Semantic Versioning][semver]. @@ -130,19 +70,14 @@ OpenRS2 is available under the terms of the [ISC license][isc], which is similar to the 2-clause BSD license. The full copyright notice and terms are available in the `LICENSE` file. -[commitmsg]: https://chris.beams.io/posts/git-commit/#seven-rules -[dco]: https://developercertificate.org/ [discord-badge]: https://img.shields.io/discord/684495254145335298 [discord]: https://chat.openrs2.org/ [drone-badge]: https://build.openrs2.org/api/badges/openrs2/openrs2/status.svg [drone]: https://build.openrs2.org/openrs2/openrs2/ -[idea]: https://www.jetbrains.com/idea/ [isc-badge]: https://img.shields.io/badge/license-ISC-informational [isc]: https://opensource.org/licenses/ISC [issue-tracker]: https://git.openrs2.org/openrs2/openrs2/issues [jdk]: https://jdk.java.net/ [kdoc]: https://docs.openrs2.org/ -[ktlint]: https://github.com/pinterest/ktlint#readme -[rewriting-history]: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History [semver]: https://semver.org/ [www]: https://www.openrs2.org/ diff --git a/all/build.gradle.kts b/all/build.gradle.kts index 3fac46ef..015a2b3f 100644 --- a/all/build.gradle.kts +++ b/all/build.gradle.kts @@ -77,6 +77,7 @@ distributions { contents { from("$buildDir/AUTHORS") + from("$rootDir/CONTRIBUTING.md") from("$rootDir/DCO") from("$rootDir/LICENSE") from("$rootDir/README.md")