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

try adding minimal IntelliJ project config #9014

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

gavinking
Copy link
Member

This only includes:

  • coding conventions, and
  • configuration of warnings.

[Please describe here what your change is about]


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Sep 25, 2024

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HHH-\d+
    ↳ Offending commits: [49a274d]

› This message was automatically generated.

@sebersole
Copy link
Member

I'm concerned about having default project settings here. I, for example, already configure this locally and this would overwrite my local definition.

@gavinking
Copy link
Member Author

I believe you can have multiple of them and select the one you want.

@sebersole
Copy link
Member

We could include .idea/copyright as well. Yes spotless ultimately handles this, but it also handles things being configured here in .idea/codeStyles

@sebersole
Copy link
Member

sebersole commented Sep 25, 2024

I believe you can have multiple of them and select the one you want.

That's fair, but "Project" happens to be the default IJ chooses for a project-level Settings profile. Maybe let's name this "Hibernate"? I'd also suggest a few more, I left as a line comment.

We'd need to document (CONTRIBUTING.adoc) the steps to change the Settings to this profile to get that inspection configuration, if desired, since it won't necessarily be automatic.

@gavinking gavinking force-pushed the intellij-project branch 2 times, most recently from 2bcd456 to eb96822 Compare September 25, 2024 18:22
@lucamolteni
Copy link
Contributor

This only includes:

  • coding conventions, and
  • configuration of warnings.

I've imported this in IDEA https://github.com/hibernate/hibernate-ide-codestyles/blob/main/intellij-14/hibernate_orm.xml

even though it's quite ancient it seems to be working

@gavinking
Copy link
Member Author

even though it's quite ancient it seems to be working

I had a look, but it seems to have quite a lot of unnecessary cruft: for example, all sorts of formatting rules for Groovy.

@gavinking
Copy link
Member Author

We could include .idea/copyright as well.

Wow, this amazingly complicated to configure in IntelliJ. Better if you do it.

Maybe let's name this "Hibernate"?

Tried this but unfortunately it doesn't work. It seems that you're only allowed to give names to profiles stored in the IDE, not to the "project" profile. But that's OK, I think. You can still store as many profiles as you like in the IDE, and even make one based off of the project one.

@gavinking
Copy link
Member Author

Going to go ahead and merge what I have here so you guys can try it out and let me know if anything breaks. It seems to work nicely when I create a new project from a clean checkout.

@gavinking gavinking merged commit 20f858f into hibernate:main Sep 27, 2024
19 of 23 checks passed
@lucamolteni
Copy link
Contributor

even though it's quite ancient it seems to be working

I had a look, but it seems to have quite a lot of unnecessary cruft: for example, all sorts of formatting rules for Groovy.

From a user perspective having two styles in two different places is confusing, perhaps you should remove the other one then?

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.

3 participants