From 4ddc092aaacbaff5f806cab1326511dc9e02a6a5 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Fri, 26 Oct 2018 10:40:42 -0400 Subject: [PATCH] Contributing: Clarify width of snippets Clarifies the width rules for snippets. --- CONTRIBUTING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fcfb14b2b7979..b77d53be2dc86 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -159,7 +159,9 @@ Please follow these formatting guidelines: * Java indent is 4 spaces * Line width is 140 characters -* Line width for code snippets that are included in the documentation (the ones surrounded by `// tag` and `// end` comments) is 76 characters +* Lines of code surrounded by `// tag` and `// end` comments are included in the +documentation and should only be 76 characters wide not counting +leading indentation * The rest is left to Java coding standards * 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. * Wildcard imports (`import foo.bar.baz.*`) are forbidden and will cause the build to fail. This can be done automatically by your IDE: