From 80662d6424603559fe57a025342f213351f782c4 Mon Sep 17 00:00:00 2001 From: Flavius Lacatusu Date: Tue, 8 Jun 2021 09:53:13 +0200 Subject: [PATCH 1/4] feat: Add check to validate codebase license header --- .github/dependabot.yml | 11 +++ .github/workflows/automation-check.yaml | 28 +++++++ .github/workflows/codecov.yml | 2 +- .github/workflows/gh_actions_pr.yaml | 2 +- .github/workflows/gh_actions_push.yaml | 2 +- .github/workflows/gh_actions_unit.yaml | 2 +- .github/workflows/release.yml | 11 +++ activity/manager.go | 3 +- api/events/event_bus.go | 5 +- api/jsonrpc/handlers.go | 6 +- api/jsonrpc/jsonrpc-api.go | 5 +- api/model/model_types.go | 5 +- api/rest/activity.go | 6 +- api/rest/common.go | 3 +- api/rest/execInit.go | 3 +- api/rest/execKubeConfig.go | 3 +- api/websocket/attach.go | 8 +- api/websocket/connect.go | 7 +- auth/auth.go | 6 +- auth/token.go | 3 +- auth/user.go | 5 +- cfg/cfg.go | 3 +- cfg/doc.go | 3 +- client/doc.go | 3 +- client/kubernetes_client_provider.go | 4 +- cloud-shell/src/const.ts | 8 +- cloud-shell/src/index.ts | 8 +- cloud-shell/src/json-rpc-connection.ts | 8 +- cloud-shell/src/terminal-protocol.ts | 8 +- cloud-shell/src/terminal.ts | 8 +- common/rest/error.go | 3 +- common/rest/response.go | 6 +- compile.sh | 5 +- devfile.yaml | 11 +++ exec-info/doc.go | 3 +- exec-info/info-exec.go | 4 +- exec-info/kubernetes_info_exec.go | 8 +- exec-info/kubernetes_info_exec_creator.go | 5 +- exec/activity-connection-saver.go | 6 +- exec/command_resolver.go | 3 +- exec/command_resolver_test.go | 6 +- exec/exec-manager-provider.go | 3 +- exec/health-watcher.go | 5 +- exec/health-watcher_test.go | 10 +-- exec/kubernetes_exec_manager.go | 3 +- exec/namespace_provider.go | 6 +- exec/pty_handler.go | 3 +- filter/container_filter.go | 3 +- filter/doc.go | 3 +- filter/kubernetes_filter.go | 3 +- filter/kubernetes_filter_test.go | 5 +- kubeconfig/kubeconfig.go | 4 +- license_header.txt | 10 +++ main.go | 8 +- make-release.sh | 11 +++ mocks/doc.go | 3 +- output/line-buffer/doc.go | 3 +- output/line-buffer/line_ringe-buffer_test.go | 3 +- output/line-buffer/line_ringe_buffer.go | 3 +- output/line-buffer/line_scanner.go | 3 +- output/line-buffer/line_scanner_test.go | 3 +- output/utf8stream/doc.go | 3 +- output/utf8stream/utf8-stream-filter.go | 3 +- output/utf8stream/utf8-stream-filter_test.go | 3 +- scripts/license.sh | 53 +++++++++++++ scripts/validate-license.py | 79 ++++++++++++++++++++ shell/doc.go | 3 +- shell/shell_detector.go | 5 +- shell/shell_detector_test.go | 6 +- shell/shell_info_parser.go | 3 +- shell/shell_info_parser_test.go | 6 +- ws-conn/err_handler.go | 3 +- ws-conn/ws-connection-handler.go | 8 +- 73 files changed, 348 insertions(+), 161 deletions(-) create mode 100644 .github/workflows/automation-check.yaml create mode 100644 license_header.txt create mode 100644 scripts/license.sh create mode 100644 scripts/validate-license.py diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 77001e98a..b23bdd0db 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,14 @@ +# +# Copyright (c) 2021 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation + version: 2 updates: # Enable version updates for Docker diff --git a/.github/workflows/automation-check.yaml b/.github/workflows/automation-check.yaml new file mode 100644 index 000000000..4ee625142 --- /dev/null +++ b/.github/workflows/automation-check.yaml @@ -0,0 +1,28 @@ +# +# Copyright (c) 2021 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation + +name: Che Machine Exec +on: [pull_request] + +jobs: + run: + name: Automation checks + runs-on: ubuntu-20.04 + steps: + - name: Checkout repo + uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v1 + with: + node-version: 12.x + - name: Check Eclipse license headers + run: | + /bin/bash scripts/check-license.sh --check-license diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 71973bd87..204c2f0a6 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2012-2021 Red Hat, Inc. +# Copyright (c) 2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/gh_actions_pr.yaml b/.github/workflows/gh_actions_pr.yaml index f9d16a95b..b12bb7a40 100644 --- a/.github/workflows/gh_actions_pr.yaml +++ b/.github/workflows/gh_actions_pr.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2012-2020 Red Hat, Inc. +# Copyright (c) 2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/gh_actions_push.yaml b/.github/workflows/gh_actions_push.yaml index 96f9991fc..177170831 100644 --- a/.github/workflows/gh_actions_push.yaml +++ b/.github/workflows/gh_actions_push.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2012-2020 Red Hat, Inc. +# Copyright (c) 2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/gh_actions_unit.yaml b/.github/workflows/gh_actions_unit.yaml index c03b622c1..920db0b3a 100644 --- a/.github/workflows/gh_actions_unit.yaml +++ b/.github/workflows/gh_actions_unit.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2012-2020 Red Hat, Inc. +# Copyright (c) 2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a30de53e..351fe19a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,14 @@ +# +# Copyright (c) 2021 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation + name: Release Che Machine Exec on: diff --git a/activity/manager.go b/activity/manager.go index 85bea80db..c6a672cd8 100644 --- a/activity/manager.go +++ b/activity/manager.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2020 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package activity diff --git a/api/events/event_bus.go b/api/events/event_bus.go index de75626f3..3a9b5c9fe 100644 --- a/api/events/event_bus.go +++ b/api/events/event_bus.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,12 +8,11 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package events import ( - "github.com/eclipse/che-go-jsonrpc" + jsonrpc "github.com/eclipse/che-go-jsonrpc" "github.com/eclipse/che-go-jsonrpc/event" "github.com/sirupsen/logrus" ) diff --git a/api/jsonrpc/handlers.go b/api/jsonrpc/handlers.go index 19eeb02d8..25ecd5916 100644 --- a/api/jsonrpc/handlers.go +++ b/api/jsonrpc/handlers.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,12 +8,12 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package jsonrpc import ( "errors" + "github.com/eclipse-che/che-machine-exec/auth" "github.com/eclipse-che/che-machine-exec/api/events" @@ -22,8 +22,8 @@ import ( "strconv" - "github.com/eclipse/che-go-jsonrpc" "github.com/eclipse-che/che-machine-exec/exec" + jsonrpc "github.com/eclipse/che-go-jsonrpc" ) const ( diff --git a/api/jsonrpc/jsonrpc-api.go b/api/jsonrpc/jsonrpc-api.go index 8697c153b..6387982ff 100644 --- a/api/jsonrpc/jsonrpc-api.go +++ b/api/jsonrpc/jsonrpc-api.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,13 +8,12 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package jsonrpc import ( - "github.com/eclipse/che-go-jsonrpc" "github.com/eclipse-che/che-machine-exec/api/model" + jsonrpc "github.com/eclipse/che-go-jsonrpc" ) // Constants that represent RPC methods identifiers. diff --git a/api/model/model_types.go b/api/model/model_types.go index f68ec75e2..61e122206 100644 --- a/api/model/model_types.go +++ b/api/model/model_types.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,14 +8,13 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package model import ( - "github.com/eclipse/che-go-jsonrpc/event" line_buffer "github.com/eclipse-che/che-machine-exec/output/line-buffer" ws_conn "github.com/eclipse-che/che-machine-exec/ws-conn" + "github.com/eclipse/che-go-jsonrpc/event" "k8s.io/client-go/tools/remotecommand" ) diff --git a/api/rest/activity.go b/api/rest/activity.go index 43a875fee..8813b01eb 100644 --- a/api/rest/activity.go +++ b/api/rest/activity.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2020 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,16 +8,16 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package rest import ( + "net/http" + "github.com/eclipse-che/che-machine-exec/activity" "github.com/eclipse-che/che-machine-exec/auth" restUtil "github.com/eclipse-che/che-machine-exec/common/rest" "github.com/gin-gonic/gin" - "net/http" ) func HandleActivityTick(c *gin.Context, manager activity.Manager) { diff --git a/api/rest/common.go b/api/rest/common.go index 9fe3a45c0..851fd1ddf 100644 --- a/api/rest/common.go +++ b/api/rest/common.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package rest diff --git a/api/rest/execInit.go b/api/rest/execInit.go index 8d1db1ed2..8349edc2c 100644 --- a/api/rest/execInit.go +++ b/api/rest/execInit.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package rest diff --git a/api/rest/execKubeConfig.go b/api/rest/execKubeConfig.go index 7551890e9..ee9d6e944 100644 --- a/api/rest/execKubeConfig.go +++ b/api/rest/execKubeConfig.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package rest diff --git a/api/websocket/attach.go b/api/websocket/attach.go index 47e61f3dc..1b1c309f8 100644 --- a/api/websocket/attach.go +++ b/api/websocket/attach.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,20 +8,20 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package websocket import ( "errors" + "net/http" + "strconv" + "github.com/eclipse-che/che-machine-exec/auth" "github.com/eclipse-che/che-machine-exec/common/rest" "github.com/eclipse-che/che-machine-exec/exec" "github.com/gin-gonic/gin" "github.com/gorilla/websocket" "github.com/sirupsen/logrus" - "net/http" - "strconv" ) var ( diff --git a/api/websocket/connect.go b/api/websocket/connect.go index 8c1ec98a1..c8e3cb146 100644 --- a/api/websocket/connect.go +++ b/api/websocket/connect.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,18 +8,17 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package websocket import ( - jsonrpc "github.com/eclipse/che-go-jsonrpc" - "github.com/eclipse/che-go-jsonrpc/jsonrpcws" "github.com/eclipse-che/che-machine-exec/api/events" execRpc "github.com/eclipse-che/che-machine-exec/api/jsonrpc" "github.com/eclipse-che/che-machine-exec/api/model" "github.com/eclipse-che/che-machine-exec/auth" "github.com/eclipse-che/che-machine-exec/common/rest" + jsonrpc "github.com/eclipse/che-go-jsonrpc" + "github.com/eclipse/che-go-jsonrpc/jsonrpcws" "github.com/gin-gonic/gin" "github.com/sirupsen/logrus" ) diff --git a/auth/auth.go b/auth/auth.go index 7d7d133fa..7d135bff2 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2020 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,16 +8,16 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package auth import ( + "net/http" + "github.com/eclipse-che/che-machine-exec/cfg" restUtil "github.com/eclipse-che/che-machine-exec/common/rest" "github.com/gin-gonic/gin" "github.com/sirupsen/logrus" - "net/http" ) func IsEnabled() bool { diff --git a/auth/token.go b/auth/token.go index 47f7ba3fe..ec21993d6 100644 --- a/auth/token.go +++ b/auth/token.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2020 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package auth diff --git a/auth/user.go b/auth/user.go index fc9df15ce..d8c550cd6 100644 --- a/auth/user.go +++ b/auth/user.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2020 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package auth @@ -35,7 +34,7 @@ var ( Version: "v1", } UserGroupResource = &schema.GroupResource{ - Group: "user.openshift.io", + Group: "user.openshift.io", Resource: "users", } ) diff --git a/cfg/cfg.go b/cfg/cfg.go index 6b239cf9b..545044ddf 100644 --- a/cfg/cfg.go +++ b/cfg/cfg.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2020 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package cfg diff --git a/cfg/doc.go b/cfg/doc.go index 865854b44..7bb8be683 100644 --- a/cfg/doc.go +++ b/cfg/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2020 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package cfg diff --git a/client/doc.go b/client/doc.go index d5ef1d4fe..110fc2ddc 100644 --- a/client/doc.go +++ b/client/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package client diff --git a/client/kubernetes_client_provider.go b/client/kubernetes_client_provider.go index 0ce296304..74270125d 100644 --- a/client/kubernetes_client_provider.go +++ b/client/kubernetes_client_provider.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,12 +8,12 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package client import ( "errors" + "github.com/eclipse-che/che-machine-exec/api/model" "github.com/eclipse-che/che-machine-exec/auth" "github.com/sirupsen/logrus" diff --git a/cloud-shell/src/const.ts b/cloud-shell/src/const.ts index 89ec529d2..fdac606f5 100644 --- a/cloud-shell/src/const.ts +++ b/cloud-shell/src/const.ts @@ -1,9 +1,11 @@ -/* - * Copyright (c) 2020 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials are made +/** + * Copyright (c) 2021 Red Hat, Inc. + * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * + * SPDX-License-Identifier: EPL-2.0 + * * Contributors: * Red Hat, Inc. - initial API and implementation */ diff --git a/cloud-shell/src/index.ts b/cloud-shell/src/index.ts index 761be44a8..f53573e6c 100644 --- a/cloud-shell/src/index.ts +++ b/cloud-shell/src/index.ts @@ -1,9 +1,11 @@ -/* - * Copyright (c) 2019 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials are made +/** + * Copyright (c) 2021 Red Hat, Inc. + * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * + * SPDX-License-Identifier: EPL-2.0 + * * Contributors: * Red Hat, Inc. - initial API and implementation */ diff --git a/cloud-shell/src/json-rpc-connection.ts b/cloud-shell/src/json-rpc-connection.ts index c0bb38cda..a5b63848b 100644 --- a/cloud-shell/src/json-rpc-connection.ts +++ b/cloud-shell/src/json-rpc-connection.ts @@ -1,9 +1,11 @@ -/* - * Copyright (c) 2019 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials are made +/** + * Copyright (c) 2021 Red Hat, Inc. + * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * + * SPDX-License-Identifier: EPL-2.0 + * * Contributors: * Red Hat, Inc. - initial API and implementation */ diff --git a/cloud-shell/src/terminal-protocol.ts b/cloud-shell/src/terminal-protocol.ts index eb11f9e46..e0e0d7be6 100644 --- a/cloud-shell/src/terminal-protocol.ts +++ b/cloud-shell/src/terminal-protocol.ts @@ -1,9 +1,11 @@ -/* - * Copyright (c) 2019 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials are made +/** + * Copyright (c) 2021 Red Hat, Inc. + * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * + * SPDX-License-Identifier: EPL-2.0 + * * Contributors: * Red Hat, Inc. - initial API and implementation */ diff --git a/cloud-shell/src/terminal.ts b/cloud-shell/src/terminal.ts index e9b8a9db0..c0a268eb3 100644 --- a/cloud-shell/src/terminal.ts +++ b/cloud-shell/src/terminal.ts @@ -1,9 +1,11 @@ -/* - * Copyright (c) 2019 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials are made +/** + * Copyright (c) 2021 Red Hat, Inc. + * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * + * SPDX-License-Identifier: EPL-2.0 + * * Contributors: * Red Hat, Inc. - initial API and implementation */ diff --git a/common/rest/error.go b/common/rest/error.go index 2994f1e61..0291f4dd1 100644 --- a/common/rest/error.go +++ b/common/rest/error.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package rest diff --git a/common/rest/response.go b/common/rest/response.go index 56e7c7efb..ff542105a 100644 --- a/common/rest/response.go +++ b/common/rest/response.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,14 +8,14 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package rest import ( + "net/http" + "github.com/gin-gonic/gin" "github.com/sirupsen/logrus" - "net/http" ) func WriteResponse(c *gin.Context, httpStatus int, message string) { diff --git a/compile.sh b/compile.sh index f7be3d560..713513bcd 100755 --- a/compile.sh +++ b/compile.sh @@ -1,12 +1,13 @@ #!/bin/bash -# -# Copyright (c) 2012-2019 Red Hat, Inc. +# Copyright (c) 2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ # # SPDX-License-Identifier: EPL-2.0 # +# Contributors: +# Red Hat, Inc. - initial API and implementation function compile() { diff --git a/devfile.yaml b/devfile.yaml index 527fa3cf4..1ea8361ac 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -1,3 +1,14 @@ +# +# Copyright (c) 2021 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation + apiVersion: 1.0.0 metadata: name: che-machine-exec diff --git a/exec-info/doc.go b/exec-info/doc.go index 38e08984d..f4b3dafc7 100644 --- a/exec-info/doc.go +++ b/exec-info/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package exec_info diff --git a/exec-info/info-exec.go b/exec-info/info-exec.go index 80de62eaf..3239103e9 100644 --- a/exec-info/info-exec.go +++ b/exec-info/info-exec.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,7 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// + package exec_info import ( diff --git a/exec-info/kubernetes_info_exec.go b/exec-info/kubernetes_info_exec.go index 26a311e19..2249b419e 100644 --- a/exec-info/kubernetes_info_exec.go +++ b/exec-info/kubernetes_info_exec.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,20 +8,20 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package exec_info import ( "bytes" + "time" + "github.com/pkg/errors" "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/kubernetes/typed/core/v1" + v1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/rest" "k8s.io/client-go/tools/remotecommand" - "time" ) const ( diff --git a/exec-info/kubernetes_info_exec_creator.go b/exec-info/kubernetes_info_exec_creator.go index 5ed0ccab2..02852c7c6 100644 --- a/exec-info/kubernetes_info_exec_creator.go +++ b/exec-info/kubernetes_info_exec_creator.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,13 +8,12 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package exec_info import ( "github.com/eclipse-che/che-machine-exec/api/model" - "k8s.io/client-go/kubernetes/typed/core/v1" + v1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/rest" ) diff --git a/exec/activity-connection-saver.go b/exec/activity-connection-saver.go index 18b62214c..a24c9f7da 100644 --- a/exec/activity-connection-saver.go +++ b/exec/activity-connection-saver.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,13 +8,13 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package exec import ( - "github.com/eclipse-che/che-machine-exec/api/model" "time" + + "github.com/eclipse-che/che-machine-exec/api/model" ) const ( diff --git a/exec/command_resolver.go b/exec/command_resolver.go index 821388c8a..ad3ad099a 100644 --- a/exec/command_resolver.go +++ b/exec/command_resolver.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package exec diff --git a/exec/command_resolver_test.go b/exec/command_resolver_test.go index fa244c256..9c4cb37c8 100644 --- a/exec/command_resolver_test.go +++ b/exec/command_resolver_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,17 +8,17 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package exec import ( "errors" + "testing" + "github.com/eclipse-che/che-machine-exec/api/model" "github.com/eclipse-che/che-machine-exec/mocks" "github.com/eclipse-che/che-machine-exec/shell" "github.com/stretchr/testify/assert" - "testing" ) var ( diff --git a/exec/exec-manager-provider.go b/exec/exec-manager-provider.go index d6dec90a2..b5d8142d2 100644 --- a/exec/exec-manager-provider.go +++ b/exec/exec-manager-provider.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package exec diff --git a/exec/health-watcher.go b/exec/health-watcher.go index 0e57d3d72..e9d050622 100644 --- a/exec/health-watcher.go +++ b/exec/health-watcher.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,13 +8,12 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package exec import ( - "github.com/eclipse/che-go-jsonrpc/event" "github.com/eclipse-che/che-machine-exec/api/model" + "github.com/eclipse/che-go-jsonrpc/event" ) // Exec health watcher. This watcher cleans up exec resources diff --git a/exec/health-watcher_test.go b/exec/health-watcher_test.go index 87d2698af..18e31cf11 100644 --- a/exec/health-watcher_test.go +++ b/exec/health-watcher_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,17 +8,17 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package exec import ( "errors" - "github.com/eclipse/che-go-jsonrpc/event" - "github.com/eclipse-che/che-machine-exec/api/model" - "github.com/eclipse-che/che-machine-exec/mocks" "testing" "time" + + "github.com/eclipse-che/che-machine-exec/api/model" + "github.com/eclipse-che/che-machine-exec/mocks" + "github.com/eclipse/che-go-jsonrpc/event" ) const Exec1ID = 0 diff --git a/exec/kubernetes_exec_manager.go b/exec/kubernetes_exec_manager.go index 9a13834c0..d912debcb 100644 --- a/exec/kubernetes_exec_manager.go +++ b/exec/kubernetes_exec_manager.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package exec diff --git a/exec/namespace_provider.go b/exec/namespace_provider.go index 20653a6b0..89930044c 100644 --- a/exec/namespace_provider.go +++ b/exec/namespace_provider.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,13 +8,13 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package exec import ( - "github.com/sirupsen/logrus" "io/ioutil" + + "github.com/sirupsen/logrus" ) const ( diff --git a/exec/pty_handler.go b/exec/pty_handler.go index f4e49d89f..a8c4ef108 100644 --- a/exec/pty_handler.go +++ b/exec/pty_handler.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package exec diff --git a/filter/container_filter.go b/filter/container_filter.go index 60364280f..fff859ade 100644 --- a/filter/container_filter.go +++ b/filter/container_filter.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package filter diff --git a/filter/doc.go b/filter/doc.go index 1500bb615..ef203b633 100644 --- a/filter/doc.go +++ b/filter/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package filter diff --git a/filter/kubernetes_filter.go b/filter/kubernetes_filter.go index edff7654e..55b4a3d6c 100644 --- a/filter/kubernetes_filter.go +++ b/filter/kubernetes_filter.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package filter diff --git a/filter/kubernetes_filter_test.go b/filter/kubernetes_filter_test.go index 66e0cca76..944f8f000 100644 --- a/filter/kubernetes_filter_test.go +++ b/filter/kubernetes_filter_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package filter @@ -78,7 +77,7 @@ func TestShouldReturnContainerInfoWhenWorkspaceContainsTwoContainerInThePod(t *t podList := corev1.PodList{Items: []corev1.Pod{pod}} podGetter.On("Pods", Namespace).Return(podInterface).Once() - podInterface.On("List", mock.Anything, mock.Anything).Return(&podList, nil) + podInterface.On("List", mock.Anything, mock.Anything).Return(&podList, nil) containerFilter := NewKubernetesContainerFilter(Namespace, podGetter) containerInfo, _ := containerFilter.FindContainerInfo(identifier) diff --git a/kubeconfig/kubeconfig.go b/kubeconfig/kubeconfig.go index f6dc85d6f..20f3a898b 100644 --- a/kubeconfig/kubeconfig.go +++ b/kubeconfig/kubeconfig.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2019-2020 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,7 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// + package kubeconfig import ( diff --git a/license_header.txt b/license_header.txt new file mode 100644 index 000000000..5b371e031 --- /dev/null +++ b/license_header.txt @@ -0,0 +1,10 @@ + +Copyright (c) 2021 Red Hat, Inc. +This program and the accompanying materials are made +available under the terms of the Eclipse Public License 2.0 +which is available at https://www.eclipse.org/legal/epl-2.0/ + +SPDX-License-Identifier: EPL-2.0 + +Contributors: + Red Hat, Inc. - initial API and implementation diff --git a/main.go b/main.go index 679dcebdb..00ff8e6a6 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,19 +8,19 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package main import ( - "github.com/eclipse-che/che-machine-exec/activity" "net/http" - jsonrpc "github.com/eclipse/che-go-jsonrpc" + "github.com/eclipse-che/che-machine-exec/activity" + jsonRpcApi "github.com/eclipse-che/che-machine-exec/api/jsonrpc" "github.com/eclipse-che/che-machine-exec/api/rest" "github.com/eclipse-che/che-machine-exec/api/websocket" "github.com/eclipse-che/che-machine-exec/cfg" + jsonrpc "github.com/eclipse/che-go-jsonrpc" "github.com/gin-gonic/gin" "github.com/sirupsen/logrus" ) diff --git a/make-release.sh b/make-release.sh index aff070747..3a5a6952e 100755 --- a/make-release.sh +++ b/make-release.sh @@ -1,4 +1,15 @@ #!/bin/bash +# +# Copyright (c) 2021 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation + # Release process automation script. # Used to create branch/tag, update VERSION files # and and trigger release by force pushing changes to the release branch diff --git a/mocks/doc.go b/mocks/doc.go index 6c6f7decd..29d835e40 100644 --- a/mocks/doc.go +++ b/mocks/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package mocks diff --git a/output/line-buffer/doc.go b/output/line-buffer/doc.go index 6f62b3ce9..2cb8056c0 100644 --- a/output/line-buffer/doc.go +++ b/output/line-buffer/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package line_buffer diff --git a/output/line-buffer/line_ringe-buffer_test.go b/output/line-buffer/line_ringe-buffer_test.go index e6cdcdd36..d2993f5a9 100644 --- a/output/line-buffer/line_ringe-buffer_test.go +++ b/output/line-buffer/line_ringe-buffer_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package line_buffer diff --git a/output/line-buffer/line_ringe_buffer.go b/output/line-buffer/line_ringe_buffer.go index 607e0336e..9728108d9 100644 --- a/output/line-buffer/line_ringe_buffer.go +++ b/output/line-buffer/line_ringe_buffer.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package line_buffer diff --git a/output/line-buffer/line_scanner.go b/output/line-buffer/line_scanner.go index d7a5bb6fd..6877c2f0a 100644 --- a/output/line-buffer/line_scanner.go +++ b/output/line-buffer/line_scanner.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package line_buffer diff --git a/output/line-buffer/line_scanner_test.go b/output/line-buffer/line_scanner_test.go index 1880baa22..b458badaf 100644 --- a/output/line-buffer/line_scanner_test.go +++ b/output/line-buffer/line_scanner_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package line_buffer diff --git a/output/utf8stream/doc.go b/output/utf8stream/doc.go index bb8592f78..5dcaa2f13 100644 --- a/output/utf8stream/doc.go +++ b/output/utf8stream/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package utf8stream diff --git a/output/utf8stream/utf8-stream-filter.go b/output/utf8stream/utf8-stream-filter.go index a7d72d62d..21c714676 100644 --- a/output/utf8stream/utf8-stream-filter.go +++ b/output/utf8stream/utf8-stream-filter.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package utf8stream diff --git a/output/utf8stream/utf8-stream-filter_test.go b/output/utf8stream/utf8-stream-filter_test.go index 109ccb84f..e2c2ccfc8 100644 --- a/output/utf8stream/utf8-stream-filter_test.go +++ b/output/utf8stream/utf8-stream-filter_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package utf8stream diff --git a/scripts/license.sh b/scripts/license.sh new file mode 100644 index 000000000..94bea72d4 --- /dev/null +++ b/scripts/license.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# Copyright (c) 2021 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation + +export ROOT_DIR=$(dirname $(dirname $(readlink -f "$0"))); + +# Validate a Eclipse Che license header +function validateChectlLicenseHeader() { + python "${ROOT_DIR}"/scripts/validate-license.py $(find "${ROOT_DIR}" -type d \( -path "${ROOT_DIR}"/vendor -o -path "${ROOT_DIR}"/templates \) -prune -false \ + -o -name '*.sh' -o -name '*.ts' -o -name '*.yml' -o -name '*.yaml' -o -name '*.go' \ + | grep -v vendor \ + | grep -v mocks) +} + +# Add a license to a file without license +function addLicensetoChectlCode() { + if ! command -v addlicense &> /dev/null + then + echo "Command addlicense not found locally. Please install it from https://github.com/google/addlicense." + exit 1 + fi + + addlicense -v -f "${ROOT_DIR}"/license_header.txt $(find "${ROOT_DIR}" -type d \( -path "${ROOT_DIR}"/vendor \) -prune -false \ + -o -name '*.sh' -o -name '*.ts' -o -name '*.yml' -o -name '*.yaml' -o -name '*.go' \ + | grep -v mocks \ + | grep -v vendor) +} + +# catch first arguments with $1 +case "$1" in + -c|--check-license) + echo -e "[INFO] Launching Eclipse Che license header check." + validateChectlLicenseHeader + ;; + -a|--add-license) + echo -e "[INFO] Start adding Eclipse Che license headers to code." + addLicensetoChectlCode + ;; + *) + # else + echo "Usage: + -c|--check-license: Check Eclipse license in codebase + -a|--add-license: Add a license to codebase. The file should not have any license if you execute this command. + " + ;; +esac diff --git a/scripts/validate-license.py b/scripts/validate-license.py new file mode 100644 index 000000000..0ff601ba0 --- /dev/null +++ b/scripts/validate-license.py @@ -0,0 +1,79 @@ +# +# Copyright (c) 2019-2021 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation + +from __future__ import ( + absolute_import, print_function, division, unicode_literals +) + +import logging +import re +import sys +from datetime import datetime + +logging.basicConfig(level=logging.DEBUG) +logger = logging.getLogger(__name__) + +CURRENT_YEAR = datetime.today().year + +COPYRIGHT_RE=r'Copyright \(c\) (\d+) Red Hat, Inc.' +PATTERN1=r'This program and the accompanying materials are made' +PATTERN2=r'available under the terms of the Eclipse Public License 2.0' +PATTERN3=r'which is available at https://www.eclipse.org/legal/epl-2.0/' +PATTERN4=r'SPDX-License-Identifier: EPL-2.0' +PATTERN5=r'Contributors:' +PATTERN6=r'Red Hat, Inc. - initial API and implementation' +ARRAY_OF_PATTERNS=[COPYRIGHT_RE, PATTERN6, PATTERN2, PATTERN3, PATTERN4, PATTERN5, PATTERN6] + +def update_go_license(name, force=False): + with open(name) as f: + orig_lines = list(f) + lines = list(orig_lines) + + for pattern in ARRAY_OF_PATTERNS: + try: + validated = license_lines_check(lines,pattern) + if validated is None: + raise ValueError('Exception: Found an invalid license, file_name=%s, pattern=%s, success=%s' % (name, pattern, False)) + except ValueError as err: + print(err.args) + sys.exit(1) + print('Successfully validated license header', 'file_name=%s, success=%s' % (name, True)) + +def license_lines_check(lines, pattern): + for i, line in enumerate(lines[:20]): + found = False + + m = re.compile(pattern, re.I).search(line) + if not m: + continue + found=True + + return found + +def main(): + if len(sys.argv) == 1: + print('USAGE: %s FILE ...' % sys.argv[0]) + sys.exit(1) + + for name in sys.argv[1:]: + if name.endswith('.go') or name.endswith('.sh') or name.endswith('.yaml') or name.endswith('.yml') or name.endswith('.ts'): + try: + update_go_license(name) + except Exception as error: + logger.error('Failed to process file %s', name) + logger.exception(error) + raise error + else: + raise NotImplementedError('Unsupported file type: %s' % name) + + +if __name__ == "__main__": + main() diff --git a/shell/doc.go b/shell/doc.go index 6c87e5dea..ba98b390c 100644 --- a/shell/doc.go +++ b/shell/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package shell diff --git a/shell/shell_detector.go b/shell/shell_detector.go index e915ebc71..0395896ec 100644 --- a/shell/shell_detector.go +++ b/shell/shell_detector.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,14 +8,13 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package shell import ( "github.com/eclipse-che/che-machine-exec/api/model" "github.com/eclipse-che/che-machine-exec/client" - "github.com/eclipse-che/che-machine-exec/exec-info" + exec_info "github.com/eclipse-che/che-machine-exec/exec-info" "github.com/sirupsen/logrus" ) diff --git a/shell/shell_detector_test.go b/shell/shell_detector_test.go index 4fa8aa5b5..e4cbebee4 100644 --- a/shell/shell_detector_test.go +++ b/shell/shell_detector_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,17 +8,17 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package shell import ( "fmt" + "testing" + "github.com/eclipse-che/che-machine-exec/api/model" "github.com/eclipse-che/che-machine-exec/mocks" "github.com/pkg/errors" "github.com/stretchr/testify/assert" - "testing" ) var ( diff --git a/shell/shell_info_parser.go b/shell/shell_info_parser.go index 13ff49f6c..1c840bf09 100644 --- a/shell/shell_info_parser.go +++ b/shell/shell_info_parser.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package shell diff --git a/shell/shell_info_parser_test.go b/shell/shell_info_parser_test.go index a7ee654a0..c148077c0 100644 --- a/shell/shell_info_parser_test.go +++ b/shell/shell_info_parser_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,13 +8,13 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package shell import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func TestShouldParseUID(t *testing.T) { diff --git a/ws-conn/err_handler.go b/ws-conn/err_handler.go index d356a7a80..5eada0a0d 100644 --- a/ws-conn/err_handler.go +++ b/ws-conn/err_handler.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,7 +8,6 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package ws_conn diff --git a/ws-conn/ws-connection-handler.go b/ws-conn/ws-connection-handler.go index 35b3a81e1..50e9520f3 100644 --- a/ws-conn/ws-connection-handler.go +++ b/ws-conn/ws-connection-handler.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Red Hat, Inc. +// Copyright (c) 2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,15 +8,15 @@ // // Contributors: // Red Hat, Inc. - initial API and implementation -// package ws_conn import ( - "github.com/gorilla/websocket" - "github.com/sirupsen/logrus" "sync" "time" + + "github.com/gorilla/websocket" + "github.com/sirupsen/logrus" ) const ( From 078481cc04d5caf119692863e239e2a725c5ebeb Mon Sep 17 00:00:00 2001 From: Flavius Lacatusu Date: Tue, 8 Jun 2021 10:04:58 +0200 Subject: [PATCH 2/4] fixes --- .github/workflows/automation-check.yaml | 2 +- api/events/event_bus.go | 2 +- api/jsonrpc/handlers.go | 2 +- api/jsonrpc/jsonrpc-api.go | 2 +- exec-info/kubernetes_info_exec.go | 2 +- exec-info/kubernetes_info_exec_creator.go | 2 +- shell/shell_detector.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/automation-check.yaml b/.github/workflows/automation-check.yaml index 4ee625142..890e71df2 100644 --- a/.github/workflows/automation-check.yaml +++ b/.github/workflows/automation-check.yaml @@ -25,4 +25,4 @@ jobs: node-version: 12.x - name: Check Eclipse license headers run: | - /bin/bash scripts/check-license.sh --check-license + /bin/bash scripts/license.sh --check-license diff --git a/api/events/event_bus.go b/api/events/event_bus.go index 3a9b5c9fe..1ac7d4a7e 100644 --- a/api/events/event_bus.go +++ b/api/events/event_bus.go @@ -12,7 +12,7 @@ package events import ( - jsonrpc "github.com/eclipse/che-go-jsonrpc" + "github.com/eclipse/che-go-jsonrpc" "github.com/eclipse/che-go-jsonrpc/event" "github.com/sirupsen/logrus" ) diff --git a/api/jsonrpc/handlers.go b/api/jsonrpc/handlers.go index 25ecd5916..5a580b7ac 100644 --- a/api/jsonrpc/handlers.go +++ b/api/jsonrpc/handlers.go @@ -23,7 +23,7 @@ import ( "strconv" "github.com/eclipse-che/che-machine-exec/exec" - jsonrpc "github.com/eclipse/che-go-jsonrpc" + "github.com/eclipse/che-go-jsonrpc" ) const ( diff --git a/api/jsonrpc/jsonrpc-api.go b/api/jsonrpc/jsonrpc-api.go index 6387982ff..1cf81cd1a 100644 --- a/api/jsonrpc/jsonrpc-api.go +++ b/api/jsonrpc/jsonrpc-api.go @@ -13,7 +13,7 @@ package jsonrpc import ( "github.com/eclipse-che/che-machine-exec/api/model" - jsonrpc "github.com/eclipse/che-go-jsonrpc" + "github.com/eclipse/che-go-jsonrpc" ) // Constants that represent RPC methods identifiers. diff --git a/exec-info/kubernetes_info_exec.go b/exec-info/kubernetes_info_exec.go index 2249b419e..eb5e49abb 100644 --- a/exec-info/kubernetes_info_exec.go +++ b/exec-info/kubernetes_info_exec.go @@ -19,7 +19,7 @@ import ( "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" "k8s.io/client-go/kubernetes/scheme" - v1 "k8s.io/client-go/kubernetes/typed/core/v1" + "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/rest" "k8s.io/client-go/tools/remotecommand" ) diff --git a/exec-info/kubernetes_info_exec_creator.go b/exec-info/kubernetes_info_exec_creator.go index 02852c7c6..099ccf68e 100644 --- a/exec-info/kubernetes_info_exec_creator.go +++ b/exec-info/kubernetes_info_exec_creator.go @@ -13,7 +13,7 @@ package exec_info import ( "github.com/eclipse-che/che-machine-exec/api/model" - v1 "k8s.io/client-go/kubernetes/typed/core/v1" + "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/rest" ) diff --git a/shell/shell_detector.go b/shell/shell_detector.go index 0395896ec..f6b28866e 100644 --- a/shell/shell_detector.go +++ b/shell/shell_detector.go @@ -14,7 +14,7 @@ package shell import ( "github.com/eclipse-che/che-machine-exec/api/model" "github.com/eclipse-che/che-machine-exec/client" - exec_info "github.com/eclipse-che/che-machine-exec/exec-info" + "github.com/eclipse-che/che-machine-exec/exec-info" "github.com/sirupsen/logrus" ) From f1d200bc455178e6efce1ce1d543455b337b989c Mon Sep 17 00:00:00 2001 From: Flavius Lacatusu Date: Tue, 8 Jun 2021 14:25:28 +0200 Subject: [PATCH 3/4] fix year Signed-off-by: Flavius Lacatusu --- .github/dependabot.yml | 2 +- .github/workflows/automation-check.yaml | 2 +- .github/workflows/codecov.yml | 2 +- .github/workflows/gh_actions_pr.yaml | 2 +- .github/workflows/gh_actions_push.yaml | 2 +- .github/workflows/gh_actions_unit.yaml | 2 +- .github/workflows/release.yml | 2 +- activity/manager.go | 2 +- api/events/event_bus.go | 4 ++-- api/jsonrpc/handlers.go | 4 ++-- api/jsonrpc/jsonrpc-api.go | 4 ++-- api/model/model_types.go | 2 +- api/rest/activity.go | 2 +- api/rest/common.go | 2 +- api/rest/execInit.go | 2 +- api/rest/execKubeConfig.go | 2 +- api/websocket/attach.go | 2 +- api/websocket/connect.go | 2 +- auth/auth.go | 2 +- auth/token.go | 2 +- auth/user.go | 2 +- cfg/cfg.go | 2 +- cfg/doc.go | 2 +- client/doc.go | 2 +- client/kubernetes_client_provider.go | 2 +- cloud-shell/src/const.ts | 2 +- cloud-shell/src/index.ts | 2 +- cloud-shell/src/json-rpc-connection.ts | 2 +- cloud-shell/src/terminal-protocol.ts | 2 +- cloud-shell/src/terminal.ts | 2 +- common/rest/error.go | 2 +- common/rest/response.go | 2 +- compile.sh | 2 +- devfile.yaml | 2 +- exec-info/doc.go | 2 +- exec-info/info-exec.go | 2 +- exec-info/kubernetes_info_exec.go | 4 ++-- exec-info/kubernetes_info_exec_creator.go | 4 ++-- exec/activity-connection-saver.go | 2 +- exec/command_resolver.go | 2 +- exec/command_resolver_test.go | 2 +- exec/exec-manager-provider.go | 2 +- exec/health-watcher.go | 2 +- exec/health-watcher_test.go | 2 +- exec/kubernetes_exec_manager.go | 2 +- exec/namespace_provider.go | 2 +- exec/pty_handler.go | 2 +- filter/container_filter.go | 2 +- filter/doc.go | 2 +- filter/kubernetes_filter.go | 2 +- filter/kubernetes_filter_test.go | 2 +- kubeconfig/kubeconfig.go | 2 +- license_header.txt | 2 +- main.go | 2 +- make-release.sh | 2 +- output/line-buffer/doc.go | 2 +- output/line-buffer/line_ringe-buffer_test.go | 2 +- output/line-buffer/line_ringe_buffer.go | 2 +- output/line-buffer/line_scanner.go | 2 +- output/line-buffer/line_scanner_test.go | 2 +- output/utf8stream/doc.go | 2 +- output/utf8stream/utf8-stream-filter.go | 2 +- output/utf8stream/utf8-stream-filter_test.go | 2 +- scripts/license.sh | 2 +- scripts/validate-license.py | 2 +- shell/doc.go | 2 +- shell/shell_detector.go | 4 ++-- shell/shell_detector_test.go | 2 +- shell/shell_info_parser.go | 2 +- shell/shell_info_parser_test.go | 2 +- ws-conn/err_handler.go | 2 +- ws-conn/ws-connection-handler.go | 2 +- 72 files changed, 78 insertions(+), 78 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b23bdd0db..f34b9db94 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Red Hat, Inc. +# Copyright (c) 2019-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/automation-check.yaml b/.github/workflows/automation-check.yaml index 890e71df2..a09b0501a 100644 --- a/.github/workflows/automation-check.yaml +++ b/.github/workflows/automation-check.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Red Hat, Inc. +# Copyright (c) 2019-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 204c2f0a6..68959aafe 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Red Hat, Inc. +# Copyright (c) 2019-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/gh_actions_pr.yaml b/.github/workflows/gh_actions_pr.yaml index b12bb7a40..eec45fa13 100644 --- a/.github/workflows/gh_actions_pr.yaml +++ b/.github/workflows/gh_actions_pr.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Red Hat, Inc. +# Copyright (c) 2019-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/gh_actions_push.yaml b/.github/workflows/gh_actions_push.yaml index 177170831..0b5b3b3c2 100644 --- a/.github/workflows/gh_actions_push.yaml +++ b/.github/workflows/gh_actions_push.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Red Hat, Inc. +# Copyright (c) 2019-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/gh_actions_unit.yaml b/.github/workflows/gh_actions_unit.yaml index 920db0b3a..72d39df46 100644 --- a/.github/workflows/gh_actions_unit.yaml +++ b/.github/workflows/gh_actions_unit.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Red Hat, Inc. +# Copyright (c) 2019-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 351fe19a3..e18e288ff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Red Hat, Inc. +# Copyright (c) 2019-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/activity/manager.go b/activity/manager.go index c6a672cd8..3662543ef 100644 --- a/activity/manager.go +++ b/activity/manager.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/api/events/event_bus.go b/api/events/event_bus.go index 1ac7d4a7e..77caf9fcc 100644 --- a/api/events/event_bus.go +++ b/api/events/event_bus.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -12,7 +12,7 @@ package events import ( - "github.com/eclipse/che-go-jsonrpc" + jsonrpc "github.com/eclipse/che-go-jsonrpc" "github.com/eclipse/che-go-jsonrpc/event" "github.com/sirupsen/logrus" ) diff --git a/api/jsonrpc/handlers.go b/api/jsonrpc/handlers.go index 5a580b7ac..a4fbe8912 100644 --- a/api/jsonrpc/handlers.go +++ b/api/jsonrpc/handlers.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -23,7 +23,7 @@ import ( "strconv" "github.com/eclipse-che/che-machine-exec/exec" - "github.com/eclipse/che-go-jsonrpc" + jsonrpc "github.com/eclipse/che-go-jsonrpc" ) const ( diff --git a/api/jsonrpc/jsonrpc-api.go b/api/jsonrpc/jsonrpc-api.go index 1cf81cd1a..418058aa6 100644 --- a/api/jsonrpc/jsonrpc-api.go +++ b/api/jsonrpc/jsonrpc-api.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -13,7 +13,7 @@ package jsonrpc import ( "github.com/eclipse-che/che-machine-exec/api/model" - "github.com/eclipse/che-go-jsonrpc" + jsonrpc "github.com/eclipse/che-go-jsonrpc" ) // Constants that represent RPC methods identifiers. diff --git a/api/model/model_types.go b/api/model/model_types.go index 61e122206..b15f55051 100644 --- a/api/model/model_types.go +++ b/api/model/model_types.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/api/rest/activity.go b/api/rest/activity.go index 8813b01eb..2476c45c6 100644 --- a/api/rest/activity.go +++ b/api/rest/activity.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/api/rest/common.go b/api/rest/common.go index 851fd1ddf..dec70a3ce 100644 --- a/api/rest/common.go +++ b/api/rest/common.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/api/rest/execInit.go b/api/rest/execInit.go index 8349edc2c..d3b5ebe85 100644 --- a/api/rest/execInit.go +++ b/api/rest/execInit.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/api/rest/execKubeConfig.go b/api/rest/execKubeConfig.go index ee9d6e944..94ab9c2c0 100644 --- a/api/rest/execKubeConfig.go +++ b/api/rest/execKubeConfig.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/api/websocket/attach.go b/api/websocket/attach.go index 1b1c309f8..e63858fc5 100644 --- a/api/websocket/attach.go +++ b/api/websocket/attach.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/api/websocket/connect.go b/api/websocket/connect.go index c8e3cb146..36047de3a 100644 --- a/api/websocket/connect.go +++ b/api/websocket/connect.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/auth/auth.go b/auth/auth.go index 7d135bff2..d796625de 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/auth/token.go b/auth/token.go index ec21993d6..1af310fb5 100644 --- a/auth/token.go +++ b/auth/token.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/auth/user.go b/auth/user.go index d8c550cd6..f4eb9d9e1 100644 --- a/auth/user.go +++ b/auth/user.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/cfg/cfg.go b/cfg/cfg.go index 545044ddf..d73f9e30c 100644 --- a/cfg/cfg.go +++ b/cfg/cfg.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/cfg/doc.go b/cfg/doc.go index 7bb8be683..90be3deca 100644 --- a/cfg/doc.go +++ b/cfg/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/client/doc.go b/client/doc.go index 110fc2ddc..453810593 100644 --- a/client/doc.go +++ b/client/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/client/kubernetes_client_provider.go b/client/kubernetes_client_provider.go index 74270125d..ad367d173 100644 --- a/client/kubernetes_client_provider.go +++ b/client/kubernetes_client_provider.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/cloud-shell/src/const.ts b/cloud-shell/src/const.ts index fdac606f5..efe9be9bb 100644 --- a/cloud-shell/src/const.ts +++ b/cloud-shell/src/const.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021 Red Hat, Inc. + * Copyright (c) 2019-2021 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/cloud-shell/src/index.ts b/cloud-shell/src/index.ts index f53573e6c..2c484fd91 100644 --- a/cloud-shell/src/index.ts +++ b/cloud-shell/src/index.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021 Red Hat, Inc. + * Copyright (c) 2019-2021 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/cloud-shell/src/json-rpc-connection.ts b/cloud-shell/src/json-rpc-connection.ts index a5b63848b..5f89e80e8 100644 --- a/cloud-shell/src/json-rpc-connection.ts +++ b/cloud-shell/src/json-rpc-connection.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021 Red Hat, Inc. + * Copyright (c) 2019-2021 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/cloud-shell/src/terminal-protocol.ts b/cloud-shell/src/terminal-protocol.ts index e0e0d7be6..f687419c8 100644 --- a/cloud-shell/src/terminal-protocol.ts +++ b/cloud-shell/src/terminal-protocol.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021 Red Hat, Inc. + * Copyright (c) 2019-2021 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/cloud-shell/src/terminal.ts b/cloud-shell/src/terminal.ts index c0a268eb3..5705c5c7f 100644 --- a/cloud-shell/src/terminal.ts +++ b/cloud-shell/src/terminal.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021 Red Hat, Inc. + * Copyright (c) 2019-2021 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/common/rest/error.go b/common/rest/error.go index 0291f4dd1..9d2a193aa 100644 --- a/common/rest/error.go +++ b/common/rest/error.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/common/rest/response.go b/common/rest/response.go index ff542105a..24f90a471 100644 --- a/common/rest/response.go +++ b/common/rest/response.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/compile.sh b/compile.sh index 713513bcd..b1b5a6c1e 100755 --- a/compile.sh +++ b/compile.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2021 Red Hat, Inc. +# Copyright (c) 2019-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/devfile.yaml b/devfile.yaml index 1ea8361ac..b1ebece6f 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Red Hat, Inc. +# Copyright (c) 2019-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/exec-info/doc.go b/exec-info/doc.go index f4b3dafc7..8f178268c 100644 --- a/exec-info/doc.go +++ b/exec-info/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/exec-info/info-exec.go b/exec-info/info-exec.go index 3239103e9..2bfc4c6fb 100644 --- a/exec-info/info-exec.go +++ b/exec-info/info-exec.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/exec-info/kubernetes_info_exec.go b/exec-info/kubernetes_info_exec.go index eb5e49abb..7a4304c01 100644 --- a/exec-info/kubernetes_info_exec.go +++ b/exec-info/kubernetes_info_exec.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -19,7 +19,7 @@ import ( "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/kubernetes/typed/core/v1" + v1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/rest" "k8s.io/client-go/tools/remotecommand" ) diff --git a/exec-info/kubernetes_info_exec_creator.go b/exec-info/kubernetes_info_exec_creator.go index 099ccf68e..222b880c0 100644 --- a/exec-info/kubernetes_info_exec_creator.go +++ b/exec-info/kubernetes_info_exec_creator.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -13,7 +13,7 @@ package exec_info import ( "github.com/eclipse-che/che-machine-exec/api/model" - "k8s.io/client-go/kubernetes/typed/core/v1" + v1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/rest" ) diff --git a/exec/activity-connection-saver.go b/exec/activity-connection-saver.go index a24c9f7da..a4b745d82 100644 --- a/exec/activity-connection-saver.go +++ b/exec/activity-connection-saver.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/exec/command_resolver.go b/exec/command_resolver.go index ad3ad099a..b8277bcb6 100644 --- a/exec/command_resolver.go +++ b/exec/command_resolver.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/exec/command_resolver_test.go b/exec/command_resolver_test.go index 9c4cb37c8..07bb6a53e 100644 --- a/exec/command_resolver_test.go +++ b/exec/command_resolver_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/exec/exec-manager-provider.go b/exec/exec-manager-provider.go index b5d8142d2..4fe92a7bb 100644 --- a/exec/exec-manager-provider.go +++ b/exec/exec-manager-provider.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/exec/health-watcher.go b/exec/health-watcher.go index e9d050622..686cffe42 100644 --- a/exec/health-watcher.go +++ b/exec/health-watcher.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/exec/health-watcher_test.go b/exec/health-watcher_test.go index 18e31cf11..6ea9503f8 100644 --- a/exec/health-watcher_test.go +++ b/exec/health-watcher_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/exec/kubernetes_exec_manager.go b/exec/kubernetes_exec_manager.go index d912debcb..cd38a00dc 100644 --- a/exec/kubernetes_exec_manager.go +++ b/exec/kubernetes_exec_manager.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/exec/namespace_provider.go b/exec/namespace_provider.go index 89930044c..465e30b28 100644 --- a/exec/namespace_provider.go +++ b/exec/namespace_provider.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/exec/pty_handler.go b/exec/pty_handler.go index a8c4ef108..3455c84bc 100644 --- a/exec/pty_handler.go +++ b/exec/pty_handler.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/filter/container_filter.go b/filter/container_filter.go index fff859ade..f8344f7ae 100644 --- a/filter/container_filter.go +++ b/filter/container_filter.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/filter/doc.go b/filter/doc.go index ef203b633..62687782f 100644 --- a/filter/doc.go +++ b/filter/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/filter/kubernetes_filter.go b/filter/kubernetes_filter.go index 55b4a3d6c..390a0c7a5 100644 --- a/filter/kubernetes_filter.go +++ b/filter/kubernetes_filter.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/filter/kubernetes_filter_test.go b/filter/kubernetes_filter_test.go index 944f8f000..b5f66beaf 100644 --- a/filter/kubernetes_filter_test.go +++ b/filter/kubernetes_filter_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/kubeconfig/kubeconfig.go b/kubeconfig/kubeconfig.go index 20f3a898b..8281a1a02 100644 --- a/kubeconfig/kubeconfig.go +++ b/kubeconfig/kubeconfig.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/license_header.txt b/license_header.txt index 5b371e031..c1f1801d1 100644 --- a/license_header.txt +++ b/license_header.txt @@ -1,5 +1,5 @@ -Copyright (c) 2021 Red Hat, Inc. +Copyright (c) 2019-2021 Red Hat, Inc. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/main.go b/main.go index 00ff8e6a6..e7e1c1fb5 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/make-release.sh b/make-release.sh index 3a5a6952e..d1231a172 100755 --- a/make-release.sh +++ b/make-release.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2021 Red Hat, Inc. +# Copyright (c) 2019-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/output/line-buffer/doc.go b/output/line-buffer/doc.go index 2cb8056c0..e8ea97079 100644 --- a/output/line-buffer/doc.go +++ b/output/line-buffer/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/output/line-buffer/line_ringe-buffer_test.go b/output/line-buffer/line_ringe-buffer_test.go index d2993f5a9..363fe45c4 100644 --- a/output/line-buffer/line_ringe-buffer_test.go +++ b/output/line-buffer/line_ringe-buffer_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/output/line-buffer/line_ringe_buffer.go b/output/line-buffer/line_ringe_buffer.go index 9728108d9..be92cbb74 100644 --- a/output/line-buffer/line_ringe_buffer.go +++ b/output/line-buffer/line_ringe_buffer.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/output/line-buffer/line_scanner.go b/output/line-buffer/line_scanner.go index 6877c2f0a..dda7e64ea 100644 --- a/output/line-buffer/line_scanner.go +++ b/output/line-buffer/line_scanner.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/output/line-buffer/line_scanner_test.go b/output/line-buffer/line_scanner_test.go index b458badaf..331f240dc 100644 --- a/output/line-buffer/line_scanner_test.go +++ b/output/line-buffer/line_scanner_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/output/utf8stream/doc.go b/output/utf8stream/doc.go index 5dcaa2f13..239c014b8 100644 --- a/output/utf8stream/doc.go +++ b/output/utf8stream/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/output/utf8stream/utf8-stream-filter.go b/output/utf8stream/utf8-stream-filter.go index 21c714676..1ca16d862 100644 --- a/output/utf8stream/utf8-stream-filter.go +++ b/output/utf8stream/utf8-stream-filter.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/output/utf8stream/utf8-stream-filter_test.go b/output/utf8stream/utf8-stream-filter_test.go index e2c2ccfc8..a555a5d41 100644 --- a/output/utf8stream/utf8-stream-filter_test.go +++ b/output/utf8stream/utf8-stream-filter_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/scripts/license.sh b/scripts/license.sh index 94bea72d4..9ccaaaf55 100644 --- a/scripts/license.sh +++ b/scripts/license.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2021 Red Hat, Inc. +# Copyright (c) 2019-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/scripts/validate-license.py b/scripts/validate-license.py index 0ff601ba0..d5121b6f9 100644 --- a/scripts/validate-license.py +++ b/scripts/validate-license.py @@ -23,7 +23,7 @@ CURRENT_YEAR = datetime.today().year -COPYRIGHT_RE=r'Copyright \(c\) (\d+) Red Hat, Inc.' +COPYRIGHT_RE=r'Copyright \(c\) 2019-2021 Red Hat, Inc.' PATTERN1=r'This program and the accompanying materials are made' PATTERN2=r'available under the terms of the Eclipse Public License 2.0' PATTERN3=r'which is available at https://www.eclipse.org/legal/epl-2.0/' diff --git a/shell/doc.go b/shell/doc.go index ba98b390c..66f640b23 100644 --- a/shell/doc.go +++ b/shell/doc.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/shell/shell_detector.go b/shell/shell_detector.go index f6b28866e..5b631fd8e 100644 --- a/shell/shell_detector.go +++ b/shell/shell_detector.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -14,7 +14,7 @@ package shell import ( "github.com/eclipse-che/che-machine-exec/api/model" "github.com/eclipse-che/che-machine-exec/client" - "github.com/eclipse-che/che-machine-exec/exec-info" + exec_info "github.com/eclipse-che/che-machine-exec/exec-info" "github.com/sirupsen/logrus" ) diff --git a/shell/shell_detector_test.go b/shell/shell_detector_test.go index e4cbebee4..45a0c6bab 100644 --- a/shell/shell_detector_test.go +++ b/shell/shell_detector_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/shell/shell_info_parser.go b/shell/shell_info_parser.go index 1c840bf09..c032b1fa1 100644 --- a/shell/shell_info_parser.go +++ b/shell/shell_info_parser.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/shell/shell_info_parser_test.go b/shell/shell_info_parser_test.go index c148077c0..db3386174 100644 --- a/shell/shell_info_parser_test.go +++ b/shell/shell_info_parser_test.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/ws-conn/err_handler.go b/ws-conn/err_handler.go index 5eada0a0d..6b5a0c12b 100644 --- a/ws-conn/err_handler.go +++ b/ws-conn/err_handler.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/ws-conn/ws-connection-handler.go b/ws-conn/ws-connection-handler.go index 50e9520f3..7b812c955 100644 --- a/ws-conn/ws-connection-handler.go +++ b/ws-conn/ws-connection-handler.go @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Red Hat, Inc. +// Copyright (c) 2019-2021 Red Hat, Inc. // This program and the accompanying materials are made // available under the terms of the Eclipse Public License 2.0 // which is available at https://www.eclipse.org/legal/epl-2.0/ From 58cfd705c62a8fbcc4bfc7d50fb9f4e1937352ed Mon Sep 17 00:00:00 2001 From: Flavius Lacatusu Date: Tue, 8 Jun 2021 14:38:46 +0200 Subject: [PATCH 4/4] fix year and next build yaml Signed-off-by: Flavius Lacatusu --- .github/workflows/{automation-check.yaml => license.yaml} | 4 ++-- .github/workflows/next-build.yaml | 2 +- scripts/license.sh | 4 ++-- scripts/validate-license.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename .github/workflows/{automation-check.yaml => license.yaml} (88%) diff --git a/.github/workflows/automation-check.yaml b/.github/workflows/license.yaml similarity index 88% rename from .github/workflows/automation-check.yaml rename to .github/workflows/license.yaml index a09b0501a..2102b056d 100644 --- a/.github/workflows/automation-check.yaml +++ b/.github/workflows/license.yaml @@ -14,7 +14,7 @@ on: [pull_request] jobs: run: - name: Automation checks + name: License runs-on: ubuntu-20.04 steps: - name: Checkout repo @@ -25,4 +25,4 @@ jobs: node-version: 12.x - name: Check Eclipse license headers run: | - /bin/bash scripts/license.sh --check-license + /bin/bash scripts/license.sh check diff --git a/.github/workflows/next-build.yaml b/.github/workflows/next-build.yaml index d53b8c86a..b6ce90fb3 100644 --- a/.github/workflows/next-build.yaml +++ b/.github/workflows/next-build.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2012-2021 Red Hat, Inc. +# Copyright (c) 2019-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/scripts/license.sh b/scripts/license.sh index 9ccaaaf55..f42e53bb5 100644 --- a/scripts/license.sh +++ b/scripts/license.sh @@ -35,11 +35,11 @@ function addLicensetoChectlCode() { # catch first arguments with $1 case "$1" in - -c|--check-license) + check) echo -e "[INFO] Launching Eclipse Che license header check." validateChectlLicenseHeader ;; - -a|--add-license) + add) echo -e "[INFO] Start adding Eclipse Che license headers to code." addLicensetoChectlCode ;; diff --git a/scripts/validate-license.py b/scripts/validate-license.py index d5121b6f9..9ea3ce517 100644 --- a/scripts/validate-license.py +++ b/scripts/validate-license.py @@ -23,7 +23,7 @@ CURRENT_YEAR = datetime.today().year -COPYRIGHT_RE=r'Copyright \(c\) 2019-2021 Red Hat, Inc.' +COPYRIGHT_RE=r'Copyright \(c\) (\d+)' PATTERN1=r'This program and the accompanying materials are made' PATTERN2=r'available under the terms of the Eclipse Public License 2.0' PATTERN3=r'which is available at https://www.eclipse.org/legal/epl-2.0/'