* is it ok to break this block? */
| 4512 | * is it ok to break this block? |
| 4513 | */ |
| 4514 | bool ASFormatter::isOkToBreakBlock(BracketType bracketType) const |
| 4515 | { |
| 4516 | // Actually, there should not be an ARRAY_TYPE bracket here. |
| 4517 | // But this will avoid breaking a one line block when there is. |
| 4518 | // Otherwise they will be formatted differently on consecutive runs. |
| 4519 | if (isBracketType(bracketType, ARRAY_TYPE) |
| 4520 | && isBracketType(bracketType, SINGLE_LINE_TYPE)) |
| 4521 | return false; |
| 4522 | if (!isBracketType(bracketType, SINGLE_LINE_TYPE) |
| 4523 | || shouldBreakOneLineBlocks |
| 4524 | || breakCurrentOneLineBlock) |
| 4525 | return true; |
| 4526 | return false; |
| 4527 | } |
| 4528 | |
| 4529 | /** |
| 4530 | * check if a sharp header is a paren or nonparen header |
nothing calls this directly
no outgoing calls
no test coverage detected