-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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 copyright/scope configuration for intellij to Contributing Guide #29688
Conversation
08fec80
to
336b4a6
Compare
This commit introduces a section discussing the ability to define copyright rules in intellij for inserting the appropriate copyright headers into files across both apache2-Elasticsearch, as well as the commercial code under `x-pack`. Some other re-organization was made to create more sub-structure
336b4a6
to
c98ea5d
Compare
CONTRIBUTING.md
Outdated
to have the IDE automatically insert the appropriate license header depending which part of the project | ||
contributions are made to. | ||
|
||
#### Intellij: Copyright & Scope Profiles |
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.
if anyone has an equivalent configuration for Eclipse, that would be awesome to add too cc/ @colings86
Pinging @elastic/es-core-infra |
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.
Thanks @talevy -- I ran through this and it worked for me.
CONTRIBUTING.md
Outdated
#### Intellij: Copyright & Scope Profiles | ||
|
||
To have Intellij insert the correct license, it is necessary to create to copyright profiles. | ||
These may potentially be called `apache2` and `commercial`. These can be created in |
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.
(nitpick) I think it's a bit clearer to use the names core
and xpack
for the copyright + scope profiles (especially for the scopes, which may be useful in other contexts).
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 think the existing names apache2
and commercial
are correct. They are the license names (I personally prefer commercial
over elastic
, but the latter would also be appropriate, since it is more technically accurate). But these are just suggestions anyways. :)
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 was hoping to keep the example names as close to the license/copyright they are representing. I think I will leave it to the contributor to decide which name to choose
CONTRIBUTING.md
Outdated
to have the IDE automatically insert the appropriate license header depending which part of the project | ||
contributions are made to. | ||
|
||
#### Intellij: Copyright & Scope Profiles |
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.
(nitpick) Intellij -> IntelliJ everywhere
CONTRIBUTING.md
Outdated
These may potentially be called `apache2` and `commercial`. These can be created in | ||
`Preferences/Settings->Editor->Copyright->Copyright Profiles`. To associate these profiles to | ||
their respective directories, two "Scopes" will need to be created. These can be created in | ||
`Preferences/Settings->Appearances & Behavior->Scopes`. Likewise, we can create a scope, `apache2` with |
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.
In order to access them from the 'Copyright' tab, I had to make sure these scopes were 'shared' (as opposed to 'local').
CONTRIBUTING.md
Outdated
the `x-pack` directory. The other scope, `commercial`, will have the inverse pattern of `file[group:x-pack]:*/`. | ||
The two scopes, together, should account for all the files in the project. To associate the scopes | ||
with their copyright-profiles, go into `Preferences/Settings->Editor>Copyright` and use the `+` to add | ||
the associations `apache2:apach2` and `commercial:commercial`. |
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.
apach2 -> apache2
thanks for the review @jtibshirani, I've updated to reflect your comments |
* master: (24 commits) Watcher: Ensure mail message ids are unique per watch action (#30112) REST: Remove GET support for clear cache indices (#29525) SQL: Correct error message (#30138) Require acknowledgement to start_trial license (#30135) Fix a bug in FieldCapabilitiesRequest#equals and hashCode. (#30181) SQL: Add BinaryMathProcessor to named writeables list (#30127) Tests: Use buildDir as base for generated-resources (#30191) Fix SliceBuilderTests#testRandom failures Build: Fix deb version to use tilde with prerelease versions (#29000) Fix edge cases in CompositeKeyExtractorTests (#30175) Document time unit limitations for date histograms (#30177) Add support for field capabilities to the high-level REST client. (#29664) Remove licenses missed by the migration (#30128) [DOCS] Updates docker installation package details (#30110) Fix TermsSetQueryBuilder.doEquals() method (#29629) [Monitoring] Remove unhelpful Monitoring tests (#30144) [Test] Fix RenameProcessorTests.testRenameExistingFieldNullValue() (#29655) add copyright/scope configuration for intellij to Contributing Guide (#29688) [test] include oss tar in packaging tests (#30155) TEST: Update settings should go through cluster state (#29682) ...
This commit introduces a section discussing the ability to define
copyright rules in intellij for inserting the appropriate copyright
headers into files across both apache2-Elasticsearch, as well as the
commercial code under
x-pack
.Some other re-organization was made to create more sub-structure