Skip to content

Comments

Commit codeStyle settings#3837

Closed
martinbonnin wants to merge 3 commits intographql-java:masterfrom
martinbonnin:add-codeStyles-to-git
Closed

Commit codeStyle settings#3837
martinbonnin wants to merge 3 commits intographql-java:masterfrom
martinbonnin:add-codeStyles-to-git

Conversation

@martinbonnin
Copy link
Contributor

Follow up from #3772 (comment)

This is so that IDE configuration is shared between contributors.

@andimarek
Copy link
Member

hi @martinbonnin ... we have already a shared code style that is committed here in the repo: https://github.com/graphql-java/graphql-java/blob/master/graphql-java-code-style.xml

@martinbonnin
Copy link
Contributor Author

martinbonnin commented Feb 27, 2025

Ah! sorry I missed that.
Out of curiosity, is that automatically recognized by IJ? And if not, any reason not to add it to .idea? Reason I'm asking is that I inadvertently commited star imports which would probably have been caught by the IDE so I figured out it might as well be an automatic thing?

Edit: I've updated that PR to use the already existing code style. Feel free to close if you prefer the current way! No strong opinion here!

@andimarek
Copy link
Member

In our experience the committed code styles in the .idea folder never really worked consistently and often caused problems over time. For example suddenly it changes it locally without any reason.

The import via exported code style worked well, if you import it :-)

@bbakerman @dondonz thoughts?

@martinbonnin
Copy link
Contributor Author

martinbonnin commented Feb 27, 2025

For example suddenly it changes it locally without any reason.

Agreed, I've seen that too during IJ updates I guess where they introduce new settings or change the defaults, I'm not sure...

We haven't seen it in Apollo Kotlin a long time so maybe it's sign things are stabilizing... But maybe not!

@andimarek
Copy link
Member

And that might seem trivial, but at the end it is very annoying ... this is why we just export/import the code style.

Would that work for you for now @martinbonnin ?

@martinbonnin
Copy link
Contributor Author

Yes of course, closing this.

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.

2 participants