Skip to content

Commit

Permalink
[no-story] allow empty blocks (#17)
Browse files Browse the repository at this point in the history
## Summary
Our [style
guide](https://circlepay.atlassian.net/wiki/spaces/ENGINEERIN/pages/386957608/Circle+Java+Style+Guide#Empty-blocks%3A-may-be-concise)
allows for empty blocks. We update our Checkstyle to allow empty blocks,
too.

## Detail
### Prior to this change
This was illegal:
```java
class Clazz {}
```

### With this change
This is legal:
```java
class Clazz {}
```

This is legal, too:
```java
class Clazz {
}
```

This is still illegal:
```java
class Class { private String field; }
```

## Testing
This change passes on entity-service & transaction-core.

## Documentation
None.

---

**Requested Reviewers:** @asharp-circle @creilly12 @istvancircle
@rschmitz-circle
  • Loading branch information
asharp-circle authored Feb 1, 2024
2 parents 994157c + aa00cac commit 0113525
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions checkstyle-circle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,10 @@
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,
LITERAL_DO"/>
</module>
<module name="RightCurly">
<property name="id" value="RightCurlyAlone"/>
<property name="option" value="alone"/>
<property name="tokens"
value="CLASS_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/>
</module>
<module name="RightCurly">
<property name="id" value="RightCurlyAloneOrSingleLine"/>
<property name="option" value="alone_or_singleline"/>
<property name="tokens" value="CTOR_DEF, METHOD_DEF"/>
<property name="tokens" value="CLASS_DEF, CTOR_DEF, INSTANCE_INIT, LITERAL_FOR, LITERAL_WHILE, METHOD_DEF, STATIC_INIT"/>
</module>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
Expand Down

0 comments on commit 0113525

Please sign in to comment.