Skip to content

Commit 2aab0a3

Browse files
committed
Contributing: Clarify width of snippets (#34910)
Clarifies the width rules for snippets.
1 parent 3e80a67 commit 2aab0a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ Please follow these formatting guidelines:
154154

155155
* Java indent is 4 spaces
156156
* Line width is 140 characters
157-
* Line width for code snippets that are included in the documentation (the ones surrounded by `// tag` and `// end` comments) is 76 characters
157+
* Lines of code surrounded by `// tag` and `// end` comments are included in the
158+
documentation and should only be 76 characters wide not counting
159+
leading indentation
158160
* The rest is left to Java coding standards
159161
* Disable “auto-format on save” to prevent unnecessary format changes. This makes reviews much harder as it generates unnecessary formatting changes. If your IDE supports formatting only modified chunks that is fine to do.
160162
* Wildcard imports (`import foo.bar.baz.*`) are forbidden and will cause the build to fail. This can be done automatically by your IDE:

0 commit comments

Comments
 (0)