Want to contribute? That's great!
With this document we try to make that process easier, since every contribution, even the smaller ones, are more than welcome.
All original contributions to Hyperfoil are licensed under the Apache License, version 2.0 or later, or, if another license is specified as governing the file or directory being modified, such other license.
This project uses GitHub issues to manage the issues. Open an issue directly in GitHub.
If you believe you found a bug, and it's likely possible, please indicate a way to reproduce it, what you are seeing and what you would expect to see. Don't forget to indicate your Hyperfoil version and environment, e.g., Java version.
Hyperfoil has a strictly enforced code style. Code formatting is done by the Eclipse code formatter, using the config
files found in the config/
directory. By default, when you run mvn install
, the code will
be formatted automatically. When submitting a pull request the CI build will fail if running the formatter results in
any code changes, so it is recommended that you always run a full Maven build before submitting a pull request.
If you want to run the formatting without doing a full build, you can run mvn process-sources
.
Open the Preferences window, and then navigate to Java -> Code Style -> Formatter. Click Import and then
select the eclipse-formatting.xml
file in the config/
directory.
Next navigate to Java -> Code Style -> Organize Imports. Click Import and select the eclipse.importorder
file.
Open the Preferences window (or Settings depending on your edition), navigate to Plugins and install the Adapter for Eclipse Code Formatter from the Marketplace.
Restart your IDE, open the Preferences (or Settings) window again and navigate to Adapter for Eclipse Code Formatter section on the left pane.
Select Use Eclipse's Code Formatter, then change the Eclipse workspace/project folder or config file to point to the
eclipse-formatting.xml
file in the config/
directory. Make sure the Optimize Imports box is
ticked. Then, select Import Order from file and make it point to the eclipse.importorder
file in the config/
directory.
Next, disable wildcard imports:
navigate to Editor -> Code Style -> Java -> Imports
and set Class count to use import with '*' to 999
. Do the same with Names count to use static import with '*'.
If you want to be sure that the formatting is properly executed before committing, you can make use of the pre-commit
hook found in the config/
directory. To automate it, just copy that file in the git hooks directory by running
cp config/pre-commit .git/hooks/
from the root of this repository.