Skip to content
Permalink
Browse files
[FLINK-22695] Update formatting guide
  • Loading branch information
zentol committed Jun 8, 2021
1 parent 734810c commit f611ab27429bc5d14ace81227037f0486add8299
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
@@ -10,7 +10,9 @@ title: "Apache Flink Code Style and Quality Guide — Formatting"

## Java Code Formatting Style

We recommend to set up the IDE to automatically check the code style. Please follow the [IDE setup guide](https://ci.apache.org/projects/flink/flink-docs-master/flinkDev/ide_setup.html#checkstyle-for-java) for that.
We recommend to set up the IDE to automatically check the code style. Please follow the [IDE guide](https://ci.apache.org/projects/flink/flink-docs-master/flinkDev/ide_setup.html) to set up
[spotless](https://ci.apache.org/projects/flink/flink-docs-master/flinkDev/ide_setup.html#code-formatting) and
[checkstyle](https://ci.apache.org/projects/flink/flink-docs-master/flinkDev/ide_setup.html#checkstyle-for-java).


### License
@@ -42,8 +44,7 @@ We recommend to set up the IDE to automatically check the code style. Please fol

### Whitespaces

* **Tabs vs. spaces.** We are using tabs for indentation, not spaces.
We are aware that spaces are a bit nicer; it just happened to be that we started with tabs a long time ago (because Eclipse’s default style used tabs then), and we tried to keep the code base homogeneous (not mix tabs and spaces).
* **Tabs vs. spaces.** We are using spaces for indentation, not tabs.
* **No trailing whitespace.**
* **Spaces around operators/keywords.** Operators (`+`, `=`, `>`, …) and keywords (`if`, `for`, `catch`, …) must have a space before and after them, provided they are not at the start or end of the line.

@@ -10,7 +10,9 @@ title: "Apache Flink Code Style and Quality Guide — Formatting"

## Java Code Formatting Style

We recommend to set up the IDE to automatically check the code style. Please follow the [IDE setup guide](https://ci.apache.org/projects/flink/flink-docs-master/flinkDev/ide_setup.html#checkstyle-for-java) for that.
We recommend to set up the IDE to automatically check the code style. Please follow the [IDE guide](https://ci.apache.org/projects/flink/flink-docs-master/flinkDev/ide_setup.html) to set up
[spotless](https://ci.apache.org/projects/flink/flink-docs-master/flinkDev/ide_setup.html#code-formatting) and
[checkstyle](https://ci.apache.org/projects/flink/flink-docs-master/flinkDev/ide_setup.html#checkstyle-for-java).


### License
@@ -42,8 +44,7 @@ We recommend to set up the IDE to automatically check the code style. Please fol

### Whitespaces

* **Tabs vs. spaces.** We are using tabs for indentation, not spaces.
We are aware that spaces are a bit nicer; it just happened to be that we started with tabs a long time ago (because Eclipse’s default style used tabs then), and we tried to keep the code base homogeneous (not mix tabs and spaces).
* **Tabs vs. spaces.** We are using spaces for indentation, not tabs.
* **No trailing whitespace.**
* **Spaces around operators/keywords.** Operators (`+`, `=`, `>`, …) and keywords (`if`, `for`, `catch`, …) must have a space before and after them, provided they are not at the start or end of the line.

0 comments on commit f611ab2

Please sign in to comment.