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

Idea integration results in correct copyright xml files #2016

Merged
merged 4 commits into from
Dec 10, 2021

Conversation

carterkozak
Copy link
Contributor

Previously we had:

<component name="CopyrightManager">
  <copyright>
    <option name="notice" value="(c) Copyright ${today.year} Palantir
Technologies Inc. All rights reserved.&#10;&#10;Licensed under the
Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not
use this file except in compliance with the License.&#10;You may obtain
a copy of the License at&#10;&#10;
http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by
applicable law or agreed to in writing, software&#10;distributed under
the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See
the License for the specific language governing permissions
and&#10;limitations under the License."/>
    <option name="keyword" value="Copyright"/>
    <option name="allowReplaceKeyword" value=""/>
    <option name="myName" value="001_apache-2.0.txt"/>
    <option name="myLocal" value="true"/>
  </copyright>
  <copyright>
    <option name="notice" value="(c) Copyright ${today.year} Palantir
Technologies Inc. All rights reserved.&#10;&#10;Licensed under the
Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not
use this file except in compliance with the License.&#10;You may obtain
a copy of the License at&#10;&#10;
http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by
applicable law or agreed to in writing, software&#10;distributed under
the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See
the License for the specific language governing permissions
and&#10;limitations under the License."/>
    <option name="keyword" value="Copyright"/>
    <option name="allowReplaceKeyword" value=""/>
    <option name="myName" value="001_apache-2.0.txt"/>
    <option name="myLocal" value="true"/>
  </copyright>
  <copyright>
    <option name="notice" value="(c) Copyright ${today.year} Palantir
Technologies Inc. All rights reserved.&#10;&#10;Licensed under the
Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not
use this file except in compliance with the License.&#10;You may obtain
a copy of the License at&#10;&#10;
http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by
applicable law or agreed to in writing, software&#10;distributed under
the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See
the License for the specific language governing permissions
and&#10;limitations under the License."/>
    <option name="keyword" value="Copyright"/>
    <option name="allowReplaceKeyword" value=""/>
    <option name="myName" value="001_apache-2.0.txt"/>
    <option name="myLocal" value="true"/>
  </copyright>
  <copyright>
    <option name="notice" value="(c) Copyright ${today.year} Palantir
Technologies Inc. All rights reserved.&#10;&#10;Licensed under the
Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not
use this file except in compliance with the License.&#10;You may obtain
a copy of the License at&#10;&#10;
http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by
applicable law or agreed to in writing, software&#10;distributed under
the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See
the License for the specific language governing permissions
and&#10;limitations under the License."/>
    <option name="keyword" value="Copyright"/>
    <option name="allowReplaceKeyword" value=""/>
    <option name="myName" value="001_apache-2.0.txt"/>
    <option name="myLocal" value="true"/>
  </copyright>
</component>

==COMMIT_MSG==
Idea integration results in correct copyright xml files without duplicate entries
==COMMIT_MSG==

Previously we had:

```xml
<component name="CopyrightManager">
  <copyright>
    <option name="notice" value="(c) Copyright ${today.year} Palantir
Technologies Inc. All rights reserved.&#10;&#10;Licensed under the
Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not
use this file except in compliance with the License.&#10;You may obtain
a copy of the License at&#10;&#10;
http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by
applicable law or agreed to in writing, software&#10;distributed under
the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See
the License for the specific language governing permissions
and&#10;limitations under the License."/>
    <option name="keyword" value="Copyright"/>
    <option name="allowReplaceKeyword" value=""/>
    <option name="myName" value="001_apache-2.0.txt"/>
    <option name="myLocal" value="true"/>
  </copyright>
  <copyright>
    <option name="notice" value="(c) Copyright ${today.year} Palantir
Technologies Inc. All rights reserved.&#10;&#10;Licensed under the
Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not
use this file except in compliance with the License.&#10;You may obtain
a copy of the License at&#10;&#10;
http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by
applicable law or agreed to in writing, software&#10;distributed under
the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See
the License for the specific language governing permissions
and&#10;limitations under the License."/>
    <option name="keyword" value="Copyright"/>
    <option name="allowReplaceKeyword" value=""/>
    <option name="myName" value="001_apache-2.0.txt"/>
    <option name="myLocal" value="true"/>
  </copyright>
  <copyright>
    <option name="notice" value="(c) Copyright ${today.year} Palantir
Technologies Inc. All rights reserved.&#10;&#10;Licensed under the
Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not
use this file except in compliance with the License.&#10;You may obtain
a copy of the License at&#10;&#10;
http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by
applicable law or agreed to in writing, software&#10;distributed under
the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See
the License for the specific language governing permissions
and&#10;limitations under the License."/>
    <option name="keyword" value="Copyright"/>
    <option name="allowReplaceKeyword" value=""/>
    <option name="myName" value="001_apache-2.0.txt"/>
    <option name="myLocal" value="true"/>
  </copyright>
  <copyright>
    <option name="notice" value="(c) Copyright ${today.year} Palantir
Technologies Inc. All rights reserved.&#10;&#10;Licensed under the
Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not
use this file except in compliance with the License.&#10;You may obtain
a copy of the License at&#10;&#10;
http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by
applicable law or agreed to in writing, software&#10;distributed under
the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See
the License for the specific language governing permissions
and&#10;limitations under the License."/>
    <option name="keyword" value="Copyright"/>
    <option name="allowReplaceKeyword" value=""/>
    <option name="myName" value="001_apache-2.0.txt"/>
    <option name="myLocal" value="true"/>
  </copyright>
</component>
```
@changelog-app
Copy link

changelog-app bot commented Dec 9, 2021

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Idea integration results in correct copyright xml files without duplicate entries

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from CRogers December 9, 2021 20:24
@robert3005
Copy link
Contributor

I think you want to change the other addcopyright method as well and always make it do createoruodate. Other impl looks for the node before and adds if it doesn’t exist but doesn’t update.

@carterkozak
Copy link
Contributor Author

@robert3005 Ya, the IPR implementation could also be better, though that one isn't executed every time gradle operations run from the IDE but is bounded by the times you run ./gradlew idea before a git clean -fdx or cleanIdea.

My preference is to punt the ipr piece for a separate PR

@robert3005
Copy link
Contributor

👍

@bulldozer-bot bulldozer-bot bot merged commit a172a7f into develop Dec 10, 2021
@bulldozer-bot bulldozer-bot bot deleted the ckozak/idea_duplicate_copyrights branch December 10, 2021 10:36
@svc-autorelease
Copy link
Collaborator

Released 4.51.0

bulldozer-bot bot pushed a commit to palantir/witchcraft-api that referenced this pull request Dec 10, 2021
###### _excavator_ is a bot for automating changes across repositories.

Changes produced by the roomba/latest-baseline-oss check.

# Release Notes
## 4.51.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Fix | Idea integration results in correct copyright xml files without duplicate entries | palantir/gradle-baseline#2016 |


## 4.52.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Improvement | It's no longer necessary to import an ipr before using gradle integration, code styles are imported correctly out of the box. | palantir/gradle-baseline#2015 |



To enable or disable this check, please contact the maintainers of Excavator.
This was referenced Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants