Skip to content

Commit

Permalink
Merge pull request iluwatar#119 from iluwatar/iluwatar-patch-1
Browse files Browse the repository at this point in the history
Update contribution instructions
  • Loading branch information
grzesiekkedzior authored Jan 10, 2022
2 parents abb70cb + 5691389 commit 6b93ba9
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,36 @@ For new snippets the general implementation steps are:
* Submit pull request against `master` branch.

In case you are a first-time contributor and would like to become familiar with working in Github, check out the tutorial in this [repository](https://github.com/firstcontributions/first-contributions).

## Building the project

Building the project's `master` branch is straightforward.

```
./gradlew clean
./gradlew build
```


## Checkstyle

The project uses Checkstyle and sometimes the build can fail due to rule violations, e.g.

```
> Task :checkstyleTest FAILED
[ant:checkstyle] [WARN] /home/ilkka/30-seconds-of-java/src/test/java/math/GenerateRandomNumbersSnippetTest.java:24: 'package' should be separated from previous statement. [EmptyLineSeparator]
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':checkstyleTest'.
> Checkstyle rule violations were found. See the report at: file:///home/ilkka/30-seconds-of-java/build/reports/checkstyle/test.html
Checkstyle files with violations: 1
Checkstyle violations by severity: [warning:1]
```

The violations are easy check and fix using the indicated report file. IDEs also have Checkstyle plugins for better developer experience.

## License check

The project is configured to check that the source code files have proper license headers. When new source code files are added, they should also contain the license headers. It's easy to copy-paste them from other files or even better to use the Gradle license formatting plugin e.g. `./gradlew licenseFormat` to add missing license headers.

0 comments on commit 6b93ba9

Please sign in to comment.