summaryrefslogtreecommitdiff
path: root/doc/coding_standards.md
diff options
context:
space:
mode:
authorPoojaChandak <poojachandak002@gmail.com>2020-11-06 11:33:40 +0100
committerJens Geyer <jensg@apache.org>2020-11-10 21:34:43 +0100
commit20205b85fa4541a4276328fc31b1cd2ff8310d42 (patch)
treed748f8a6137c0cde2d6314945b8b51efb1ded760 /doc/coding_standards.md
parent05bb55148608b4324a8c91c21cf9a6a0dff282fa (diff)
downloadthrift-20205b85fa4541a4276328fc31b1cd2ff8310d42.tar.gz
Grammatical/Typo changes
Patch: Pooja Chandak This closes #2271
Diffstat (limited to 'doc/coding_standards.md')
-rw-r--r--doc/coding_standards.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/coding_standards.md b/doc/coding_standards.md
index 308100ab0..a8c7b6039 100644
--- a/doc/coding_standards.md
+++ b/doc/coding_standards.md
@@ -6,18 +6,18 @@
The purpose of this document is to make everyone's life easier.
-It's easier when you read good, well formatted, with clearly defined purpose, code.
+It's easier when you read good, well-formatted, with a clearly defined purpose, code.
But the only way to read clean code is to write such.
This document can help achieve that, but keep in mind that
those are not silver-bullet, fix-all-at-once rules. Just think about readability while writing code.
-Write code like you would have to read it in ten years from now.
+Write code like you would have to read it ten years from now.
## General Coding Standards
Thrift has some history. Not all existing code follows those rules.
But we want to improve over time.
-When making small change / bugfix - like single line fix - do *not* refactor whole function.
+When making a small change / bugfix - like a single line fix - do *not* refactor the whole function.
That disturbs code repository history.
Whenever adding something new and / or making bigger refactoring
- follow those rules as strictly as you can.
@@ -26,23 +26,23 @@ When in doubt - contact other developers (using dev@ mailing list or IRC).
Code review is the best way to improve readability.
### Basics
- * Use spaces not tabs
+ * Use spaces, not tabs
* Use only ASCII characters in file and directory names
- * Commit to repository using Unix-style line endings (LF)
+ * Commit to the repository using Unix-style line endings (LF)
On Windows:
git config core.autocrlf true
* Maximum line width - 100 characters
* If not specified otherwise in language specific standard - use 2 spaces as indent/tab
### Comments
- * Each file has to start with comment containing [Apache License](http://www.apache.org/licenses/LICENSE-2.0)
- * Public API of library should be documented, preferably using format native for language specific documentation generation tools (Javadoc, Doxygen etc.)
+ * Each file has to start with a comment containing [Apache License](http://www.apache.org/licenses/LICENSE-2.0)
+ * Public API of a library should be documented, preferably using format native for language-specific documentation generation tools (Javadoc, Doxygen etc.)
* Other comments are discouraged - comments are lies. When one has to make comment it means one failed to write readable code. Instead of "I should write a comment here" think "I should clean it up"
* Do not leave "TODO/FIXME" comments - file [Jira](http://issues.apache.org/jira/browse/THRIFT) issue instead
### Naming
Finding proper names is the most important and most difficult task in software development.
-## Language Specific Coding Standards
+## Language-Specific Coding Standards
For detailed information see `lib/LANG/coding_standards.md`