-
Notifications
You must be signed in to change notification settings - Fork 50
Do not mention hibernate-ide-codestyles
#312
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
Open
marko-bekhta
wants to merge
1
commit into
hibernate:production
Choose a base branch
from
marko-bekhta:fix/do-not-point-to-codestlyes-repo
base: production
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+36
−77
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -43,65 +43,31 @@ See the Annotation processor section for more info. | |
|
|
||
| == Code style | ||
|
|
||
| Download the settings from our GitHub repository: | ||
| Each Hibernate project includes a set of build plugins to format and verify the code style of the sources. | ||
| Please refer to the particular project contributing guide for more details. | ||
|
|
||
| * For Hibernate ORM: https://raw.githubusercontent.com/hibernate/hibernate-ide-codestyles/master/intellij-14/hibernate_orm.xml[`hibernate_orm.xml`]. | ||
| * For Hibernate Search, Validator, OGM: https://raw.githubusercontent.com/hibernate/hibernate-ide-codestyles/master/intellij-14/hibernate_noorm.xml[`intellij-14/hibernate_noorm.xmlhibernate-code-templates-search.xml`]. | ||
|
|
||
| Here is http://musingsofaprogrammingaddict.blogspot.com/2010/03/import-code-style-settings-into.html[an article on how to set it up in IntelliJ IDEA]. | ||
|
|
||
| The authoritative code style is defined by the CheckStyle checks file associated with the project; | ||
| be sure to check against those prior to pushing. | ||
| [NOTE] | ||
| ==== | ||
| If the project build does not define a fully automated code formatter, | ||
| please avoid reformatting large sections of code, especially when providing a patch: | ||
| we would love to have the diffs highlight the changes that matter. | ||
| ==== | ||
|
|
||
| == Code templates | ||
|
|
||
| The best approach to automatically apply the proper copyright/license headers to newly created files | ||
| is to leverage the Copyright plugin (now a bundled plugin). | ||
|
|
||
| Set up on profile per Hibernate project you want to deal with in the Copyright configuration ("Settings" -> "Copyright") | ||
| and then select the one to use for your IntelliJ IDEA project. | ||
|
|
||
| Note you can define the profiles once and for all if you go through | ||
| "Other settings" -> "Settings for new projects" -> "Copyright": | ||
| they will be made available automatically in every new IntelliJ IDEA project. | ||
|
|
||
| Here are the standard license headers for each project: | ||
|
|
||
| * Hibernate ORM: | ||
|
|
||
| /* | ||
| * Hibernate, Relational Persistence for Idiomatic Java | ||
| * | ||
| * License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
| * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
| */ | ||
|
|
||
| * Hibernate Search: | ||
|
|
||
| /* | ||
| * Hibernate Search, full-text search for your domain model | ||
| * | ||
| * License: GNU Lesser General Public License (LGPL), version 2.1 or later | ||
| * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
| */ | ||
|
|
||
| * Hibernate Validator: | ||
|
|
||
| /* | ||
| * Hibernate Validator, declare and validate application constraints | ||
| * | ||
| * License: Apache License, Version 2.0 | ||
| * See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>. | ||
| */ | ||
| All top-level Hibernate projects are Apache 2.0 licensed and use the following header format: | ||
|
|
||
| * Hibernate OGM: | ||
| [source,java] | ||
| ---- | ||
| /* | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * Copyright Red Hat Inc. and Hibernate Authors | ||
| */ | ||
|
Comment on lines
+62
to
+65
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. though ... I noticed Reactive is using a slight variation of this format:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tracking as hibernate/hibernate-reactive#2855 |
||
| ---- | ||
|
|
||
| /* | ||
| * Hibernate OGM, Domain model persistence for NoSQL datastores | ||
| * | ||
| * License: GNU Lesser General Public License (LGPL), version 2.1 or later | ||
| * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
| */ | ||
| Note that each project has a license build plugin configured to check for the correct license header formatting. | ||
| At the same time, such a plugin provides options to add the missing headers. | ||
| Please refer to the particular project build for more details. | ||
|
|
||
| == Debugging | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh, okay, but Hibernate ORM for example redirects here:
https://github.com/hibernate/hibernate-orm/blob/main/CONTRIBUTING.md#guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😭 😖 infinite loop
though I have some slight doubts that everyone follows these instructions...
otherwise we'd be getting all new PRs with the old LGPL headers 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really care about instructions for the headers since they're checked automatically on build, but the code style, IIRC, is not always checked in Hibernate ORM, and anyway it's convenient to have instructions on how to set up the IDE...
But those instructions would definitely be better to have in CONTRIBUTING.md, that I can agree with. The question is... what should those instructions be, if we archive hibernate-ide-codestyles :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hibernate/hibernate-orm#11361
how about something like ^
we tell to run the checks (and if someone doesn't CI should catch it, right?) and we give the links to the IDE pages, but we don't say that they have the styles .... 🫣 🙂