-
Notifications
You must be signed in to change notification settings - Fork 863
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include comments when calculating AST node size
The formatter prints method arguments one-per-line unless they all fit on the same line, or they're all very short. This fixes a bug where the formatter would fill the arguments even if they had long parameter comments attached to them. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=106897312
- Loading branch information
Showing
5 changed files
with
93 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
core/src/test/resources/com/google/googlejavaformat/java/testdata/B25372815.input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
class Test { | ||
{ | ||
// For "All goals" view, show only advertiser goals tab. | ||
return newPageTypeSet( | ||
false /* advertisers */, | ||
false /* userManagement */, | ||
false /* campaigns */, | ||
false /* adGroups */, | ||
false /* ads */, | ||
false /* keywords */, | ||
false /* negativeKeywords */, | ||
false /* advertiserBidStrategies */, | ||
false /* bidStrategies */, | ||
false /* bidStrategyRecommendations */, | ||
false /* bidKeywords */, | ||
false /* engineBidStrategies */, | ||
false /* conversionTrackers */, | ||
false /* labels */, | ||
false /* labelKeywords */, | ||
false /* evergreen labels */, | ||
false /* searchQueries */, | ||
false /* engineSearchQueries */, | ||
false /* remarketingTarget */, | ||
false /* sitelinks */, | ||
false /* feedSitelinks */, | ||
false /* locationExtensions */, | ||
false /* callExtensions */, | ||
false /* calloutExtensions */, | ||
false /* appExtensions */, | ||
false /* events */); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
core/src/test/resources/com/google/googlejavaformat/java/testdata/B25372815.output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
class Test { | ||
{ | ||
// For "All goals" view, show only advertiser goals tab. | ||
return newPageTypeSet( | ||
false /* advertisers */, | ||
false /* userManagement */, | ||
false /* campaigns */, | ||
false /* adGroups */, | ||
false /* ads */, | ||
false /* keywords */, | ||
false /* negativeKeywords */, | ||
false /* advertiserBidStrategies */, | ||
false /* bidStrategies */, | ||
false /* bidStrategyRecommendations */, | ||
false /* bidKeywords */, | ||
false /* engineBidStrategies */, | ||
false /* conversionTrackers */, | ||
false /* labels */, | ||
false /* labelKeywords */, | ||
false /* evergreen labels */, | ||
false /* searchQueries */, | ||
false /* engineSearchQueries */, | ||
false /* remarketingTarget */, | ||
false /* sitelinks */, | ||
false /* feedSitelinks */, | ||
false /* locationExtensions */, | ||
false /* callExtensions */, | ||
false /* calloutExtensions */, | ||
false /* appExtensions */, | ||
false /* events */); | ||
} | ||
} |