Skip to content

Commit 083e2e6

Browse files
slickepinneheyvaleriapurinkleTresor11
authored
Update general guideline (#746)
* Update general guideline Co-authored-by: Valeria Graffeo <valeria@thoughtbot.com> Co-authored-by: Rob Whittaker <rob@thoughtbot.com> Co-authored-by: Trésor Bireke <tresor@thoughtbot.com> * Move spaces around operators guideline back to general --------- Co-authored-by: Valeria Graffeo <valeria@thoughtbot.com> Co-authored-by: Rob Whittaker <rob@thoughtbot.com> Co-authored-by: Trésor Bireke <tresor@thoughtbot.com>
1 parent be9343c commit 083e2e6

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

general/README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,12 @@ violations.
1919

2020
## Formatting
2121

22-
- Avoid inline comments.
2322
- Break long lines after 80 characters.
24-
- Delete trailing whitespace.
23+
- Delete trailing spaces.
2524
- Don't misspell.
26-
- Use empty lines around multi-line blocks.
27-
- Use spaces around operators, except for unary operators, such as `!`.
2825
- Use [Unix-style line endings] (`\n`).
29-
- Use [uppercase for SQL key words and lowercase for SQL identifiers].
26+
- Use spaces around operators, except for unary operators, such as `!`.
3027

31-
[uppercase for sql key words and lowercase for sql identifiers]: http://www.postgresql.org/docs/9.2/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
3228
[unix-style line endings]: http://unix.stackexchange.com/questions/23903/should-i-end-my-text-script-files-with-a-newline
3329

3430
## Naming
@@ -39,7 +35,8 @@ violations.
3935
- Prefer naming classes after domain concepts rather than patterns they
4036
implement (e.g. `Guest` vs `NullUser`, `CachedRequest` vs `RequestDecorator`).
4137
- Name the enumeration parameter the singular of the collection (`users.each { |user| greet(user) }`).
42-
- Name variables, methods, and classes to reveal intent. This includes documentation and examples (e.g. don't use `foo`, `bar`, `baz` in examples).
38+
- Name variables, methods, and classes to reveal intent. This includes documentation and
39+
examples (e.g. don't use `foo`, `bar`, `baz` in examples).
4340
- Treat acronyms as words in names (`XmlHttpRequest` not `XMLHTTPRequest`), even
4441
if the acronym is the entire name (`class Html` not `class HTML`).
4542

postgres/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
- Consider a [partial index] for queries on booleans.
66
- Avoid JSONB columns unless you have a strong reason to store an entire JSON
77
document from an external source.
8+
- Use [uppercase for SQL key words and lowercase for SQL identifiers].
89

10+
[uppercase for sql key words and lowercase for sql identifiers]: http://www.postgresql.org/docs/9.2/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
911
[combines multiple indexes]: http://www.postgresql.org/docs/9.1/static/indexes-bitmap-scans.html
1012
[compound index]: http://www.postgresql.org/docs/9.2/static/indexes-bitmap-scans.html
1113
[partial index]: http://www.postgresql.org/docs/9.1/static/indexes-partial.html

ruby/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
multiple models.
4545
- Prefer `private` when indicating scope. Use `protected` only with comparison
4646
methods like `def ==(other)`, `def <(other)`, and `def >(other)`.
47+
- Use empty lines around multi-line blocks.
4748

4849
[#63]: https://github.com/thoughtbot/guides/pull/63
4950
[#109]: https://github.com/thoughtbot/guides/pull/109

0 commit comments

Comments
 (0)