PiranhaJava - Doesn't add required space while removing parentheses
See original GitHub issuePiranha changed return(true);
to returntrue;
.
This is sort of related to #35 - in the sense that PiranhaJava doesn’t validate the parens/spaces of the output generated.
This error probably would not have occured if the code had been Google Java formatted.
However, I thought I will bring it to your attention, since this is a case of Piranha introducing a “bug” instead of erring on the side of caution, like #35
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Remove parentheses, dashes, and spaces from phone number
This should work: String phNo = "(123) 456-7890".replaceAll("[()\\s-]+", "");. In your regex: \s should be \\s; Hyphen should be first or last in...
Read more >space-in-parens - ESLint - Pluggable JavaScript Linter
This rule will enforce consistent spacing directly inside of parentheses, by disallowing or requiring one or more spaces to the right of (...
Read more >Should I fully parenthesize expressions or rely on precedence ...
Good developers strive to write code that is clear and correct. Parentheses in conditionals, even if they are not strictly required, help with...
Read more >User-defined types
If we add more data about the fish, or remove the data: ... the array, while struct variable is a name for a...
Read more >Is a space between a function's name and the open ...
As Aryaman alludes to it's pretty common to not place a space between the function name and the parenthesis, if you want your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the report! Seems like we should either fix this bug or document that we assume proper (GJF) formatting
agreed. But this isaue is valid when the app is passed through piranha multiple times.
on first pass, piranha reduces the feature flag in a method to a method that returns true (reducing to the above code) or false. on second pass, piranha resuces the above code to produce an output which produces compilation error.