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 copyright/scope configuration for intellij to Contributing Guide #29688

Merged
merged 2 commits into from
Apr 26, 2018

Conversation

talevy
Copy link
Contributor

@talevy talevy commented Apr 25, 2018

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

@talevy talevy requested a review from rjernst April 25, 2018 00:33
@talevy talevy force-pushed the intellij-copyright branch from 08fec80 to 336b4a6 Compare April 25, 2018 00:35
@talevy talevy requested a review from jtibshirani April 25, 2018 00:38
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
@talevy talevy force-pushed the intellij-copyright branch from 336b4a6 to c98ea5d Compare April 25, 2018 00:42
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
Copy link
Contributor Author

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

@colings86 colings86 added the :Delivery/Build Build or test infrastructure label Apr 25, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

Copy link
Contributor

@jtibshirani jtibshirani left a 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
Copy link
Contributor

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).

Copy link
Member

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. :)

Copy link
Contributor Author

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
Copy link
Contributor

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
Copy link
Contributor

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`.
Copy link
Contributor

Choose a reason for hiding this comment

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

apach2 -> apache2

@talevy
Copy link
Contributor Author

talevy commented Apr 25, 2018

thanks for the review @jtibshirani, I've updated to reflect your comments

@talevy talevy merged commit 5785245 into elastic:master Apr 26, 2018
@talevy talevy deleted the intellij-copyright branch April 26, 2018 15:19
dnhatn added a commit that referenced this pull request Apr 27, 2018
* 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)
  ...
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure >non-issue Team:Delivery Meta label for Delivery team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants