Skip to content
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

Supplementary explanation for code snippets line width #34796

Merged
merged 2 commits into from
Oct 25, 2018
Merged

Supplementary explanation for code snippets line width #34796

merged 2 commits into from
Oct 25, 2018

Conversation

wangzhenhui1992
Copy link
Contributor

@wangzhenhui1992 wangzhenhui1992 commented Oct 24, 2018

Add "Line width for code snippets is 76 characters" to Java Language Formatting Guidelines

For issue #34795

Add "Line width for code snippets is 76 characters" to  Java Language Formatting Guidelines
Copy link
Member

@cbuescher cbuescher left a comment

Choose a reason for hiding this comment

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

Hi @wangzhenhui1992,

thanks for opening the issue and this PR. I agree it would be helpful to document the line length restrictions for code snippets somewhere. I think doing this here in CONTRIBUTING.md is a good start, but I want to suggest adding a little bit of context since the 76 character limit is only necessary for code snippets that are included in the documentation (the ones surrounded by // tag and // end comments). While this might be clear to somebody who has already written these code snippets, it might be confusing to people just working in the regular code base. I would suggest adding a short additional sentence for clarification, without going to much into detail.

@cbuescher cbuescher self-assigned this Oct 24, 2018
@wangzhenhui1992
Copy link
Contributor Author

@cbuescher
Thank you for your advice and of course it is better.

@colings86 colings86 added >docs General docs changes :Docs labels Oct 24, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs

code snipptes that are included in the documentation (the ones surrounded by `// tag` and `// end` comments)
@wangzhenhui1992
Copy link
Contributor Author

@cbuescher I have added the additional sentence and review please.

Copy link
Member

@cbuescher cbuescher left a comment

Choose a reason for hiding this comment

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

Thanks @wangzhenhui1992, this looks good to me now. I will merge to master and the latest release branch.

@cbuescher cbuescher merged commit d6dc62e into elastic:master Oct 25, 2018
cbuescher pushed a commit that referenced this pull request Oct 25, 2018
Add "Line width for code snippets is 76 characters" to  Java Language Formatting Guidelines
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Oct 26, 2018
* master: (74 commits)
  XContent: Check for bad parsers (elastic#34561)
  Docs: Align prose with snippet (elastic#34839)
  document the search context is freed if the scroll is not extended (elastic#34739)
  Test: Lookup node versions on rest test start (elastic#34657)
  SQL: Return error with ORDER BY on non-grouped. (elastic#34855)
  Reduce channels in AbstractSimpleTransportTestCase (elastic#34863)
  [DOCS] Updates Elasticsearch monitoring tasks (elastic#34339)
  Check self references in metric agg after last doc collection (elastic#33593) (elastic#34001)
  [Docs] Add `indices.query.bool.max_clause_count` setting (elastic#34779)
  Add 6.6.0 version to master (elastic#34847)
  Test: ensure char[] doesn't being with prefix (elastic#34816)
  Remove static import from HLRC doc snippet (elastic#34834)
  Logging: server: clean up logging (elastic#34593)
  Logging: tests: clean up logging (elastic#34606)
  SQL: Fix edge case: `<field> IN (null)` (elastic#34802)
  [Test] Mute FullClusterRestartIT.testShrink() until test is fixed
  SQL: Introduce ODBC mode, similar to JDBC (elastic#34825)
  SQL: handle X-Pack or X-Pack SQL not being available in a more graceful way (elastic#34736)
  [Docs] Add explanation for code snippets line width (elastic#34796)
  CCR: Rename follow-task parameters and stats (elastic#34836)
  ...
kcm pushed a commit that referenced this pull request Oct 30, 2018
Add "Line width for code snippets is 76 characters" to  Java Language Formatting Guidelines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants