Skip to content

Commit d7004dc

Browse files
authored
Fixes license headers and the linting rules (opensearch-project#1373)
* Fixes the linting rules to accept only the approved copyright headers * Fixes the license headers New files with no open source origins: * Short 2-liner block Modified or Unmodified files with open source origins: * Large header block * Updates the snapshots that changed with updates to the license headers Signed-off-by: Miki <[email protected]>
1 parent 859e21f commit d7004dc

File tree

7,320 files changed

+22577
-35163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,320 files changed

+22577
-35163
lines changed

.eslintrc.js

+23-16
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* The OpenSearch Contributors require contributions made to
55
* this file be licensed under the Apache-2.0 license or a
66
* compatible open source license.
7+
*
8+
* Any modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
710
*/
811

912
/*
@@ -25,35 +28,33 @@
2528
* under the License.
2629
*/
2730

28-
/*
29-
* Modifications Copyright OpenSearch Contributors. See
30-
* GitHub history for details.
31-
*/
32-
3331
/**
34-
* For new files created by OpenSearch Contributers
32+
* For new files created by OpenSearch Contributors
3533
*/
36-
const OSD_HEADER = `
34+
const OSD_NEW_HEADER = `
3735
/*
3836
* Copyright OpenSearch Contributors
3937
* SPDX-License-Identifier: Apache-2.0
4038
*/
4139
`;
4240

4341
/**
44-
* For files that modify or use code with an exsting OSS header
42+
* For modified and modified files with external open source code
4543
*/
46-
const OSS_HEADER = `
44+
const OSD_HEADER = `
4745
/*
4846
* SPDX-License-Identifier: Apache-2.0
4947
*
5048
* The OpenSearch Contributors require contributions made to
51-
* this file be licensed under the Apache-2.0 license or a
49+
* this file be licensed under the Apache-2.0 license or a
5250
* compatible open source license.
51+
*
52+
* Any modifications Copyright OpenSearch Contributors. See
53+
* GitHub history for details.
5354
*/
5455
`;
5556

56-
const OSS_MODIFIED_HEADER = `
57+
const OSD_BAD_HEADER = `
5758
/*
5859
* Modifications Copyright OpenSearch Contributors. See
5960
* GitHub history for details.
@@ -156,13 +157,14 @@ module.exports = {
156157
'@osd/eslint/require-license-header': [
157158
'error',
158159
{
159-
licenses: [OSD_HEADER, OSS_HEADER],
160+
licenses: [OSD_NEW_HEADER, OSD_HEADER],
160161
},
161162
],
162163
'@osd/eslint/disallow-license-headers': [
163164
'error',
164165
{
165166
licenses: [
167+
OSD_BAD_HEADER,
166168
SAFER_LODASH_SET_HEADER,
167169
SAFER_LODASH_SET_LODASH_HEADER,
168170
SAFER_LODASH_SET_DEFINITELYTYPED_HEADER,
@@ -198,6 +200,9 @@ module.exports = {
198200
'error',
199201
{
200202
licenses: [
203+
OSD_BAD_HEADER,
204+
OSD_NEW_HEADER,
205+
OSD_HEADER,
201206
APACHE_2_0_LICENSE_HEADER,
202207
SAFER_LODASH_SET_HEADER,
203208
SAFER_LODASH_SET_DEFINITELYTYPED_HEADER,
@@ -219,11 +224,12 @@ module.exports = {
219224
'error',
220225
{
221226
licenses: [
222-
OSS_HEADER,
227+
OSD_BAD_HEADER,
228+
OSD_NEW_HEADER,
229+
OSD_HEADER,
223230
APACHE_2_0_LICENSE_HEADER,
224231
SAFER_LODASH_SET_LODASH_HEADER,
225232
SAFER_LODASH_SET_DEFINITELYTYPED_HEADER,
226-
OSS_MODIFIED_HEADER,
227233
],
228234
},
229235
],
@@ -242,11 +248,12 @@ module.exports = {
242248
'error',
243249
{
244250
licenses: [
245-
OSS_HEADER,
251+
OSD_BAD_HEADER,
252+
OSD_NEW_HEADER,
253+
OSD_HEADER,
246254
APACHE_2_0_LICENSE_HEADER,
247255
SAFER_LODASH_SET_HEADER,
248256
SAFER_LODASH_SET_LODASH_HEADER,
249-
OSS_MODIFIED_HEADER,
250257
],
251258
},
252259
],

Gruntfile.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* The OpenSearch Contributors require contributions made to
55
* this file be licensed under the Apache-2.0 license or a
66
* compatible open source license.
7+
*
8+
* Any modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
710
*/
811

912
/*
@@ -25,11 +28,6 @@
2528
* under the License.
2629
*/
2730

28-
/*
29-
* Modifications Copyright OpenSearch Contributors. See
30-
* GitHub history for details.
31-
*/
32-
3331
require('./src/setup_node_env');
3432

3533
module.exports = function (grunt) {

bwctest.sh

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
#!/bin/bash
22

3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# The OpenSearch Contributors require contributions made to
7+
# this file be licensed under the Apache-2.0 license or a
8+
# compatible open source license.
9+
#
10+
# Any modifications Copyright OpenSearch Contributors. See
11+
# GitHub history for details.
12+
#
13+
314
set -e
415

516
# TODO: Update to include all known BWC of data
@@ -44,10 +55,10 @@ while getopts ":h:b:p:s:c:o:d:" arg; do
4455
;;
4556
o)
4657
OPENSEARCH=$OPTARG
47-
;;
58+
;;
4859
d)
4960
DASHBOARDS=$OPTARG
50-
;;
61+
;;
5162
:)
5263
echo "-${OPTARG} requires an argument"
5364
usage
@@ -74,7 +85,7 @@ if [ -z "$OPENSEARCH" ]; then
7485
# Expected to be arch.tar.gz
7586
DOTS="${DASH_ARR[4]}"
7687
IFS='.' read -ra DOTS_ARR <<< "$DOTS"
77-
88+
7889
VERSION="${DASH_ARR[2]}"
7990
PLATFORM="${DASH_ARR[3]}"
8091
ARCH="${DOTS_ARR[0]}"

examples/bfetch_explorer/public/components/count_until/index.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* The OpenSearch Contributors require contributions made to
55
* this file be licensed under the Apache-2.0 license or a
66
* compatible open source license.
7+
*
8+
* Any modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
710
*/
811

912
/*
@@ -25,11 +28,6 @@
2528
* under the License.
2629
*/
2730

28-
/*
29-
* Modifications Copyright OpenSearch Contributors. See
30-
* GitHub history for details.
31-
*/
32-
3331
import React, { useState } from 'react';
3432
import useMountedState from 'react-use/lib/useMountedState';
3533
import useList from 'react-use/lib/useList';

examples/bfetch_explorer/public/components/double_integers/index.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* The OpenSearch Contributors require contributions made to
55
* this file be licensed under the Apache-2.0 license or a
66
* compatible open source license.
7+
*
8+
* Any modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
710
*/
811

912
/*
@@ -25,11 +28,6 @@
2528
* under the License.
2629
*/
2730

28-
/*
29-
* Modifications Copyright OpenSearch Contributors. See
30-
* GitHub history for details.
31-
*/
32-
3331
import React, { useState } from 'react';
3432
import useMountedState from 'react-use/lib/useMountedState';
3533
import useList from 'react-use/lib/useList';

examples/bfetch_explorer/public/components/page/index.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* The OpenSearch Contributors require contributions made to
55
* this file be licensed under the Apache-2.0 license or a
66
* compatible open source license.
7+
*
8+
* Any modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
710
*/
811

912
/*
@@ -25,11 +28,6 @@
2528
* under the License.
2629
*/
2730

28-
/*
29-
* Modifications Copyright OpenSearch Contributors. See
30-
* GitHub history for details.
31-
*/
32-
3331
import * as React from 'react';
3432
import {
3533
EuiPageBody,

examples/bfetch_explorer/public/containers/app/index.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* The OpenSearch Contributors require contributions made to
55
* this file be licensed under the Apache-2.0 license or a
66
* compatible open source license.
7+
*
8+
* Any modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
710
*/
811

912
/*
@@ -25,11 +28,6 @@
2528
* under the License.
2629
*/
2730

28-
/*
29-
* Modifications Copyright OpenSearch Contributors. See
30-
* GitHub history for details.
31-
*/
32-
3331
import React from 'react';
3432
import { BrowserRouter as Router, Route, Redirect, Switch } from 'react-router-dom';
3533
import { EuiPage } from '@elastic/eui';

examples/bfetch_explorer/public/containers/app/pages/page_count_until/index.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* The OpenSearch Contributors require contributions made to
55
* this file be licensed under the Apache-2.0 license or a
66
* compatible open source license.
7+
*
8+
* Any modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
710
*/
811

912
/*
@@ -25,11 +28,6 @@
2528
* under the License.
2629
*/
2730

28-
/*
29-
* Modifications Copyright OpenSearch Contributors. See
30-
* GitHub history for details.
31-
*/
32-
3331
import * as React from 'react';
3432
import { EuiPanel, EuiText } from '@elastic/eui';
3533
import { CountUntil } from '../../../../components/count_until';

examples/bfetch_explorer/public/containers/app/pages/page_double_integers/index.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* The OpenSearch Contributors require contributions made to
55
* this file be licensed under the Apache-2.0 license or a
66
* compatible open source license.
7+
*
8+
* Any modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
710
*/
811

912
/*
@@ -25,11 +28,6 @@
2528
* under the License.
2629
*/
2730

28-
/*
29-
* Modifications Copyright OpenSearch Contributors. See
30-
* GitHub history for details.
31-
*/
32-
3331
import * as React from 'react';
3432
import { EuiPanel, EuiText } from '@elastic/eui';
3533
import { DoubleIntegers } from '../../../../components/double_integers';

examples/bfetch_explorer/public/containers/app/sidebar/index.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* The OpenSearch Contributors require contributions made to
55
* this file be licensed under the Apache-2.0 license or a
66
* compatible open source license.
7+
*
8+
* Any modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
710
*/
811

912
/*
@@ -25,11 +28,6 @@
2528
* under the License.
2629
*/
2730

28-
/*
29-
* Modifications Copyright OpenSearch Contributors. See
30-
* GitHub history for details.
31-
*/
32-
3331
import React from 'react';
3432
import { EuiPageSideBar, EuiSideNav } from '@elastic/eui';
3533
import { useHistory } from 'react-router-dom';

examples/bfetch_explorer/public/hooks/use_deps.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* The OpenSearch Contributors require contributions made to
55
* this file be licensed under the Apache-2.0 license or a
66
* compatible open source license.
7+
*
8+
* Any modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
710
*/
811

912
/*
@@ -25,11 +28,6 @@
2528
* under the License.
2629
*/
2730

28-
/*
29-
* Modifications Copyright OpenSearch Contributors. See
30-
* GitHub history for details.
31-
*/
32-
3331
import { useOpenSearchDashboards } from '../../../../src/plugins/opensearch_dashboards_react/public';
3432
import { BfetchDeps } from '../mount';
3533

examples/bfetch_explorer/public/index.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* The OpenSearch Contributors require contributions made to
55
* this file be licensed under the Apache-2.0 license or a
66
* compatible open source license.
7+
*
8+
* Any modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
710
*/
811

912
/*
@@ -25,11 +28,6 @@
2528
* under the License.
2629
*/
2730

28-
/*
29-
* Modifications Copyright OpenSearch Contributors. See
30-
* GitHub history for details.
31-
*/
32-
3331
import { BfetchExplorerPlugin } from './plugin';
3432

3533
export const plugin = () => new BfetchExplorerPlugin();

examples/bfetch_explorer/public/mount.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* The OpenSearch Contributors require contributions made to
55
* this file be licensed under the Apache-2.0 license or a
66
* compatible open source license.
7+
*
8+
* Any modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
710
*/
811

912
/*
@@ -25,11 +28,6 @@
2528
* under the License.
2629
*/
2730

28-
/*
29-
* Modifications Copyright OpenSearch Contributors. See
30-
* GitHub history for details.
31-
*/
32-
3331
import * as React from 'react';
3432
import { render, unmountComponentAtNode } from 'react-dom';
3533
import { CoreSetup, CoreStart, AppMountParameters } from 'opensearch-dashboards/public';

0 commit comments

Comments
 (0)