Skip to content

Commit

Permalink
Apply and enforce file-level license headers
Browse files Browse the repository at this point in the history
Use `mattermost-govet` and `eslint`'s `header/header` to ensure each
file begins with the appropriate header, then fix all instances.

```
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
```
  • Loading branch information
lieut-data committed Jan 16, 2025
1 parent 4c82309 commit 2f6c5e4
Show file tree
Hide file tree
Showing 246 changed files with 734 additions and 52 deletions.
3 changes: 3 additions & 0 deletions .github/actions/generate-specs/split-tests.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

import (
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ install-go-tools:
$(GO) install github.com/golang/mock/mockgen@v1.6.0
$(GO) install gotest.tools/gotestsum@v1.7.0
$(GO) install github.com/cortesi/modd/cmd/modd@latest
$(GO) install github.com/mattermost/mattermost-govet/v2@b5c9b881a8d2557945be5ce8ea365b70d280bde6

## Runs eslint and golangci-lint
.PHONY: check-style
Expand All @@ -188,6 +189,7 @@ ifneq ($(HAS_SERVER),)
@echo Running golangci-lint
$(GO) vet ./...
$(GOBIN)/golangci-lint run ./...
$(GO) vet -vettool=$(GOBIN)/mattermost-govet -license -license.ignore=server/manifest.go ./...
endif

## Fix JS file ESLint issues
Expand Down
2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Mattermost Playbooks

©2015-present Mattermost, Inc. All Rights Reserved. See LICENSE for license information.
©2015-present Mattermost, Inc. All Rights Reserved. See LICENSE.txt for license information.

NOTICES:
--------
Expand Down
3 changes: 3 additions & 0 deletions build/manifest/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions build/pluginctl/logs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions build/pluginctl/logs_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions build/pluginctl/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

// main handles deployment of the plugin to a development server using the Client4 API.
package main

Expand Down
3 changes: 3 additions & 0 deletions client/action.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package client

type GenericChannelActionWithoutPayload struct {
Expand Down
3 changes: 3 additions & 0 deletions client/client_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package client_test

import (
Expand Down
3 changes: 3 additions & 0 deletions client/doc_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package client_test

import (
Expand Down
3 changes: 3 additions & 0 deletions client/error_response.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package client

import (
Expand Down
3 changes: 3 additions & 0 deletions client/playbook.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package client

import (
Expand Down
3 changes: 3 additions & 0 deletions client/playbook_run.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package client

import (
Expand Down
3 changes: 3 additions & 0 deletions client/playbook_runs_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package client_test

import (
Expand Down
3 changes: 3 additions & 0 deletions client/playbooks_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package client_test

import (
Expand Down
3 changes: 3 additions & 0 deletions client/reminder.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package client

type ReminderResetPayload struct {
Expand Down
3 changes: 3 additions & 0 deletions client/reminders.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package client

import (
Expand Down
3 changes: 3 additions & 0 deletions client/stats.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package client

import (
Expand Down
3 changes: 3 additions & 0 deletions client/tabapp.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package client

import (
Expand Down
3 changes: 3 additions & 0 deletions client/telemetry.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package client

import (
Expand Down
3 changes: 3 additions & 0 deletions client/unexport_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package client

var BuildAPIURL = buildAPIURL
Expand Down
3 changes: 3 additions & 0 deletions server/api/actions.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/api.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/bot.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/categories.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/context.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/graph_dataloader.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/graphql.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/graphql_loader_favorite.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/graphql_loader_playbook.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/graphql_loader_run.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/graphql_playbook.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/graphql_root.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/graphql_root_playbook.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/graphql_root_run.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/graphql_run.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/logger.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/permutation_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/playbook_runs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/playbooks.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/settings.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/signal.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/stats.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/tabapp.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/tabapp_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/telemetry.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api/urls.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package api

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api_actions_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api_bot_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api_general_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api_graphql_playbooks_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api_graphql_runs_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api_playbooks_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api_runs_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions server/api_settings_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

import (
Expand Down
Loading

0 comments on commit 2f6c5e4

Please sign in to comment.