Skip to content

Code styles #253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,22 @@ All PRs have to be reviewed and signed off by another developer before being mer
branch. This review will likely ask for some changes to the code - please don't be alarmed or upset
at this; it is expected that all PRs will need tweaks and a normal part of the process.

The PRs are checked to be compliant with the Java Google code style.

Be aware that all Operator SDK code is released under the [Apache 2.0 licence](LICENSE).

### Thanks
## Development environment setup

### Code style

The SDK modules and samples are formatted to follow the Java Google code style.
On every `compile` the code gets formatted automatically,
however, to make things simpler (i.e. avoid getting a PR rejected simply because of code style issues), you can import one of the following code style schemes based on the IDE you use:

- for *Intellij IDEA* import [contributing/intellij-google-style.xml](contributing/intellij-google-style.xml)
- for *Eclipse* import [contributing/eclipse-google-style.xml](contributing/eclipse-google-style.xml)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we will need to add the precise instructions on how to add the styles to the IDE at some point but let's go with this for now.

## Thanks

These guidelines were best on several sources, including
[Atom](https://github.com/atom/atom/blob/master/CONTRIBUTING.md), [PurpleBooth's
Expand Down
337 changes: 337 additions & 0 deletions contributing/eclipse-google-style.xml

Large diffs are not rendered by default.

Loading