Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a space between constructor annotations and their parameter lists #1516

Merged
merged 1 commit into from
Oct 10, 2019
Merged

Add a space between constructor annotations and their parameter lists #1516

merged 1 commit into from
Oct 10, 2019

Conversation

dominics
Copy link
Contributor

@dominics dominics commented Oct 4, 2019

Fixes #618 which, although closed due to inactivity, describes an improvement to spacing after constructor annotations - specifically, it'd be nice to retain a space between the constructor annotation and the first parameter list of the constructor. The desired spacing looks like:

class Foo @Inject() (bar: Bar) {

Whereas, currently, we'd remove the space, producing:

class Foo @Inject()(bar: Bar) {

@dominics
Copy link
Contributor Author

dominics commented Oct 4, 2019

I note that Play Framework documentation did use the space after @Inject()... until they reformatted their documentation examples with scalafmt 8 months ago! 🤣

Copy link
Member

@tanishiking tanishiking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! LGTM

@tanishiking tanishiking merged commit 2958ad7 into scalameta:master Oct 10, 2019
@ghostdogpr
Copy link

ghostdogpr commented Oct 13, 2019

Was that intended that this is affecting cases without annotations as well?

I had

new ShardEntity(rts)(onMessage)

and now it gives me

new ShardEntity(rts) (onMessage)

@tanishiking
Copy link
Member

@ghostdogpr Ugh, sorry it is unexpected behavior. Could you issue a ticket? (I'll be away from computer until tomorrow:bow:)

@ghostdogpr
Copy link

@tanishiking sure! here it is: #1528

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Space removed after annotation - Want to keep it
3 participants