Skip to content

Commit 0556008

Browse files
committed
more guidelines
1 parent 28d6147 commit 0556008

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

coding-guidelines.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@
1414

1515
## more specific topics
1616

17-
- Use @Public and @Internal to communicate what level of stability is supported.
17+
- Use `@Public` and `@Internal` to communicate what level of stability is supported.
1818

19-
- Never make a class or method package protected or protected: make it public or private and use @Internal to communicate that the class can be changed without notice.
19+
- Never make a class or method package private or protected:
20+
make it public or private and use `@Internal` to communicate that the class can be changed without notice.
2021
The user can decide itself about the risk when they use internal things.
2122

2223
### Optional vs null
2324
We have a mix of Optional and allowing null values because GraphQL Java was originally written in Java 6.
2425
We are not aiming to change the old code.
2526

26-
TBD: Every new code should use Optional or not?
27+
**TBD: Every new code should use Optional or not?**
2728

2829
### Unit testing and dependencies
2930
All tests are written in [Spock](http://spockframework.org).
@@ -56,7 +57,9 @@ Static methods imply that you never want to mock them.
5657

5758
Typical examples are util methods like `GraphQLTypeUtil.isNonNull()`
5859

59-
Don't mix static and non static methods (except factory methods): every class is either a general "Util" class with only static methods or a class with no static methods.
60+
### "Util" class or not
61+
Don't mix static and non static methods (except factory methods):
62+
every class is either a general "Util" class with only static methods or a class with no static methods.
6063

6164

6265
### Naming

0 commit comments

Comments
 (0)