This is StackSpot IntelliJ Plugin contributing guide. Please read the following sections to learn how to ask questions and how to work on something in order to improve our project.
👋Welcome!
1.1. Code of Conduct
1.2. Legal
2.3. Code reviews
3.1. First contribution
3.3. Adding a new feature
3.4. Before open an issue
3.5. Opening a new issue
3.7. Did you find a bug?
4. Community
Please follow the Code of Conduct in all your interactions with our project.
As you contribute, keep in mind that the code, docs and other materials submitted to open source projects are usually considered licensed under the same terms as the rest of the work.
-
StackSpot IntelliJ Plugin is licensed over ASF - Apache License, version 2, so new files must have the ASL version 2 header. For more information, please check out Apache license.
-
You should configure a pre-commit Githook in your local machine, so it will help you not commit files without a license header. Please check out more about Githooks.
-
All contributions are subject to the Developer Certificate of Origin (DCO). When you commit, use the
**-s**
option to include the Signed-off-by line at the end of the commit log message. At the root of this repository, you will find the DCO text verbatim in the dco.txt file. You should config a pre-push Githook in your local machine to help you not push without DCO Sign Off. For more information, check out GitHooks.
Check out the requisites before contributing to StackSpot IntelliJ Plugin:
- IntelliJ IDEA 2022.1
- JDK 11
All your submissions needs a review before being merged.
All submissions must go through our CI pipeline to ensure StackSpot IntelliJ Plugin is always stable. This is part of the process of making changes and includes everyone, even StackSpot IntelliJ Plugin core team members.
- StackSpot IntelliJ Plugin CI is based on GitHub Actions so you are able to execute it on your own fork too and all pushes or pull requests to the main branch will be checked. It is a good way to get some feedback before get back your changes to original StackSpot IntelliJ Plugin repo.
After forking StackSpot IntelliJ Plugin repo, you must go to ’Actions’ tab (on your own fork) and push the big green button. That’s it!
This is a security layer for the project and for the developers. It is mandatory.
Follow one of these two methods to add DCO to your commits:
1. Command line Follow the steps: Step 1: Configure your local git environment adding the same name and e-mail configured at your GitHub account. It helps to sign commits manually during reviews and suggestions.
git config --global user.name “Name”
git config --global user.email “email@domain.com.br”
Step 2: Add the Signed-off-by line with the '-s'
flag in the git commit command:
$ git commit -s -m "This is my commit message"
2. GitHub website
You can also manually sign your commits during GitHub reviews and suggestions, follow the steps below:
Step 1: When the commit changes box opens, manually type or paste your signature in the comment box, see the example:
Signed-off-by: Name < e-mail address >
For this method, your name and e-mail must be the same registered on your GitHub account.
See the guidelines to submit your changes:
Contributing to a new feature is only allowed in the main repository.
- Make sure your branch is based on main;
- Update the documentation if applicable.
- Open a new GitHub pull request with the new code.
- Ensure the PR description clearly describes the new feature, including the issue number.
-
Check out if you are on the latest version. If you’re not, your problem may have been solved already.
-
Search under the project's issues and make sure it’s not a known bug.
If you can't find an open issue for your bug/problem, please open a new one.
Your issue must have:
- A clear title and description with relevant information;
- StackSpot IntelliJ Plugin`s version you are using;
- A description of the environment where StackSpot IntelliJ Plugin is running;
- A code example (if applicable) or an executable test case that demonstrates the problem;
- A bug label.
Follow the steps:
Step 1. Click ‘Fork’ on Github, creating e.g. yourname/stackspot-intellij-plugin;
Step 2. Clone your project: git clone git@github.com:yourname/stackspot-intellij-plugin
;
Step 3. Run the command cd stackspot-intellij-plugin
Step 4. Configure the environment(s) for module(s) that you are collaborating
Step 5. Create a branch: git checkout -b your_branch source_branch
Step 6. Test, code, test again and repeat;
Step 7. Commit your changes: git commit -s -m "My wonderful new evolution"
(don’t forget the -s
flag);
Step 8. Rebase from original repo: git pull --rebase upstream source_branch
;
Step 9. Push your commit to get it back up to your fork: git push origin your_branch
.
Follow the steps to write a bug fix:
Step 1. Make sure your branch is based on the branch of the version where the bug was first introduced;
Step 2. Follow the tutorial How to make a change suggestion?;
Step 3. Open a new GitHub pull request with the patch;
Step 4. Check the PR description, it needs to describe the problem and solution, including the issue number.
Thank you for considering evoluting StackSpot IntelliJ Plugin!!!:heart::heart::heart:
Keep evolving.
StackSpot IntelliJ Plugin team