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 for
built source code. (e2e code excepted)

```
// Copyright (c) 2020-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
```

Note that this renames `LICENSE` to `LICENSE.txt` purely to align on the
copyright messaging across repos.
  • Loading branch information
lieut-data committed Jan 23, 2025
1 parent 72d9d94 commit b262245
Show file tree
Hide file tree
Showing 38 changed files with 224 additions and 2,316 deletions.
File renamed without changes.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ DEFAULT_GOARCH := $(shell go env GOARCH)

export GO111MODULE=on

# We need to export GOBIN to allow it to be set
# for processes spawned from the Makefile
export GOBIN ?= $(PWD)/bin

# You can include assets this directory into the bundle. This can be e.g. used to include profile pictures.
ASSETS_DIR ?= assets

Expand Down Expand Up @@ -59,6 +63,8 @@ ifneq ($(HAS_SERVER),)
@echo Running golangci-lint
golangci-lint run ./...
$(GO) install github.com/mattermost/mattermost-govet/v2@3f08281c344327ac09364f196b15f9a81c7eff08
$(GO) vet -vettool=$(GOBIN)/mattermost-govet -license -license.year=2020 ./server/...
endif

## Builds the server, if it exists, for all supported architectures, unless MM_SERVICESETTINGS_ENABLEDEVELOPER is set.
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) 2020-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) 2020-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 server/authorization.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2020-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

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

package main

import (
Expand Down
4 changes: 2 additions & 2 deletions server/client.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License for license information.
// Copyright (c) 2020-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

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

package main

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

package main

import (
Expand Down
4 changes: 2 additions & 2 deletions server/configuration.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License for license information.
// Copyright (c) 2020-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

Expand Down
4 changes: 2 additions & 2 deletions server/http.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License for license information.
// Copyright (c) 2020-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

Expand Down
4 changes: 2 additions & 2 deletions server/main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License for license information.
// Copyright (c) 2020-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

Expand Down
3 changes: 3 additions & 0 deletions server/manifest.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions server/meeting.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License for license information.
// Copyright (c) 2020-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

Expand Down
4 changes: 2 additions & 2 deletions server/plugin.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License for license information.
// Copyright (c) 2020-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package main

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

package main

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

package main

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

package main

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

package main

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

package main

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

package main

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

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions webapp/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

src/manifest.*
9 changes: 8 additions & 1 deletion webapp/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"parser": "babel-eslint",
"plugins": [
"react",
"import"
"import",
"header"
],
"env": {
"browser": true,
Expand Down Expand Up @@ -129,6 +130,12 @@
],
"global-require": 2,
"guard-for-in": 2,
"header/header": [
2,
"line",
" Copyright (c) 2020-present Mattermost, Inc. All Rights Reserved.\n See LICENSE.txt for license information.",
2
],
"id-blacklist": 0,
"import/no-unresolved": 2,
"import/order": [
Expand Down
2 changes: 1 addition & 1 deletion webapp/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// Copyright (c) 2020-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

const config = {
Expand Down
Loading

0 comments on commit b262245

Please sign in to comment.