Ruslan Diachenko

Results 31 comments of Ruslan Diachenko

> [4.1.3 Empty blocks: may be concise](https://google.github.io/styleguide/javaguide.html#s4.1.3-braces-empty-blocks) > > An empty block or block-like construct may be in K & R style (as described in [Section 4.1.2](https://google.github.io/styleguide/javaguide.html#s4.1.2-blocks-k-r-style)). Alternatively, it may...

We still need to cover multi-block statements: ```java if (a == 2) { // ok, K & R style } else {} // violation, part of a multi-block statement //...

We may need to also remove `EmptyCatchBlock` for this section and extend the xpath for `try-catch-finally` multi-blocks. `switch-case-default` is another multi-block statement I can think of. But I agree we...

On Mac: `grep 'Input' .ci/google-java-format.sh | sed -E 's/.*Input([^\.]+)\..*java.*/\1/' | while read name; do [[ $(find ./src -type f -name "InputFormatted${name}.java") ]] || echo "Not found: InputFormatted${name}.java"; done` ``` Not...

> @rdiachenko can you also review the issue? Yep, looks good to me, we need to start using `allowMissingPropertyJavadoc` in the google config. Additionally, recheck inputs and extend them if...

[This comment in a different issue](https://github.com/checkstyle/checkstyle/issues/14294#issuecomment-1904385363) covers two problematic cases: 1. [4.2 Block indentation: +2 spaces](https://google.github.io/styleguide/javaguide.html#s4.2-block-indentation) > Each time a new block or block-like construct is opened, the indent increases...

@Zopsss To enforce `{` in `case / default` to be on its own line I think we can try to add additional configuration with `LeftCurly` check. For LITERAL_CASE and LITERAL_DEFAULT...

By updating the config as follows, we fix the switch-case-default use case, which is one step towards making the config more compliant with what the Google guide requires. ``` ```...

@Zopsss could you create a PR to cover `switch-case-default` case please? We'll handle other blocks as a separate task. Need to think what's the best way to do it.

> ``` > * > * // should give violation - extra P tag > * > * 1 // should NOT give violation as there is not empty line...