diff --git a/.golangci.yml b/.golangci.yml index ebaab17f1..7efac3053 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -56,7 +56,6 @@ linters: - godox # Tool for detection of FIXME, TODO and other comment keywords [fast: true, auto-fix: false] - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true, auto-fix: true] - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports [fast: true, auto-fix: true] - - golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes [fast: true, auto-fix: false] - gosec # Inspects source code for security problems [fast: true, auto-fix: false] - misspell # Finds commonly misspelled English words in comments [fast: true, auto-fix: true] - nakedret # Finds naked returns in functions greater than a specified function length [fast: true, auto-fix: false] diff --git a/BUILDS.md b/BUILDS.md index c2df4d0cb..e6d9c548b 100644 --- a/BUILDS.md +++ b/BUILDS.md @@ -1,4 +1,4 @@ -# Building ProtonMail Bridge and Import-Export app +# Building Proton Mail Bridge and Import-Export app ## Prerequisites * 64-bit AMD OS: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 824a8c848..ea729c2ff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,8 +2,7 @@ By making a contribution to this project: -1. I assign any and all copyright related to the contribution to - Proton Technologies AG; +1. I assign any and all copyright related to the contribution to Proton AG; 2. I certify that the contribution was created in whole by me; 3. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I diff --git a/COPYING_NOTES.md b/COPYING_NOTES.md index 916656d3e..57abbed12 100644 --- a/COPYING_NOTES.md +++ b/COPYING_NOTES.md @@ -1,17 +1,17 @@ # Copying -Copyright (c) 2022 Proton Technologies AG +Copyright (c) 2022 Proton AG -ProtonMail Bridge is free software: you can redistribute it and/or modify it +Proton Mail Bridge is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -ProtonMail Bridge is distributed in the hope that it will be useful, but WITHOUT ANY +Proton Mail Bridge is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with -ProtonMail Bridge. If not, see https://www.gnu.org/licenses. +Proton Mail Bridge. If not, see https://www.gnu.org/licenses. # Dependencies diff --git a/Changelog.md b/Changelog.md index 1a0a53a33..090c6e7c5 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,4 +1,4 @@ -# ProtonMail Bridge and Import-Export app Changelog +# Proton Mail Bridge and Import-Export app Changelog Changelog [format](http://keepachangelog.com/en/1.0.0/) diff --git a/README.md b/README.md index 1c8226b4b..2ea8c7647 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,22 @@ -# ProtonMail Bridge and Import Export app -Copyright (c) 2020 Proton Technologies AG +# Proton Mail Bridge and Import Export app +Copyright (c) 2022 Proton AG -This repository holds the ProtonMail Bridge and the ProtonMail Import-Export applications. +This repository holds the Proton Mail Bridge and the Proton Mail Import-Export applications. For a detailed build information see [BUILDS](./BUILDS.md). The license can be found in [LICENSE](./LICENSE) file, for more licensing information see [COPYING_NOTES](./COPYING_NOTES.md). For contribution policy see [CONTRIBUTING](./CONTRIBUTING.md). ## Description Bridge -ProtonMail Bridge for e-mail clients. +Proton Mail Bridge for e-mail clients. When launched, Bridge will initialize local IMAP/SMTP servers and render its GUI. -To configure an e-mail client, firstly log in using your ProtonMail credentials. +To configure an e-mail client, firstly log in using your Proton Mail credentials. Open your e-mail client and add a new account using the settings which are located in the Bridge GUI. The client will only be able to sync with -your ProtonMail account when the Bridge is running, thus the option +your Proton Mail account when the Bridge is running, thus the option to start Bridge on startup is enabled by default. When the main window is closed, Bridge will continue to run in the @@ -25,9 +25,9 @@ background. More details [on the public website](https://protonmail.com/bridge). ## Description Import-Export app -ProtonMail Import-Export app for importing and exporting messages. +Proton Mail Import-Export app for importing and exporting messages. -To transfer messages, firstly log in using your ProtonMail credentials. +To transfer messages, firstly log in using your Proton Mail credentials. For import, expand your account, and pick the address to which to import messages from IMAP server or local EML or MBOX files. For export, pick the whole account or only a specific address. Then, in both cases, @@ -40,9 +40,9 @@ More details [on the public website](https://protonmail.com/import-export). The Import-Export app is developed in separate branch `master-ie`. ## Launchers -Launchers are binaries used to run the ProtonMail Bridge or Import-Export apps. +Launchers are binaries used to run the Proton Mail Bridge or Import-Export apps. -Official distributions of the ProtonMail Bridge and Import-Export apps contain +Official distributions of the Proton Mail Bridge and Import-Export apps contain both a launcher and the app itself. The launcher is installed in a protected area of the system (i.e. an area accessible only with admin privileges) and is used to run the app. The launcher ensures that nobody tampered with the app's @@ -52,7 +52,7 @@ feature enables the app to securely update itself automatically without asking the user for a password. ## Keychain -You need to have a keychain in order to run the ProtonMail Bridge. On Mac or +You need to have a keychain in order to run the Proton Mail Bridge. On Mac or Windows, Bridge uses native credential managers. On Linux, use `secret-service` freedesktop.org API (e.g. [Gnome keyring](https://wiki.gnome.org/Projects/GnomeKeyring/)) or diff --git a/cmd/Desktop-Bridge/main.go b/cmd/Desktop-Bridge/main.go index 879c90b96..0255fd953 100644 --- a/cmd/Desktop-Bridge/main.go +++ b/cmd/Desktop-Bridge/main.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package main @@ -43,8 +43,8 @@ import ( ) const ( - appName = "ProtonMail Bridge" - appUsage = "ProtonMail IMAP and SMTP Bridge" + appName = "Proton Mail Bridge" + appUsage = "Proton Mail IMAP and SMTP Bridge" configName = "bridge" updateURLName = "bridge" keychainName = "bridge" diff --git a/cmd/launcher/main.go b/cmd/launcher/main.go index 287fd91c7..ed050d842 100644 --- a/cmd/launcher/main.go +++ b/cmd/launcher/main.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package main @@ -39,12 +39,12 @@ import ( ) const ( - appName = "ProtonMail Launcher" + appName = "Proton Mail Launcher" configName = "bridge" exeName = "proton-bridge" ) -func main() { // nolint[funlen] +func main() { //nolint:funlen reporter := sentry.NewReporter(appName, constants.Version, useragent.New()) crashHandler := crash.NewHandler(reporter.ReportException) @@ -98,7 +98,7 @@ func main() { // nolint[funlen] logrus.WithError(err).Fatal("Failed to determine path to launcher") } - cmd := exec.Command(exe, appendLauncherPath(launcher, os.Args[1:])...) // nolint[gosec] + cmd := exec.Command(exe, appendLauncherPath(launcher, os.Args[1:])...) //nolint:gosec cmd.Stdin = os.Stdin cmd.Stdout = os.Stdout diff --git a/dist/proton-bridge.desktop b/dist/proton-bridge.desktop index 15294b645..5dc83c01b 100644 --- a/dist/proton-bridge.desktop +++ b/dist/proton-bridge.desktop @@ -1,8 +1,8 @@ [Desktop Entry] Type=Application Version=1.1 -Name=ProtonMail Bridge -GenericName=ProtonMail Bridge for Linux +Name=Proton Mail Bridge +GenericName=Proton Mail Bridge for Linux Comment=The Bridge is an application that runs on your computer in the background and seamlessly encrypts and decrypts your mail as it enters and leaves your computer. Icon=protonmail-bridge Exec=protonmail-bridge diff --git a/doc/bridge.md b/doc/bridge.md index b521dd0ba..969a322f7 100644 --- a/doc/bridge.md +++ b/doc/bridge.md @@ -51,7 +51,7 @@ PMAPI directly. graph TD C["Client (e.g. Thunderbird)"] - PM[ProtonMail Server] + PM[Proton Mail Server] subgraph "Bridge app" subgraph "Bridge core" diff --git a/internal/api/api.go b/internal/api/api.go index 6d903aa1b..050c28a94 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package api provides HTTP API of the Bridge. // @@ -34,7 +34,7 @@ import ( ) var ( - log = logrus.WithField("pkg", "api") //nolint[gochecknoglobals] + log = logrus.WithField("pkg", "api") //nolint:gochecknoglobals ) type apiServer struct { @@ -44,7 +44,7 @@ type apiServer struct { } // NewAPIServer returns prepared API server struct. -func NewAPIServer(settings *settings.Settings, eventListener listener.Listener) *apiServer { //nolint[golint] +func NewAPIServer(settings *settings.Settings, eventListener listener.Listener) *apiServer { //nolint:revive return &apiServer{ host: bridge.Host, settings: settings, @@ -68,7 +68,7 @@ func (api *apiServer) ListenAndServe() { api.eventListener.Emit(events.ErrorEvent, "API failed: "+err.Error()) log.Error("API failed: ", err) } - defer server.Close() //nolint[errcheck] + defer server.Close() //nolint:errcheck } func (api *apiServer) getAddress() string { diff --git a/internal/api/ctx.go b/internal/api/ctx.go index f11c822e4..24c2ba16c 100644 --- a/internal/api/ctx.go +++ b/internal/api/ctx.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package api diff --git a/internal/api/focus.go b/internal/api/focus.go index 3dcd52310..424dbc112 100644 --- a/internal/api/focus.go +++ b/internal/api/focus.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package api @@ -42,7 +42,7 @@ func CheckOtherInstanceAndFocus(port int) error { if err != nil { return err } - defer resp.Body.Close() //nolint[errcheck] + defer resp.Body.Close() //nolint:errcheck if resp.StatusCode != 200 { log.Error("Focus error: ", resp.StatusCode) diff --git a/internal/app/base/args.go b/internal/app/base/args.go index 6382c3103..21d366897 100644 --- a/internal/app/base/args.go +++ b/internal/app/base/args.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package base diff --git a/internal/app/base/base.go b/internal/app/base/base.go index e70bb98d1..ac4adc93b 100644 --- a/internal/app/base/base.go +++ b/internal/app/base/base.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package base implements a common application base currently shared by bridge and IE. // The base includes the following: @@ -102,7 +102,7 @@ type Base struct { teardown []func() error // actions to perform when app is exiting } -func New( // nolint[funlen] +func New( //nolint:funlen appName, appUsage, configName, @@ -159,6 +159,14 @@ func New( // nolint[funlen] return nil, api.CheckOtherInstanceAndFocus(settingsObj.GetInt(settings.APIPortKey)) } + if err := migrateMacKeychainBefore220(settingsObj, keychainName); err != nil { + logrus.WithError(err).Warn("Keychain migration failed") + } + + if err := migrateStartup220(settingsObj); err != nil { + logrus.WithError(err).Warn("Failed to remove old startup paths") + } + cachePath, err := locations.ProvideCachePath() if err != nil { return nil, err @@ -324,7 +332,7 @@ func (b *Base) AddTeardownAction(fn func() error) { b.teardown = append(b.teardown, fn) } -func (b *Base) wrapMainLoop(appMainLoop func(*Base, *cli.Context) error) cli.ActionFunc { // nolint[funlen] +func (b *Base) wrapMainLoop(appMainLoop func(*Base, *cli.Context) error) cli.ActionFunc { //nolint:funlen return func(c *cli.Context) error { defer b.CrashHandler.HandlePanic() defer func() { _ = b.Lock.Close() }() diff --git a/internal/app/base/migration.go b/internal/app/base/migration.go index c5bcd36ac..8ca413ae3 100644 --- a/internal/app/base/migration.go +++ b/internal/app/base/migration.go @@ -1,28 +1,33 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package base import ( + "errors" "os" "path/filepath" + "runtime" + "github.com/Masterminds/semver/v3" + "github.com/ProtonMail/proton-bridge/internal/config/settings" "github.com/ProtonMail/proton-bridge/internal/constants" "github.com/ProtonMail/proton-bridge/internal/locations" + "github.com/ProtonMail/proton-bridge/pkg/keychain" "github.com/sirupsen/logrus" ) @@ -50,7 +55,7 @@ func migrateFiles(configName string) error { if err := migrateCacheFromBoth15xAnd16x(locations, userCacheDir); err != nil { return err } - if err := migrateUpdatesFrom16x(configName, locations); err != nil { //nolint[revive] It is more clear to structure this way + if err := migrateUpdatesFrom16x(configName, locations); err != nil { //nolint:revive It is more clear to structure this way return err } return nil @@ -107,6 +112,122 @@ func migrateUpdatesFrom16x(configName string, locations *locations.Locations) er return moveIfExists(oldUpdatesPath, newUpdatesPath) } +// migrateMacKeychainBefore220 deals with write access restriction to mac +// keychain passwords which are caused by application renaming. The old +// passwords are copied under new name in order to have write access afer +// renaming. +func migrateMacKeychainBefore220(settingsObj *settings.Settings, keychainName string) error { + l := logrus.WithField("pkg", "app/base/migration") + if runtime.GOOS != "darwin" { + return nil + } + + if shouldContinue, err := isBefore220(settingsObj); !shouldContinue || err != nil { + return err + } + + l.Warn("Migrating mac keychain") + + helperConstructor, ok := keychain.Helpers["macos-keychain"] + if !ok { + return errors.New("cannot find macos-keychain helper") + } + + oldKC, err := helperConstructor("ProtonMailBridgeService") + if err != nil { + l.WithError(err).Error("Keychain constructor failed") + return err + } + + idByURL, err := oldKC.List() + if err != nil { + l.WithError(err).Error("List old keychain failed") + return err + } + + newKC, err := keychain.NewKeychain(settingsObj, keychainName) + if err != nil { + return err + } + + for url, id := range idByURL { + li := l.WithField("id", id).WithField("url", url) + userID, secret, err := oldKC.Get(url) + if err != nil { + li.WithField("userID", userID). + WithField("err", err). + Error("Faild to get old item") + continue + } + + if _, _, err := newKC.Get(userID); err == nil { + li.Warn("Skipping migration, item already exists.") + continue + } + + if err := newKC.Put(userID, secret); err != nil { + li.WithError(err).Error("Failed to migrate user") + } + + li.Info("Item migrated") + } + + return nil +} + +// migrateStartup220 removes old startup links. The creation of new links is +// handled by bridge initialisation. +func migrateStartup220(settingsObj *settings.Settings) error { + if shouldContinue, err := isBefore220(settingsObj); !shouldContinue || err != nil { + return err + } + + logrus.WithField("pkg", "app/base/migration").Warn("Migrating autostartup links") + + path, err := os.UserHomeDir() + if err != nil { + return err + } + + switch runtime.GOOS { + case "windows": + path = filepath.Join(path, `AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\ProtonMail Bridge.lnk`) + case "linux": + path = filepath.Join(path, `.config/autostart/ProtonMail Bridge.desktop`) + case "darwin": + path = filepath.Join(path, `Library/LaunchAgents/ProtonMail Bridge.plist`) + default: + return errors.New("unknown GOOS") + } + + return os.Remove(path) +} + +// isBefore220 decide if last used version was older than 2.2.0. If cannot decide it returns false with error. +func isBefore220(settingsObj *settings.Settings) (bool, error) { + lastUsedVersion := settingsObj.Get(settings.LastVersionKey) + + // Skipping migration: it is first bridge start or cache was cleared. + if lastUsedVersion == "" { + return false, nil + } + + v220 := semver.MustParse("2.2.0") + lastVer, err := semver.NewVersion(lastUsedVersion) + + // Skipping migration: Should not happen but cannot decide what to do. + if err != nil { + return false, err + } + + // Skipping migration: 2.2.0>= was already used hence old stuff was already migrated. + if !lastVer.LessThan(v220) { + return false, nil + } + + return true, nil +} + func moveIfExists(source, destination string) error { l := logrus.WithField("source", source).WithField("destination", destination) diff --git a/internal/app/base/profiling.go b/internal/app/base/profiling.go index 76229ef3d..f5cd4a593 100644 --- a/internal/app/base/profiling.go +++ b/internal/app/base/profiling.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package base diff --git a/internal/app/base/restart.go b/internal/app/base/restart.go index 3608fc7e8..c03e1b227 100644 --- a/internal/app/base/restart.go +++ b/internal/app/base/restart.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package base @@ -43,7 +43,7 @@ func (b *Base) restartApp(crash bool) error { WithField("args", args). Warn("Restarting") - return exec.Command(b.command, args...).Start() // nolint[gosec] + return exec.Command(b.command, args...).Start() //nolint:gosec } // incrementRestartFlag increments the value of the restart flag. diff --git a/internal/app/base/restart_test.go b/internal/app/base/restart_test.go index 546c862ec..2567edb24 100644 --- a/internal/app/base/restart_test.go +++ b/internal/app/base/restart_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package base diff --git a/internal/app/bridge/bridge.go b/internal/app/bridge/bridge.go index 8e49811cf..b8f766ca8 100644 --- a/internal/app/bridge/bridge.go +++ b/internal/app/bridge/bridge.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package bridge implements the bridge CLI application. package bridge @@ -69,7 +69,7 @@ func New(base *base.Base) *cli.App { return app } -func mailLoop(b *base.Base, c *cli.Context) error { // nolint[funlen] +func mailLoop(b *base.Base, c *cli.Context) error { //nolint:funlen tlsConfig, err := loadTLSConfig(b) if err != nil { return err diff --git a/internal/bridge/autostart.go b/internal/bridge/autostart.go index 43d5b93c1..f8112b94a 100644 --- a/internal/bridge/autostart.go +++ b/internal/bridge/autostart.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package bridge provides core functionality of Bridge app. package bridge diff --git a/internal/bridge/bridge.go b/internal/bridge/bridge.go index f3b64b4fb..23c1e6cb2 100644 --- a/internal/bridge/bridge.go +++ b/internal/bridge/bridge.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package bridge provides core functionality of Bridge app. package bridge @@ -40,7 +40,7 @@ import ( logrus "github.com/sirupsen/logrus" ) -var log = logrus.WithField("pkg", "bridge") //nolint[gochecknoglobals] +var log = logrus.WithField("pkg", "bridge") //nolint:gochecknoglobals var ErrLocalCacheUnavailable = errors.New("local cache is unavailable") diff --git a/internal/bridge/bug_report.go b/internal/bridge/bug_report.go index 2a41c08d1..8b01163b5 100644 --- a/internal/bridge/bug_report.go +++ b/internal/bridge/bug_report.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package bridge @@ -153,7 +153,7 @@ func zipFiles(filenames []string) (io.Reader, error) { buf := NewLimitedBuffer(MaxAttachmentSize) w := zip.NewWriter(buf) - defer w.Close() //nolint[errcheck] + defer w.Close() //nolint:errcheck for _, file := range filenames { err := addFileToZip(file, w) @@ -174,7 +174,7 @@ func addFileToZip(filename string, writer *zip.Writer) error { if err != nil { return err } - defer fileReader.Close() //nolint[errcheck] + defer fileReader.Close() //nolint:errcheck,gosec fileInfo, err := fileReader.Stat() if err != nil { diff --git a/internal/bridge/constants.go b/internal/bridge/constants.go index 08ae3e278..d7ed8bd4d 100644 --- a/internal/bridge/constants.go +++ b/internal/bridge/constants.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package bridge diff --git a/internal/bridge/release_notes.go b/internal/bridge/release_notes.go index 8334a380e..117f8b3bb 100644 --- a/internal/bridge/release_notes.go +++ b/internal/bridge/release_notes.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Code generated by ./release-notes.sh at 'Fri Jan 22 11:01:06 AM CET 2021'. DO NOT EDIT. diff --git a/internal/bridge/store_factory.go b/internal/bridge/store_factory.go index fad5a2ba3..297f33703 100644 --- a/internal/bridge/store_factory.go +++ b/internal/bridge/store_factory.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package bridge diff --git a/internal/bridge/types.go b/internal/bridge/types.go index 8475ab5fa..d4a085aa3 100644 --- a/internal/bridge/types.go +++ b/internal/bridge/types.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package bridge diff --git a/internal/config/cache/cache.go b/internal/config/cache/cache.go index 925790a75..d9a0374a4 100644 --- a/internal/config/cache/cache.go +++ b/internal/config/cache/cache.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package cache provides access to contents inside a cache directory. package cache diff --git a/internal/config/cache/cache_test.go b/internal/config/cache/cache_test.go index 2d7b3d865..d694d5e17 100644 --- a/internal/config/cache/cache_test.go +++ b/internal/config/cache/cache_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cache diff --git a/internal/config/settings/kvs.go b/internal/config/settings/kvs.go index 27ff4d646..152630e34 100644 --- a/internal/config/settings/kvs.go +++ b/internal/config/settings/kvs.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package settings @@ -61,7 +61,7 @@ func (p *keyValueStore) load() error { if err != nil { return err } - defer f.Close() //nolint[errcheck] + defer f.Close() //nolint:errcheck,gosec return json.NewDecoder(f).Decode(&p.cache) } diff --git a/internal/config/settings/kvs_test.go b/internal/config/settings/kvs_test.go index 6de609453..672846f45 100644 --- a/internal/config/settings/kvs_test.go +++ b/internal/config/settings/kvs_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package settings diff --git a/internal/config/settings/settings.go b/internal/config/settings/settings.go index 06078e8f0..9133424d5 100644 --- a/internal/config/settings/settings.go +++ b/internal/config/settings/settings.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package settings provides access to persistent user settings. package settings @@ -89,7 +89,7 @@ func (s *Settings) setDefaultValues() { s.setDefault(ReportOutgoingNoEncKey, "false") s.setDefault(LastVersionKey, "") s.setDefault(UpdateChannelKey, "") - s.setDefault(RolloutKey, fmt.Sprintf("%v", rand.Float64())) //nolint[gosec] G404 It is OK to use weak random number generator here + s.setDefault(RolloutKey, fmt.Sprintf("%v", rand.Float64())) //nolint:gosec // G404 It is OK to use weak random number generator here s.setDefault(PreferredKeychainKey, "") s.setDefault(CacheEnabledKey, "true") s.setDefault(CacheCompressionKey, "true") diff --git a/internal/config/tls/cert_store_darwin.go b/internal/config/tls/cert_store_darwin.go index 0ecb9584a..981b7cadb 100644 --- a/internal/config/tls/cert_store_darwin.go +++ b/internal/config/tls/cert_store_darwin.go @@ -1,26 +1,26 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tls import "os/exec" func addTrustedCert(certPath string) error { - return exec.Command( // nolint[gosec] + return exec.Command( //nolint:gosec "/usr/bin/security", "execute-with-privileges", "/usr/bin/security", @@ -34,7 +34,7 @@ func addTrustedCert(certPath string) error { } func removeTrustedCert(certPath string) error { - return exec.Command( // nolint[gosec] + return exec.Command( //nolint:gosec "/usr/bin/security", "execute-with-privileges", "/usr/bin/security", diff --git a/internal/config/tls/cert_store_linux.go b/internal/config/tls/cert_store_linux.go index 7d1d12d49..614ad31a4 100644 --- a/internal/config/tls/cert_store_linux.go +++ b/internal/config/tls/cert_store_linux.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tls diff --git a/internal/config/tls/cert_store_windows.go b/internal/config/tls/cert_store_windows.go index 1a93b3261..d8af67492 100644 --- a/internal/config/tls/cert_store_windows.go +++ b/internal/config/tls/cert_store_windows.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tls diff --git a/internal/config/tls/tls.go b/internal/config/tls/tls.go index 677cdb8f3..2d68b75f5 100644 --- a/internal/config/tls/tls.go +++ b/internal/config/tls/tls.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tls @@ -55,8 +55,8 @@ func NewTLSTemplate() (*x509.Certificate, error) { SerialNumber: serialNumber, Subject: pkix.Name{ Country: []string{"CH"}, - Organization: []string{"Proton Technologies AG"}, - OrganizationalUnit: []string{"ProtonMail"}, + Organization: []string{"Proton AG"}, + OrganizationalUnit: []string{"Proton Mail"}, CommonName: "127.0.0.1", }, KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, @@ -110,7 +110,7 @@ func (t *TLS) GenerateCerts(template *x509.Certificate) error { if err != nil { return err } - defer certOut.Close() // nolint[errcheck] + defer certOut.Close() //nolint:errcheck,gosec if err := pem.Encode(certOut, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}); err != nil { return err @@ -120,7 +120,7 @@ func (t *TLS) GenerateCerts(template *x509.Certificate) error { if err != nil { return err } - defer keyOut.Close() // nolint[errcheck] + defer keyOut.Close() //nolint:errcheck,gosec return pem.Encode(keyOut, &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(priv)}) } @@ -144,7 +144,7 @@ func (t *TLS) GetConfig() (*tls.Config, error) { caCertPool := x509.NewCertPool() caCertPool.AddCert(c.Leaf) - // nolint[gosec]: We need to support older TLS versions for AppleMail and Outlook. + //nolint:gosec // We need to support older TLS versions for AppleMail and Outlook return &tls.Config{ Certificates: []tls.Certificate{c}, ServerName: "127.0.0.1", diff --git a/internal/config/tls/tls_test.go b/internal/config/tls/tls_test.go index f6f27f83a..0248995ce 100644 --- a/internal/config/tls/tls_test.go +++ b/internal/config/tls/tls_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tls diff --git a/internal/config/useragent/platform.go b/internal/config/useragent/platform.go index 593c88113..df6918002 100644 --- a/internal/config/useragent/platform.go +++ b/internal/config/useragent/platform.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package useragent diff --git a/internal/config/useragent/platform_test.go b/internal/config/useragent/platform_test.go index 6e85d7962..271364443 100644 --- a/internal/config/useragent/platform_test.go +++ b/internal/config/useragent/platform_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package useragent diff --git a/internal/config/useragent/useragent.go b/internal/config/useragent/useragent.go index c7b145865..4db2a04b0 100644 --- a/internal/config/useragent/useragent.go +++ b/internal/config/useragent/useragent.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package useragent diff --git a/internal/config/useragent/useragent_test.go b/internal/config/useragent/useragent_test.go index 34938d760..344f79821 100644 --- a/internal/config/useragent/useragent_test.go +++ b/internal/config/useragent/useragent_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package useragent diff --git a/internal/constants/constants.go b/internal/constants/constants.go index da2ba96a2..f09127ab4 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package constants contains variables that are set via ldflags during build. package constants @@ -22,7 +22,7 @@ import "fmt" const VendorName = "protonmail" -// nolint[gochecknoglobals] +//nolint:gochecknoglobals var ( // Version of the build. Version = "" diff --git a/internal/constants/update_default.go b/internal/constants/update_default.go index 81a573aa3..57dadc364 100644 --- a/internal/constants/update_default.go +++ b/internal/constants/update_default.go @@ -1,28 +1,29 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . +//go:build !build_qa // +build !build_qa package constants import "time" -// nolint[gochecknoglobals] +//nolint:gochecknoglobals var ( - // UpdateCheckInterval defines how often we check for new version - UpdateCheckInterval = time.Hour //nolint[gochecknoglobals] + // UpdateCheckInterval defines how often we check for new version. + UpdateCheckInterval = time.Hour //nolint:gochecknoglobals ) diff --git a/internal/constants/update_qa.go b/internal/constants/update_qa.go index a802f3236..560e798e7 100644 --- a/internal/constants/update_qa.go +++ b/internal/constants/update_qa.go @@ -1,27 +1,28 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . +//go:build build_qa // +build build_qa package constants import "time" -// nolint[gochecknoglobals] +//nolint:gochecknoglobals var ( // UpdateCheckInterval defines how often we check for new version UpdateCheckInterval = time.Duration(5 * time.Minute) diff --git a/internal/cookies/jar.go b/internal/cookies/jar.go index b5005927b..2e7b0e3e2 100644 --- a/internal/cookies/jar.go +++ b/internal/cookies/jar.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package cookies implements a persistent cookie jar which satisfies the http.CookieJar interface. package cookies diff --git a/internal/cookies/jar_test.go b/internal/cookies/jar_test.go index 5c5985e83..6979164eb 100644 --- a/internal/cookies/jar_test.go +++ b/internal/cookies/jar_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cookies diff --git a/internal/crash/actions.go b/internal/crash/actions.go index e6476f741..5cd8a3f1d 100644 --- a/internal/crash/actions.go +++ b/internal/crash/actions.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package crash diff --git a/internal/crash/handler.go b/internal/crash/handler.go index 41c241bed..5dbcb6c03 100644 --- a/internal/crash/handler.go +++ b/internal/crash/handler.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package crash implements a crash handler with configurable recovery actions. package crash diff --git a/internal/crash/handler_test.go b/internal/crash/handler_test.go index b8ba22f34..ade2ca17f 100644 --- a/internal/crash/handler_test.go +++ b/internal/crash/handler_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package crash diff --git a/internal/events/events.go b/internal/events/events.go index a2e7f54b2..50b879435 100644 --- a/internal/events/events.go +++ b/internal/events/events.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package events provides names of events used by the event listener in bridge. package events diff --git a/internal/frontend/cli/account_utils.go b/internal/frontend/cli/account_utils.go index 2848a3a64..d818102fc 100644 --- a/internal/frontend/cli/account_utils.go +++ b/internal/frontend/cli/account_utils.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cli diff --git a/internal/frontend/cli/accounts.go b/internal/frontend/cli/accounts.go index e34b28a33..589402345 100644 --- a/internal/frontend/cli/accounts.go +++ b/internal/frontend/cli/accounts.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cli @@ -88,7 +88,7 @@ func (f *frontendCLI) showAccountAddressInfo(user types.User, address string) { f.Println("") } -func (f *frontendCLI) loginAccount(c *ishell.Context) { // nolint[funlen] +func (f *frontendCLI) loginAccount(c *ishell.Context) { //nolint:funlen f.ShowPrompt(false) defer f.ShowPrompt(true) diff --git a/internal/frontend/cli/frontend.go b/internal/frontend/cli/frontend.go index 732a93be4..4e97798c9 100644 --- a/internal/frontend/cli/frontend.go +++ b/internal/frontend/cli/frontend.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package cli provides CLI interface of the Bridge. package cli @@ -31,7 +31,7 @@ import ( ) var ( - log = logrus.WithField("pkg", "frontend/cli") //nolint[gochecknoglobals] + log = logrus.WithField("pkg", "frontend/cli") //nolint:gochecknoglobals ) type frontendCLI struct { @@ -47,7 +47,7 @@ type frontendCLI struct { } // New returns a new CLI frontend configured with the given options. -func New( //nolint[funlen] +func New( //nolint:funlen panicHandler types.PanicHandler, locations *locations.Locations, @@ -56,7 +56,7 @@ func New( //nolint[funlen] updater types.Updater, bridge types.Bridger, restarter types.Restarter, -) *frontendCLI { //nolint[golint] +) *frontendCLI { //nolint:revive fe := &frontendCLI{ Shell: ishell.New(), @@ -281,7 +281,7 @@ func (f *frontendCLI) watchEvents() { // Loop starts the frontend loop with an interactive shell. func (f *frontendCLI) Loop() error { f.Print(` - Welcome to ProtonMail Bridge interactive shell + Welcome to Proton Mail Bridge interactive shell ___....___ ^^ __..-:'':__:..:__:'':-..__ _.-:__:.-:'': : : :'':-.:__:-._ diff --git a/internal/frontend/cli/system.go b/internal/frontend/cli/system.go index 625f8165b..e2f792bd0 100644 --- a/internal/frontend/cli/system.go +++ b/internal/frontend/cli/system.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cli @@ -29,7 +29,7 @@ import ( ) var ( - currentPort = "" //nolint[gochecknoglobals] + currentPort = "" //nolint:gochecknoglobals ) func (f *frontendCLI) restart(c *ishell.Context) { diff --git a/internal/frontend/cli/updates.go b/internal/frontend/cli/updates.go index af38ab662..7bd5ed839 100644 --- a/internal/frontend/cli/updates.go +++ b/internal/frontend/cli/updates.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cli diff --git a/internal/frontend/cli/utils.go b/internal/frontend/cli/utils.go index 3f10c52b3..e52775430 100644 --- a/internal/frontend/cli/utils.go +++ b/internal/frontend/cli/utils.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cli @@ -29,7 +29,7 @@ const ( ) var ( - bold = color.New(color.Bold).SprintFunc() //nolint[gochecknoglobals] + bold = color.New(color.Bold).SprintFunc() //nolint:gochecknoglobals ) func isNotEmpty(val string) bool { @@ -103,7 +103,7 @@ func (f *frontendCLI) notifyNeedUpgrade() { func (f *frontendCLI) notifyCredentialsError() { // Print in 80-column width. - f.Println("ProtonMail Bridge is not able to detect a supported password manager") + f.Println("Proton Mail Bridge is not able to detect a supported password manager") f.Println("(secret-service or pass). Please install and set up a supported password manager") f.Println("and restart the application.") } @@ -114,15 +114,15 @@ func (f *frontendCLI) notifyCertIssue() { be insecure. Description: -ProtonMail Bridge was not able to establish a secure connection to Proton +Proton Mail Bridge was not able to establish a secure connection to Proton servers due to a TLS certificate error. This means your connection may potentially be insecure and susceptible to monitoring by third parties. Recommendation: -* If you trust your network operator, you can continue to use ProtonMail +* If you trust your network operator, you can continue to use Proton Mail as usual. -* If you don't trust your network operator, reconnect to ProtonMail over a VPN +* If you don't trust your network operator, reconnect to Proton Mail over a VPN (such as ProtonVPN) which encrypts your Internet connection, or use - a different network to access ProtonMail. + a different network to access Proton Mail. `) } diff --git a/internal/frontend/clientconfig/config.go b/internal/frontend/clientconfig/config.go index e480dbe3d..6fdf0bb24 100644 --- a/internal/frontend/clientconfig/config.go +++ b/internal/frontend/clientconfig/config.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package clientconfig provides automatic config of IMAP and SMTP. // For now only for Apple Mail. @@ -34,7 +34,7 @@ type AutoConfig interface { } var ( - available = map[string]AutoConfig{} //nolint[gochecknoglobals] + available = map[string]AutoConfig{} //nolint:gochecknoglobals ErrNotAvailable = errors.New("configuration not available") ) diff --git a/internal/frontend/clientconfig/config_applemail.go b/internal/frontend/clientconfig/config_applemail.go index dd563194b..2282e2994 100644 --- a/internal/frontend/clientconfig/config_applemail.go +++ b/internal/frontend/clientconfig/config_applemail.go @@ -1,20 +1,21 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . +//go:build darwin // +build darwin package clientconfig @@ -38,7 +39,7 @@ const ( bigSurPreferncesPane = "/System/Library/PreferencePanes/Profiles.prefPane" ) -func init() { //nolint[gochecknoinit] +func init() { //nolint:gochecknoinit available[AppleMailClient] = &appleMail{} } @@ -55,10 +56,10 @@ func (c *appleMail) Configure(imapPort, smtpPort int, imapSSL, smtpSSL bool, use } if useragent.IsBigSurOrNewer() { - return exec.Command("open", bigSurPreferncesPane, confPath).Run() //nolint[gosec] G204: open command is safe, mobileconfig is generated by us + return exec.Command("open", bigSurPreferncesPane, confPath).Run() //nolint:gosec G204: open command is safe, mobileconfig is generated by us } - return exec.Command("open", confPath).Run() //nolint[gosec] G204: open command is safe, mobileconfig is generated by us + return exec.Command("open", confPath).Run() //nolint:gosec G204: open command is safe, mobileconfig is generated by us } func prepareMobileConfig(imapPort, smtpPort int, imapSSL, smtpSSL bool, user types.User, address string) *mobileconfig.Config { diff --git a/internal/frontend/frontend.go b/internal/frontend/frontend.go index 8b288e4dd..732649e19 100644 --- a/internal/frontend/frontend.go +++ b/internal/frontend/frontend.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package frontend provides all interfaces of the Bridge. package frontend diff --git a/internal/frontend/qml/AccountDelegate.qml b/internal/frontend/qml/AccountDelegate.qml index 3ba931c3d..001a7761f 100644 --- a/internal/frontend/qml/AccountDelegate.qml +++ b/internal/frontend/qml/AccountDelegate.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/AccountView.qml b/internal/frontend/qml/AccountView.qml index 599eb957e..67e7f2ec0 100644 --- a/internal/frontend/qml/AccountView.qml +++ b/internal/frontend/qml/AccountView.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/Banner.qml b/internal/frontend/qml/Banner.qml index f024057d7..740a975bd 100644 --- a/internal/frontend/qml/Banner.qml +++ b/internal/frontend/qml/Banner.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/Bridge.qml b/internal/frontend/qml/Bridge.qml index 7deb44c23..4ea8c1a25 100644 --- a/internal/frontend/qml/Bridge.qml +++ b/internal/frontend/qml/Bridge.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.13 @@ -34,6 +34,7 @@ QtObject { } property var backend + property var title: "Proton Mail Bridge" property Notifications _notifications: Notifications { id: notifications @@ -47,6 +48,7 @@ QtObject { id: mainWindow visible: false + title: root.title backend: root.backend notifications: root._notifications @@ -67,6 +69,7 @@ QtObject { id: statusWindow visible: false + title: root.title backend: root.backend notifications: root._notifications diff --git a/internal/frontend/qml/BridgeTest/UserControl.qml b/internal/frontend/qml/BridgeTest/UserControl.qml index 385197e40..50e643904 100644 --- a/internal/frontend/qml/BridgeTest/UserControl.qml +++ b/internal/frontend/qml/BridgeTest/UserControl.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.13 diff --git a/internal/frontend/qml/BridgeTest/UserList.qml b/internal/frontend/qml/BridgeTest/UserList.qml index b9c766670..effe4bc18 100644 --- a/internal/frontend/qml/BridgeTest/UserList.qml +++ b/internal/frontend/qml/BridgeTest/UserList.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/BridgeTest/UserModel.qml b/internal/frontend/qml/BridgeTest/UserModel.qml index b77568532..138db61e6 100644 --- a/internal/frontend/qml/BridgeTest/UserModel.qml +++ b/internal/frontend/qml/BridgeTest/UserModel.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml.Models 2.12 diff --git a/internal/frontend/qml/Bridge_test.qml b/internal/frontend/qml/Bridge_test.qml index db55cf958..2e41be8fb 100644 --- a/internal/frontend/qml/Bridge_test.qml +++ b/internal/frontend/qml/Bridge_test.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.13 diff --git a/internal/frontend/qml/BugReportView.qml b/internal/frontend/qml/BugReportView.qml index d5db87576..891b2bcae 100644 --- a/internal/frontend/qml/BugReportView.qml +++ b/internal/frontend/qml/BugReportView.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/Configuration.qml b/internal/frontend/qml/Configuration.qml index f6a843c63..ac7471bd9 100644 --- a/internal/frontend/qml/Configuration.qml +++ b/internal/frontend/qml/Configuration.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/ConfigurationItem.qml b/internal/frontend/qml/ConfigurationItem.qml index 9ad7ff75e..60327598c 100644 --- a/internal/frontend/qml/ConfigurationItem.qml +++ b/internal/frontend/qml/ConfigurationItem.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/ContentWrapper.qml b/internal/frontend/qml/ContentWrapper.qml index ef63a6302..2beddd300 100644 --- a/internal/frontend/qml/ContentWrapper.qml +++ b/internal/frontend/qml/ContentWrapper.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/DebugWrapper.qml b/internal/frontend/qml/DebugWrapper.qml index b4af77f51..7bfb241d9 100644 --- a/internal/frontend/qml/DebugWrapper.qml +++ b/internal/frontend/qml/DebugWrapper.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Controls 2.12 diff --git a/internal/frontend/qml/GeneralSettings.qml b/internal/frontend/qml/GeneralSettings.qml index 1637b387c..fbd537789 100644 --- a/internal/frontend/qml/GeneralSettings.qml +++ b/internal/frontend/qml/GeneralSettings.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/HelpView.qml b/internal/frontend/qml/HelpView.qml index 5d6a88278..0b9d70959 100644 --- a/internal/frontend/qml/HelpView.qml +++ b/internal/frontend/qml/HelpView.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/KeychainSettings.qml b/internal/frontend/qml/KeychainSettings.qml index 00fc017d0..e9f3a8244 100644 --- a/internal/frontend/qml/KeychainSettings.qml +++ b/internal/frontend/qml/KeychainSettings.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/LocalCacheSettings.qml b/internal/frontend/qml/LocalCacheSettings.qml index f81a1e531..bf618342c 100644 --- a/internal/frontend/qml/LocalCacheSettings.qml +++ b/internal/frontend/qml/LocalCacheSettings.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/MainWindow.qml b/internal/frontend/qml/MainWindow.qml index 02d1c52fa..8dfa488f1 100644 --- a/internal/frontend/qml/MainWindow.qml +++ b/internal/frontend/qml/MainWindow.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.13 @@ -28,7 +28,6 @@ import "tests" ApplicationWindow { id: root - title: "ProtonMail Bridge" width: 960 height: 576 diff --git a/internal/frontend/qml/NotificationDialog.qml b/internal/frontend/qml/NotificationDialog.qml index 51fc89a87..7b73caa73 100644 --- a/internal/frontend/qml/NotificationDialog.qml +++ b/internal/frontend/qml/NotificationDialog.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.12 diff --git a/internal/frontend/qml/NotificationPopups.qml b/internal/frontend/qml/NotificationPopups.qml index 35d7df073..4c89a9797 100644 --- a/internal/frontend/qml/NotificationPopups.qml +++ b/internal/frontend/qml/NotificationPopups.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.12 diff --git a/internal/frontend/qml/Notifications/Notification.qml b/internal/frontend/qml/Notifications/Notification.qml index 24a8e934d..6b2718b7e 100644 --- a/internal/frontend/qml/Notifications/Notification.qml +++ b/internal/frontend/qml/Notifications/Notification.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick.Controls 2.12 diff --git a/internal/frontend/qml/Notifications/NotificationFilter.qml b/internal/frontend/qml/Notifications/NotificationFilter.qml index c0216e503..2477788e8 100644 --- a/internal/frontend/qml/Notifications/NotificationFilter.qml +++ b/internal/frontend/qml/Notifications/NotificationFilter.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQml.Models 2.12 diff --git a/internal/frontend/qml/Notifications/Notifications.qml b/internal/frontend/qml/Notifications/Notifications.qml index 227696d2a..05d99662b 100644 --- a/internal/frontend/qml/Notifications/Notifications.qml +++ b/internal/frontend/qml/Notifications/Notifications.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import Qt.labs.platform 1.1 @@ -102,7 +102,7 @@ QtObject { property Notification updateManualReady: Notification { title: qsTr("Update to Bridge %1").arg(data ? data.version : "") description: { - var descr = qsTr("A new version of ProtonMail Bridge is available.") + var descr = qsTr("A new version of Proton Mail Bridge is available.") var text = qsTr("See what's changed.") var link = root.backend.releaseNotesLink return `${descr} ${text}` diff --git a/internal/frontend/qml/PortSettings.qml b/internal/frontend/qml/PortSettings.qml index 0eee6a699..943e6b0c4 100644 --- a/internal/frontend/qml/PortSettings.qml +++ b/internal/frontend/qml/PortSettings.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/Proton/Action.qml b/internal/frontend/qml/Proton/Action.qml index 1e7de0d4b..aac7202d3 100644 --- a/internal/frontend/qml/Proton/Action.qml +++ b/internal/frontend/qml/Proton/Action.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.12 import QtQuick.Templates 2.12 as T diff --git a/internal/frontend/qml/Proton/ApplicationWindow.qml b/internal/frontend/qml/Proton/ApplicationWindow.qml index db4dcfa54..9b72dfe12 100644 --- a/internal/frontend/qml/Proton/ApplicationWindow.qml +++ b/internal/frontend/qml/Proton/ApplicationWindow.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.12 diff --git a/internal/frontend/qml/Proton/Button.qml b/internal/frontend/qml/Proton/Button.qml index 9049f23f5..a521ab402 100644 --- a/internal/frontend/qml/Proton/Button.qml +++ b/internal/frontend/qml/Proton/Button.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.12 import QtQuick.Controls 2.12 diff --git a/internal/frontend/qml/Proton/CheckBox.qml b/internal/frontend/qml/Proton/CheckBox.qml index ffb005085..2390ffa2e 100644 --- a/internal/frontend/qml/Proton/CheckBox.qml +++ b/internal/frontend/qml/Proton/CheckBox.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.12 import QtQuick.Controls 2.12 diff --git a/internal/frontend/qml/Proton/ColorScheme.qml b/internal/frontend/qml/Proton/ColorScheme.qml index 7b1353ffc..07c14bdae 100644 --- a/internal/frontend/qml/Proton/ColorScheme.qml +++ b/internal/frontend/qml/Proton/ColorScheme.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.13 diff --git a/internal/frontend/qml/Proton/ComboBox.qml b/internal/frontend/qml/Proton/ComboBox.qml index e347a4785..f0dc52850 100644 --- a/internal/frontend/qml/Proton/ComboBox.qml +++ b/internal/frontend/qml/Proton/ComboBox.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.12 import QtQuick.Window 2.12 diff --git a/internal/frontend/qml/Proton/Dialog.qml b/internal/frontend/qml/Proton/Dialog.qml index d5d639563..e81715615 100644 --- a/internal/frontend/qml/Proton/Dialog.qml +++ b/internal/frontend/qml/Proton/Dialog.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.12 diff --git a/internal/frontend/qml/Proton/Label.qml b/internal/frontend/qml/Proton/Label.qml index 3a867db92..4099149cc 100644 --- a/internal/frontend/qml/Proton/Label.qml +++ b/internal/frontend/qml/Proton/Label.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Controls 2.12 diff --git a/internal/frontend/qml/Proton/Menu.qml b/internal/frontend/qml/Proton/Menu.qml index 3c6b2363c..a444f4538 100644 --- a/internal/frontend/qml/Proton/Menu.qml +++ b/internal/frontend/qml/Proton/Menu.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.12 import QtQuick.Controls 2.12 diff --git a/internal/frontend/qml/Proton/MenuItem.qml b/internal/frontend/qml/Proton/MenuItem.qml index a2cd61779..3307734d7 100644 --- a/internal/frontend/qml/Proton/MenuItem.qml +++ b/internal/frontend/qml/Proton/MenuItem.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.12 import QtQuick.Controls 2.12 diff --git a/internal/frontend/qml/Proton/Popup.qml b/internal/frontend/qml/Proton/Popup.qml index 62e3deab7..577705905 100644 --- a/internal/frontend/qml/Proton/Popup.qml +++ b/internal/frontend/qml/Proton/Popup.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.12 diff --git a/internal/frontend/qml/Proton/RadioButton.qml b/internal/frontend/qml/Proton/RadioButton.qml index 3b2b17d0b..f10ee4da0 100644 --- a/internal/frontend/qml/Proton/RadioButton.qml +++ b/internal/frontend/qml/Proton/RadioButton.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.12 import QtQuick.Controls 2.12 diff --git a/internal/frontend/qml/Proton/Style.qml b/internal/frontend/qml/Proton/Style.qml index 34cfd0fd1..f50ed537c 100644 --- a/internal/frontend/qml/Proton/Style.qml +++ b/internal/frontend/qml/Proton/Style.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . pragma Singleton import QtQml 2.13 diff --git a/internal/frontend/qml/Proton/Switch.qml b/internal/frontend/qml/Proton/Switch.qml index a6d1531a6..9b85b768c 100644 --- a/internal/frontend/qml/Proton/Switch.qml +++ b/internal/frontend/qml/Proton/Switch.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.12 import QtQuick.Templates 2.12 as T diff --git a/internal/frontend/qml/Proton/TextArea.qml b/internal/frontend/qml/Proton/TextArea.qml index 5d0020565..fad74f5f6 100644 --- a/internal/frontend/qml/Proton/TextArea.qml +++ b/internal/frontend/qml/Proton/TextArea.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.12 diff --git a/internal/frontend/qml/Proton/TextField.qml b/internal/frontend/qml/Proton/TextField.qml index a81b1025d..621d73878 100644 --- a/internal/frontend/qml/Proton/TextField.qml +++ b/internal/frontend/qml/Proton/TextField.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.12 diff --git a/internal/frontend/qml/Proton/Toggle.qml b/internal/frontend/qml/Proton/Toggle.qml index 28a129c25..2236cc237 100644 --- a/internal/frontend/qml/Proton/Toggle.qml +++ b/internal/frontend/qml/Proton/Toggle.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/Proton/qmldir b/internal/frontend/qml/Proton/qmldir index 7aef398b6..c52bb8ef3 100644 --- a/internal/frontend/qml/Proton/qmldir +++ b/internal/frontend/qml/Proton/qmldir @@ -1,19 +1,19 @@ -# Copyright (c) 2021 Proton Technologies AG +# Copyright (c) 2021 Proton AG # -# This file is part of ProtonMail Bridge. +# This file is part of Proton Mail Bridge. # -# ProtonMail Bridge is free software: you can redistribute it and/or modify +# Proton Mail Bridge is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# ProtonMail Bridge is distributed in the hope that it will be useful, +# Proton Mail Bridge is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with ProtonMail Bridge. If not, see . +# along with Proton Mail Bridge. If not, see . module QQtQuick.Controls.Proton depends QtQuick.Controls 2.12 diff --git a/internal/frontend/qml/SMTPSettings.qml b/internal/frontend/qml/SMTPSettings.qml index 353074217..7c713993a 100644 --- a/internal/frontend/qml/SMTPSettings.qml +++ b/internal/frontend/qml/SMTPSettings.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/SettingsItem.qml b/internal/frontend/qml/SettingsItem.qml index 064d035d7..59dfd9d94 100644 --- a/internal/frontend/qml/SettingsItem.qml +++ b/internal/frontend/qml/SettingsItem.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/SettingsView.qml b/internal/frontend/qml/SettingsView.qml index 5d8219278..c436b9531 100644 --- a/internal/frontend/qml/SettingsView.qml +++ b/internal/frontend/qml/SettingsView.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/SetupGuide.qml b/internal/frontend/qml/SetupGuide.qml index 0dc48b879..3fb94efe6 100644 --- a/internal/frontend/qml/SetupGuide.qml +++ b/internal/frontend/qml/SetupGuide.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 diff --git a/internal/frontend/qml/SignIn.qml b/internal/frontend/qml/SignIn.qml index d30738563..a39c00e07 100644 --- a/internal/frontend/qml/SignIn.qml +++ b/internal/frontend/qml/SignIn.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.13 diff --git a/internal/frontend/qml/SplashScreen.qml b/internal/frontend/qml/SplashScreen.qml index 36e6e034d..234885885 100644 --- a/internal/frontend/qml/SplashScreen.qml +++ b/internal/frontend/qml/SplashScreen.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.13 diff --git a/internal/frontend/qml/Status.qml b/internal/frontend/qml/Status.qml index a4f8b569b..addb7caf5 100644 --- a/internal/frontend/qml/Status.qml +++ b/internal/frontend/qml/Status.qml @@ -1,20 +1,20 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/StatusWindow.qml b/internal/frontend/qml/StatusWindow.qml index 4285db722..d4dc1fa63 100644 --- a/internal/frontend/qml/StatusWindow.qml +++ b/internal/frontend/qml/StatusWindow.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.13 @@ -26,7 +26,6 @@ import Notifications 1.0 Window { id: root - title: "ProtonMail Bridge" height: contentLayout.implicitHeight width: contentLayout.implicitWidth diff --git a/internal/frontend/qml/WelcomeGuide.qml b/internal/frontend/qml/WelcomeGuide.qml index b70fa9141..a56f06e92 100644 --- a/internal/frontend/qml/WelcomeGuide.qml +++ b/internal/frontend/qml/WelcomeGuide.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQml 2.12 import QtQuick 2.13 @@ -102,7 +102,7 @@ Item { Label { colorScheme: root.colorScheme id: longTextLabel - text: qsTr("Now you can securely access and manage ProtonMail messages in your favorite email client. Bridge runs in the background and encrypts and decrypts your messages seamlessly.") + text: qsTr("Now you can securely access and manage Proton Mail messages in your favorite email client. Bridge runs in the background and encrypts and decrypts your messages seamlessly.") Layout.alignment: Qt.AlignHCenter Layout.fillWidth: true Layout.topMargin: 16 diff --git a/internal/frontend/qml/bridgeqml.qmlproject b/internal/frontend/qml/bridgeqml.qmlproject index d46df6548..15f0db8ee 100644 --- a/internal/frontend/qml/bridgeqml.qmlproject +++ b/internal/frontend/qml/bridgeqml.qmlproject @@ -1,19 +1,19 @@ -// Copyright (c) 2021 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QmlProject 1.1 diff --git a/internal/frontend/qml/tests/Buttons.qml b/internal/frontend/qml/tests/Buttons.qml index 996f55b37..c44feb4b5 100644 --- a/internal/frontend/qml/tests/Buttons.qml +++ b/internal/frontend/qml/tests/Buttons.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Window 2.13 diff --git a/internal/frontend/qml/tests/ButtonsColumn.qml b/internal/frontend/qml/tests/ButtonsColumn.qml index eefd585f9..988d5f893 100644 --- a/internal/frontend/qml/tests/ButtonsColumn.qml +++ b/internal/frontend/qml/tests/ButtonsColumn.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick.Layouts 1.12 import QtQuick 2.12 diff --git a/internal/frontend/qml/tests/CheckBoxes.qml b/internal/frontend/qml/tests/CheckBoxes.qml index 2943fcd60..18b86841e 100644 --- a/internal/frontend/qml/tests/CheckBoxes.qml +++ b/internal/frontend/qml/tests/CheckBoxes.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Window 2.13 diff --git a/internal/frontend/qml/tests/ComboBoxes.qml b/internal/frontend/qml/tests/ComboBoxes.qml index 8d6fd684f..c95e62ac5 100644 --- a/internal/frontend/qml/tests/ComboBoxes.qml +++ b/internal/frontend/qml/tests/ComboBoxes.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Window 2.13 diff --git a/internal/frontend/qml/tests/RadioButtons.qml b/internal/frontend/qml/tests/RadioButtons.qml index a85fbd744..2625f2c08 100644 --- a/internal/frontend/qml/tests/RadioButtons.qml +++ b/internal/frontend/qml/tests/RadioButtons.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Window 2.13 diff --git a/internal/frontend/qml/tests/Switches.qml b/internal/frontend/qml/tests/Switches.qml index 7973c1efb..eae074484 100644 --- a/internal/frontend/qml/tests/Switches.qml +++ b/internal/frontend/qml/tests/Switches.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Window 2.13 diff --git a/internal/frontend/qml/tests/Test.qml b/internal/frontend/qml/tests/Test.qml index 1236e70f4..9093b33e2 100644 --- a/internal/frontend/qml/tests/Test.qml +++ b/internal/frontend/qml/tests/Test.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick.Window 2.13 diff --git a/internal/frontend/qml/tests/TestComponents.qml b/internal/frontend/qml/tests/TestComponents.qml index ad26f5507..61c12bdf9 100644 --- a/internal/frontend/qml/tests/TestComponents.qml +++ b/internal/frontend/qml/tests/TestComponents.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Layouts 1.12 diff --git a/internal/frontend/qml/tests/TextAreas.qml b/internal/frontend/qml/tests/TextAreas.qml index 6efb69d09..ba8632d97 100644 --- a/internal/frontend/qml/tests/TextAreas.qml +++ b/internal/frontend/qml/tests/TextAreas.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Window 2.13 diff --git a/internal/frontend/qml/tests/TextFields.qml b/internal/frontend/qml/tests/TextFields.qml index 8b3684927..6d83da5be 100644 --- a/internal/frontend/qml/tests/TextFields.qml +++ b/internal/frontend/qml/tests/TextFields.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . import QtQuick 2.13 import QtQuick.Window 2.13 diff --git a/internal/frontend/qt/dockicon/DockIcon.h b/internal/frontend/qt/dockicon/DockIcon.h index e43100444..cc2424492 100644 --- a/internal/frontend/qt/dockicon/DockIcon.h +++ b/internal/frontend/qt/dockicon/DockIcon.h @@ -1,19 +1,19 @@ -// Copyright (c) 2021 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // +build darwin // +build build_qt diff --git a/internal/frontend/qt/dockicon/DockIcon.m b/internal/frontend/qt/dockicon/DockIcon.m index 82fdc6676..8059064bb 100644 --- a/internal/frontend/qt/dockicon/DockIcon.m +++ b/internal/frontend/qt/dockicon/DockIcon.m @@ -1,19 +1,19 @@ -// Copyright (c) 2021 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // +build darwin // +build build_qt diff --git a/internal/frontend/qt/dockicon/dockicon_darwin.go b/internal/frontend/qt/dockicon/dockicon_darwin.go index 43e61ea9b..e5b60fafe 100644 --- a/internal/frontend/qt/dockicon/dockicon_darwin.go +++ b/internal/frontend/qt/dockicon/dockicon_darwin.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // +build darwin // +build build_qt diff --git a/internal/frontend/qt/dockicon/dockicon_default.go b/internal/frontend/qt/dockicon/dockicon_default.go index c1f94f2dc..bd1a9fb01 100644 --- a/internal/frontend/qt/dockicon/dockicon_default.go +++ b/internal/frontend/qt/dockicon/dockicon_default.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // +build !darwin // +build build_qt diff --git a/internal/frontend/qt/frontend.go b/internal/frontend/qt/frontend.go index bbfc966d5..da87aa309 100644 --- a/internal/frontend/qt/frontend.go +++ b/internal/frontend/qt/frontend.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build build_qt // +build build_qt @@ -86,7 +86,7 @@ func New( userAgent.SetPlatform(core.QSysInfo_PrettyProductName()) f := &FrontendQt{ - programName: "Proton Mail Bridge", + programName: programName, programVersion: version, log: logrus.WithField("pkg", "frontend/qt"), diff --git a/internal/frontend/qt/frontend_events.go b/internal/frontend/qt/frontend_events.go index cf9ac28cc..b0a9a924f 100644 --- a/internal/frontend/qt/frontend_events.go +++ b/internal/frontend/qt/frontend_events.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build build_qt // +build build_qt diff --git a/internal/frontend/qt/frontend_help.go b/internal/frontend/qt/frontend_help.go index c2374e125..2145ec6cc 100644 --- a/internal/frontend/qt/frontend_help.go +++ b/internal/frontend/qt/frontend_help.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build build_qt // +build build_qt diff --git a/internal/frontend/qt/frontend_init.go b/internal/frontend/qt/frontend_init.go index 17bfbdad3..78bcbfa73 100644 --- a/internal/frontend/qt/frontend_init.go +++ b/internal/frontend/qt/frontend_init.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build build_qt // +build build_qt diff --git a/internal/frontend/qt/frontend_nogui.go b/internal/frontend/qt/frontend_nogui.go index 442c11b08..cbe9bcbf6 100644 --- a/internal/frontend/qt/frontend_nogui.go +++ b/internal/frontend/qt/frontend_nogui.go @@ -1,20 +1,21 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . +//go:build !build_qt // +build !build_qt package qt @@ -32,7 +33,7 @@ import ( "github.com/sirupsen/logrus" ) -var log = logrus.WithField("pkg", "frontend-nogui") //nolint[gochecknoglobals] +var log = logrus.WithField("pkg", "frontend-nogui") //nolint:gochecknoglobals type FrontendHeadless struct{} diff --git a/internal/frontend/qt/frontend_settings.go b/internal/frontend/qt/frontend_settings.go index c3b97203a..38933416b 100644 --- a/internal/frontend/qt/frontend_settings.go +++ b/internal/frontend/qt/frontend_settings.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build build_qt // +build build_qt diff --git a/internal/frontend/qt/frontend_updates.go b/internal/frontend/qt/frontend_updates.go index 3c48f1add..3c606c6ac 100644 --- a/internal/frontend/qt/frontend_updates.go +++ b/internal/frontend/qt/frontend_updates.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build build_qt // +build build_qt diff --git a/internal/frontend/qt/frontend_users.go b/internal/frontend/qt/frontend_users.go index 05b6a782b..42e48c8ff 100644 --- a/internal/frontend/qt/frontend_users.go +++ b/internal/frontend/qt/frontend_users.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build build_qt // +build build_qt diff --git a/internal/frontend/qt/helpers.go b/internal/frontend/qt/helpers.go index ddfe0a9fa..e5a7e401f 100644 --- a/internal/frontend/qt/helpers.go +++ b/internal/frontend/qt/helpers.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // +build build_qt diff --git a/internal/frontend/qt/log/log.cpp b/internal/frontend/qt/log/log.cpp index 1950b0601..64ca95899 100644 --- a/internal/frontend/qt/log/log.cpp +++ b/internal/frontend/qt/log/log.cpp @@ -1,19 +1,19 @@ -// Copyright (c) 2021 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // +build build_qt diff --git a/internal/frontend/qt/log/log.go b/internal/frontend/qt/log/log.go index 25128259b..815dc696a 100644 --- a/internal/frontend/qt/log/log.go +++ b/internal/frontend/qt/log/log.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // +build build_qt diff --git a/internal/frontend/qt/log/log.h b/internal/frontend/qt/log/log.h index 777e97af3..a20c83966 100644 --- a/internal/frontend/qt/log/log.h +++ b/internal/frontend/qt/log/log.h @@ -1,19 +1,19 @@ -// Copyright (c) 2021 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . #pragma once diff --git a/internal/frontend/qt/qml_backend.go b/internal/frontend/qt/qml_backend.go index 2c678679a..b3bc9f6a4 100644 --- a/internal/frontend/qt/qml_backend.go +++ b/internal/frontend/qt/qml_backend.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build build_qt // +build build_qt diff --git a/internal/frontend/qt/qml_users.go b/internal/frontend/qt/qml_users.go index c513a928c..79b2cc458 100644 --- a/internal/frontend/qt/qml_users.go +++ b/internal/frontend/qt/qml_users.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build build_qt // +build build_qt diff --git a/internal/frontend/share/info.rc b/internal/frontend/share/info.rc index 69438d91d..1bad72d8e 100644 --- a/internal/frontend/share/info.rc +++ b/internal/frontend/share/info.rc @@ -4,11 +4,11 @@ IDI_ICON1 ICON DISCARDABLE STRINGIZE(ICO_FILE) #define FILE_COMMENTS "The Bridge is an application that runs on your computer in the background and seamlessly encrypts and decrypts your mail as it enters and leaves your computer." -#define FILE_DESCRIPTION "ProtonMail Bridge" +#define FILE_DESCRIPTION "Proton Mail Bridge" #define INTERNAL_NAME STRINGIZE(EXE_NAME) -#define PRODUCT_NAME "ProtonMail Bridge for Windows" +#define PRODUCT_NAME "Proton Mail Bridge for Windows" -#define LEGAL_COPYRIGHT "(C) " STRINGIZE(YEAR) " Proton Technologies AG" +#define LEGAL_COPYRIGHT "(C) " STRINGIZE(YEAR) " Proton AG" 1 VERSIONINFO FILEVERSION FILE_VERSION_COMMA,0 @@ -19,7 +19,7 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "Comments", FILE_COMMENTS - VALUE "CompanyName", "Proton Technologies AG" + VALUE "CompanyName", "Proton AG" VALUE "FileDescription", FILE_DESCRIPTION VALUE "FileVersion", STRINGIZE(FILE_VERSION) VALUE "InternalName", INTERNAL_NAME diff --git a/internal/frontend/theme/detect_darwin.go b/internal/frontend/theme/detect_darwin.go index f0a71a3ab..f9a8e8403 100644 --- a/internal/frontend/theme/detect_darwin.go +++ b/internal/frontend/theme/detect_darwin.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build darwin // +build darwin @@ -26,7 +26,7 @@ import ( ) func detectSystemTheme() Theme { - out, err := exec.Command("defaults", "read", "-g", "AppleInterfaceStyle").Output() //nolint[gosec] + out, err := exec.Command("defaults", "read", "-g", "AppleInterfaceStyle").Output() //nolint:gosec if err == nil && strings.TrimSpace(string(out)) == "Dark" { return Dark } diff --git a/internal/frontend/theme/detect_default.go b/internal/frontend/theme/detect_default.go index ca79eb663..c3b9cc564 100644 --- a/internal/frontend/theme/detect_default.go +++ b/internal/frontend/theme/detect_default.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build !windows && !darwin // +build !windows,!darwin diff --git a/internal/frontend/theme/detect_windows.go b/internal/frontend/theme/detect_windows.go index fa3a390ef..e54a59a24 100644 --- a/internal/frontend/theme/detect_windows.go +++ b/internal/frontend/theme/detect_windows.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build windows // +build windows diff --git a/internal/frontend/theme/theme.go b/internal/frontend/theme/theme.go index d0b30d16e..60397426e 100644 --- a/internal/frontend/theme/theme.go +++ b/internal/frontend/theme/theme.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package theme diff --git a/internal/frontend/theme/theme_test.go b/internal/frontend/theme/theme_test.go index a99e33f61..8364069bf 100644 --- a/internal/frontend/theme/theme_test.go +++ b/internal/frontend/theme/theme_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package settings provides access to persistent user settings. package theme diff --git a/internal/frontend/types/types.go b/internal/frontend/types/types.go index 32cdb9600..e179b61d2 100644 --- a/internal/frontend/types/types.go +++ b/internal/frontend/types/types.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package types provides interfaces used in frontend packages. package types @@ -101,7 +101,7 @@ type bridgeWrap struct { // NewBridgeWrap wraps bridge struct into local bridgeWrap to implement local interface. // The problem is that Bridge returns the bridge package's User type. // Every method which returns User therefore has to be overridden to fulfill the interface. -func NewBridgeWrap(bridge *bridge.Bridge) *bridgeWrap { //nolint[golint] +func NewBridgeWrap(bridge *bridge.Bridge) *bridgeWrap { //nolint:revive return &bridgeWrap{Bridge: bridge} } diff --git a/internal/imap/backend.go b/internal/imap/backend.go index e3e9c3e43..cff6c88f2 100644 --- a/internal/imap/backend.go +++ b/internal/imap/backend.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package imap provides IMAP server of the Bridge. // @@ -75,7 +75,7 @@ func NewIMAPBackend( cache cacheProvider, setting settingsProvider, bridge *bridge.Bridge, -) *imapBackend { //nolint[golint] +) *imapBackend { //nolint:revive bridgeWrap := newBridgeWrap(bridge) imapWorkers := setting.GetInt(settings.IMAPWorkers) diff --git a/internal/imap/backend_cache.go b/internal/imap/backend_cache.go index aa7b308da..dd7a75f62 100644 --- a/internal/imap/backend_cache.go +++ b/internal/imap/backend_cache.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap @@ -115,7 +115,7 @@ func (ib *imapBackend) loadIMAPCache() error { if err != nil { return err } - defer f.Close() //nolint[errcheck] + defer f.Close() //nolint:errcheck,gosec return json.NewDecoder(f).Decode(&ib.imapCache) } @@ -132,7 +132,7 @@ func (ib *imapBackend) saveIMAPCache() error { if err != nil { return err } - defer f.Close() //nolint[errcheck] + defer f.Close() //nolint:errcheck,gosec return json.NewEncoder(f).Encode(ib.imapCache) } diff --git a/internal/imap/bridge.go b/internal/imap/bridge.go index 72b8a9e01..bbbaa1d25 100644 --- a/internal/imap/bridge.go +++ b/internal/imap/bridge.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap @@ -61,7 +61,7 @@ func (b *bridgeWrap) GetUser(query string) (bridgeUser, error) { if err != nil { return nil, err } - return newBridgeUserWrap(user), nil //nolint[typecheck] missing methods are inherited + return newBridgeUserWrap(user), nil //nolint:typecheck missing methods are inherited } type bridgeUserWrap struct { @@ -77,5 +77,5 @@ func (u *bridgeUserWrap) GetStore() storeUserProvider { if store == nil { return nil } - return newStoreUserWrap(store) //nolint[typecheck] missing methods are inherited + return newStoreUserWrap(store) //nolint:typecheck missing methods are inherited } diff --git a/internal/imap/id/extension.go b/internal/imap/id/extension.go index d5f62c025..8b805364e 100644 --- a/internal/imap/id/extension.go +++ b/internal/imap/id/extension.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package id diff --git a/internal/imap/idle/extension.go b/internal/imap/idle/extension.go index f490d98b0..273aa7616 100644 --- a/internal/imap/idle/extension.go +++ b/internal/imap/idle/extension.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package idle diff --git a/internal/imap/imap.go b/internal/imap/imap.go index 16adcdd3b..a461163c4 100644 --- a/internal/imap/imap.go +++ b/internal/imap/imap.go @@ -1,22 +1,22 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap import "github.com/sirupsen/logrus" -var log = logrus.WithField("pkg", "imap") //nolint[gochecknoglobals] +var log = logrus.WithField("pkg", "imap") //nolint:gochecknoglobals diff --git a/internal/imap/mailbox.go b/internal/imap/mailbox.go index 06d5131f3..3bbcc7304 100644 --- a/internal/imap/mailbox.go +++ b/internal/imap/mailbox.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap diff --git a/internal/imap/mailbox_append.go b/internal/imap/mailbox_append.go index 01e7d4825..fdb5ea991 100644 --- a/internal/imap/mailbox_append.go +++ b/internal/imap/mailbox_append.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap @@ -47,7 +47,7 @@ func (im *imapMailbox) CreateMessage(flags []string, date time.Time, body imap.L }, "APPEND", flags, date) } -func (im *imapMailbox) createMessage(imapFlags []string, date time.Time, r imap.Literal) error { //nolint[funlen] +func (im *imapMailbox) createMessage(imapFlags []string, date time.Time, r imap.Literal) error { //nolint:funlen // Called from go-imap in goroutines - we need to handle panics for each function. defer im.panicHandler.HandlePanic() @@ -156,7 +156,7 @@ func findMailboxForAddress(address storeAddressProvider, labelID string) (storeM address.AddressString()) } -func (im *imapMailbox) labelExistingMessage(msg storeMessageProvider) error { //nolint[funlen] +func (im *imapMailbox) labelExistingMessage(msg storeMessageProvider) error { //nolint:funlen im.log.Info("Labelling existing message") // IMAP clients can move message to local folder (setting \Deleted flag) @@ -196,7 +196,7 @@ func (im *imapMailbox) labelExistingMessage(msg storeMessageProvider) error { // return uidplus.AppendResponse(im.storeMailbox.UIDValidity(), im.storeMailbox.GetUIDList([]string{msg.ID()})) } -func (im *imapMailbox) importMessage(kr *crypto.KeyRing, hdr textproto.Header, body []byte, imapFlags []string, date time.Time) error { //nolint[funlen] +func (im *imapMailbox) importMessage(kr *crypto.KeyRing, hdr textproto.Header, body []byte, imapFlags []string, date time.Time) error { //nolint:funlen im.log.Info("Importing external message") var ( diff --git a/internal/imap/mailbox_fetch.go b/internal/imap/mailbox_fetch.go index 09e768f40..b3d56921f 100644 --- a/internal/imap/mailbox_fetch.go +++ b/internal/imap/mailbox_fetch.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap @@ -87,7 +87,7 @@ func (im *imapMailbox) getLiteralForSection(itemSection imap.FetchItem, msg *ima section, err := imap.ParseBodySectionName(itemSection) if err != nil { log.WithError(err).Warn("Failed to parse body section name; part will be skipped") - return nil //nolint[nilerr] ignore error + return nil //nolint:nilerr ignore error } var literal imap.Literal diff --git a/internal/imap/mailbox_fetch_test.go b/internal/imap/mailbox_fetch_test.go index e60967ad7..e6be92820 100644 --- a/internal/imap/mailbox_fetch_test.go +++ b/internal/imap/mailbox_fetch_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap diff --git a/internal/imap/mailbox_header.go b/internal/imap/mailbox_header.go index 16f97cb6b..dbcba1888 100644 --- a/internal/imap/mailbox_header.go +++ b/internal/imap/mailbox_header.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap diff --git a/internal/imap/mailbox_messages.go b/internal/imap/mailbox_messages.go index d71f1efb2..18be95ab4 100644 --- a/internal/imap/mailbox_messages.go +++ b/internal/imap/mailbox_messages.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap @@ -70,7 +70,7 @@ func (im *imapMailbox) updateMessagesFlags(uid bool, seqSet *imap.SeqSet, operat // to set flags passed as an argument and unset the rest. For example, // if message is not read, is flagged and is not deleted, call FLAGS \Seen // should flag message as read, unflagged and keep undeleted. -func (im *imapMailbox) setFlags(messageIDs, flags []string) error { //nolint +func (im *imapMailbox) setFlags(messageIDs, flags []string) error { //nolint:funlen seen := false flagged := false deleted := false @@ -137,7 +137,7 @@ func (im *imapMailbox) setFlags(messageIDs, flags []string) error { //nolint return nil } -func (im *imapMailbox) addOrRemoveFlags(operation imap.FlagsOp, messageIDs, flags []string) error { //nolint[funlen] +func (im *imapMailbox) addOrRemoveFlags(operation imap.FlagsOp, messageIDs, flags []string) error { //nolint:funlen for _, f := range flags { // Adding flag 'nojunk' is equivalent to removing flag 'junk' if (operation == imap.AddFlags) && (f == "nojunk") { @@ -147,7 +147,7 @@ func (im *imapMailbox) addOrRemoveFlags(operation imap.FlagsOp, messageIDs, flag switch f { case imap.SeenFlag: - switch operation { //nolint[exhaustive] imap.SetFlags is processed by im.setFlags + switch operation { //nolint:exhaustive // imap.SetFlags is processed by im.setFlags case imap.AddFlags: if err := im.storeMailbox.MarkMessagesRead(messageIDs); err != nil { return err @@ -158,7 +158,7 @@ func (im *imapMailbox) addOrRemoveFlags(operation imap.FlagsOp, messageIDs, flag } } case imap.FlaggedFlag: - switch operation { //nolint[exhaustive] imap.SetFlag is processed by im.setFlags + switch operation { //nolint:exhaustive // imap.SetFlag is processed by im.setFlags case imap.AddFlags: if err := im.storeMailbox.MarkMessagesStarred(messageIDs); err != nil { return err @@ -169,7 +169,7 @@ func (im *imapMailbox) addOrRemoveFlags(operation imap.FlagsOp, messageIDs, flag } } case imap.DeletedFlag: - switch operation { //nolint[exhaustive] imap.SetFlag is processed by im.setFlags + switch operation { //nolint:exhaustive // imap.SetFlag is processed by im.setFlags case imap.AddFlags: if err := im.storeMailbox.MarkMessagesDeleted(messageIDs); err != nil { return err @@ -187,7 +187,7 @@ func (im *imapMailbox) addOrRemoveFlags(operation imap.FlagsOp, messageIDs, flag return err } // Handle custom junk flags for Apple Mail and Thunderbird. - switch operation { //nolint[exhaustive] imap.SetFlag is processed by im.setFlags + switch operation { //nolint:exhaustive // imap.SetFlag is processed by im.setFlags // No label removal is necessary because Spam and Inbox are both exclusive labels so the backend // will automatically take care of label removal. case imap.AddFlags: @@ -257,7 +257,7 @@ func (im *imapMailbox) moveMessages(uid bool, seqSet *imap.SeqSet, targetLabel s return im.labelMessages(uid, seqSet, targetLabel, true) } -func (im *imapMailbox) labelMessages(uid bool, seqSet *imap.SeqSet, targetLabel string, move bool) error { //nolint[funlen] +func (im *imapMailbox) labelMessages(uid bool, seqSet *imap.SeqSet, targetLabel string, move bool) error { //nolint:funlen messageIDs, err := im.apiIDsFromSeqSet(uid, seqSet) if err != nil || len(messageIDs) == 0 { return err @@ -332,7 +332,7 @@ func (im *imapMailbox) labelMessages(uid bool, seqSet *imap.SeqSet, targetLabel // SearchMessages searches messages. The returned list must contain UIDs if // uid is set to true, or sequence numbers otherwise. -func (im *imapMailbox) SearchMessages(isUID bool, criteria *imap.SearchCriteria) (ids []uint32, err error) { //nolint[gocyclo] +func (im *imapMailbox) SearchMessages(isUID bool, criteria *imap.SearchCriteria) (ids []uint32, err error) { //nolint:gocyclo,funlen // Called from go-imap in goroutines - we need to handle panics for each function. defer im.panicHandler.HandlePanic() @@ -524,7 +524,7 @@ func (im *imapMailbox) ListMessages(isUID bool, seqSet *imap.SeqSet, items []ima }, "FETCH", isUID, seqSet, items) } -func (im *imapMailbox) listMessages(isUID bool, seqSet *imap.SeqSet, items []imap.FetchItem, msgResponse chan<- *imap.Message) (err error) { //nolint[funlen] +func (im *imapMailbox) listMessages(isUID bool, seqSet *imap.SeqSet, items []imap.FetchItem, msgResponse chan<- *imap.Message) (err error) { //nolint:funlen defer func() { close(msgResponse) if err != nil { @@ -560,7 +560,7 @@ func (im *imapMailbox) listMessages(isUID bool, seqSet *imap.SeqSet, items []ima } processCallback := func(value interface{}) (interface{}, error) { - apiID := value.(string) //nolint[forcetypeassert] we want to panic here + apiID := value.(string) //nolint:forcetypeassert // we want to panic here storeMessage, err := im.storeMailbox.GetMessage(apiID) if err != nil { @@ -594,7 +594,7 @@ func (im *imapMailbox) listMessages(isUID bool, seqSet *imap.SeqSet, items []ima } collectCallback := func(idx int, value interface{}) error { - msg := value.(*imap.Message) //nolint[forcetypeassert] we want to panic here + msg := value.(*imap.Message) //nolint:forcetypeassert // we want to panic here msgResponse <- msg return nil } diff --git a/internal/imap/mailbox_root.go b/internal/imap/mailbox_root.go index 64fa97401..e36fa4c32 100644 --- a/internal/imap/mailbox_root.go +++ b/internal/imap/mailbox_root.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap diff --git a/internal/imap/server.go b/internal/imap/server.go index 4f55f5384..3839f16e5 100644 --- a/internal/imap/server.go +++ b/internal/imap/server.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap @@ -87,8 +87,8 @@ func newGoIMAPServer(tls *tls.Config, backend backend.Backend, address string, u server.Addr = address serverID := imapid.ID{ - imapid.FieldName: "ProtonMail Bridge", - imapid.FieldVendor: "Proton Technologies AG", + imapid.FieldName: "Proton Mail Bridge", + imapid.FieldVendor: "Proton AG", imapid.FieldSupportURL: "https://protonmail.com/support", } diff --git a/internal/imap/store.go b/internal/imap/store.go index aa7c207e0..776b52b05 100644 --- a/internal/imap/store.go +++ b/internal/imap/store.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap @@ -124,7 +124,7 @@ func (s *storeUserWrap) GetAddress(addressID string) (storeAddressProvider, erro if err != nil { return nil, err } - return newStoreAddressWrap(address), nil //nolint[typecheck] missing methods are inherited + return newStoreAddressWrap(address), nil //nolint:typecheck missing methods are inherited } type storeAddressWrap struct { @@ -138,7 +138,7 @@ func newStoreAddressWrap(address *store.Address) *storeAddressWrap { func (s *storeAddressWrap) ListMailboxes() []storeMailboxProvider { mailboxes := []storeMailboxProvider{} for _, mailbox := range s.Address.ListMailboxes() { - mailboxes = append(mailboxes, newStoreMailboxWrap(mailbox)) //nolint[typecheck] missing methods are inherited + mailboxes = append(mailboxes, newStoreMailboxWrap(mailbox)) //nolint:typecheck missing methods are inherited } return mailboxes } @@ -148,7 +148,7 @@ func (s *storeAddressWrap) GetMailbox(name string) (storeMailboxProvider, error) if err != nil { return nil, err } - return newStoreMailboxWrap(mailbox), nil //nolint[typecheck] missing methods are inherited + return newStoreMailboxWrap(mailbox), nil //nolint:typecheck missing methods are inherited } type storeMailboxWrap struct { diff --git a/internal/imap/uidplus/extension.go b/internal/imap/uidplus/extension.go index dcf8d07a0..ac22adae5 100644 --- a/internal/imap/uidplus/extension.go +++ b/internal/imap/uidplus/extension.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package uidplus DOES NOT implement full RFC4315! // @@ -30,7 +30,6 @@ import ( "github.com/emersion/go-imap" "github.com/emersion/go-imap/server" - "github.com/sirupsen/logrus" ) // Capability extension identifier. @@ -43,8 +42,6 @@ const ( appendSucess = "APPEND completed" ) -var log = logrus.WithField("pkg", "imap/uidplus") //nolint[gochecknoglobals] - // OrderedSeq to remember Seq in order they are added. // We didn't find any restriction in RFC that server must respond with ranges // so we decided to always do explicit list. This makes sure that no dynamic @@ -155,7 +152,7 @@ func (e *UIDExpunge) Handle(conn server.Conn) error { return mailbox.Expunge() } -func (e *UIDExpunge) UidHandle(conn server.Conn) error { //nolint[golint] +func (e *UIDExpunge) UidHandle(conn server.Conn) error { //nolint:revive,stylecheck if e.SeqSet == nil { return errors.New("missing sequence set") } diff --git a/internal/imap/uidplus/extension_test.go b/internal/imap/uidplus/extension_test.go index 6c1be33b6..840b00100 100644 --- a/internal/imap/uidplus/extension_test.go +++ b/internal/imap/uidplus/extension_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package uidplus diff --git a/internal/imap/updates.go b/internal/imap/updates.go index 7b429632e..b3c922809 100644 --- a/internal/imap/updates.go +++ b/internal/imap/updates.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap diff --git a/internal/imap/updates_test.go b/internal/imap/updates_test.go index 122a2f578..f632c0ea0 100644 --- a/internal/imap/updates_test.go +++ b/internal/imap/updates_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap diff --git a/internal/imap/user.go b/internal/imap/user.go index a00a30327..b25063280 100644 --- a/internal/imap/user.go +++ b/internal/imap/user.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package imap @@ -27,10 +27,6 @@ import ( goIMAPBackend "github.com/emersion/go-imap/backend" ) -var ( - errNoSuchMailbox = errors.New("no such mailbox") //nolint[gochecknoglobals] -) - type imapUser struct { panicHandler panicHandler backend *imapBackend @@ -147,7 +143,7 @@ func (iu *imapUser) ListMailboxes(showOnlySubcribed bool) ([]goIMAPBackend.Mailb return mailboxes, nil } -// GetMailbox returns a mailbox. If it doesn't exist, it returns ErrNoSuchMailbox. +// GetMailbox returns a mailbox. func (iu *imapUser) GetMailbox(name string) (mb goIMAPBackend.Mailbox, err error) { // Called from go-imap in goroutines - we need to handle panics for each function. defer iu.panicHandler.HandlePanic() diff --git a/internal/locations/locations.go b/internal/locations/locations.go index d089e7d90..702d8684a 100644 --- a/internal/locations/locations.go +++ b/internal/locations/locations.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package locations implements a type that provides cross-platform access to // standard filesystem locations, including config, cache and log directories. @@ -80,13 +80,17 @@ func (l *Locations) getLicenseFilePath() string { } // Arch distributions. return "/usr/share/licenses/protonmail-" + l.configName + "/LICENSE" - case "darwin": //nolint[goconst] + case "darwin": //nolint:goconst path := filepath.Join(filepath.Dir(os.Args[0]), "..", "Resources", "LICENSE") if _, err := os.Stat(path); err == nil { return path } - return "/Applications/ProtonMail Bridge.app/Contents/Resources/LICENSE" + // This should not happen, macOS should be handled by relative + // location to the binary above. This is just fallback which may + // or may not work, depends where user installed the app and how + // user started the app. + return "/Applications/Proton Mail Bridge.app/Contents/Resources/LICENSE" case "windows": path := filepath.Join(filepath.Dir(os.Args[0]), "LICENSE.txt") if _, err := os.Stat(path); err == nil { @@ -96,7 +100,7 @@ func (l *Locations) getLicenseFilePath() string { // location to the binary above. This is just fallback which may // or may not work, depends where user installed the app and how // user started the app. - return filepath.FromSlash("C:/Program Files/Proton Technologies AG/ProtonMail Bridge/LICENSE.txt") + return filepath.FromSlash("C:/Program Files/Proton/Proton Mail Bridge/LICENSE.txt") } return "" } diff --git a/internal/locations/locations_test.go b/internal/locations/locations_test.go index 33077109c..6893462c3 100644 --- a/internal/locations/locations_test.go +++ b/internal/locations/locations_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package locations diff --git a/internal/locations/provider.go b/internal/locations/provider.go index 0095e20f4..e70835637 100644 --- a/internal/locations/provider.go +++ b/internal/locations/provider.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package locations diff --git a/internal/logging/clear.go b/internal/logging/clear.go index ce70a2f15..ee64ef1ff 100644 --- a/internal/logging/clear.go +++ b/internal/logging/clear.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package logging diff --git a/internal/logging/crash.go b/internal/logging/crash.go index d1cb7c1a3..cca9ca33a 100644 --- a/internal/logging/crash.go +++ b/internal/logging/crash.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package logging diff --git a/internal/logging/logging.go b/internal/logging/logging.go index 791b14432..c22eea349 100644 --- a/internal/logging/logging.go +++ b/internal/logging/logging.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package logging @@ -57,6 +57,7 @@ func Init(logsPath string) error { logrus.PanicLevel, logrus.FatalLevel, logrus.ErrorLevel, + logrus.WarnLevel, }, }) @@ -66,7 +67,7 @@ func Init(logsPath string) error { return nil, err } - return os.Create(filepath.Join(logsPath, getLogName(constants.Version, constants.Revision))) + return os.Create(filepath.Join(logsPath, getLogName(constants.Version, constants.Revision))) //nolint:gosec // G304 }) if err != nil { return err diff --git a/internal/logging/logging_test.go b/internal/logging/logging_test.go index 145a1f9cb..a05f4f21f 100644 --- a/internal/logging/logging_test.go +++ b/internal/logging/logging_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package logging diff --git a/internal/logging/rotator.go b/internal/logging/rotator.go index 63a79fde2..21fb5651e 100644 --- a/internal/logging/rotator.go +++ b/internal/logging/rotator.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package logging diff --git a/internal/logging/rotator_test.go b/internal/logging/rotator_test.go index 600f95b37..e361b310d 100644 --- a/internal/logging/rotator_test.go +++ b/internal/logging/rotator_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package logging @@ -79,7 +79,7 @@ func TestRotator(t *testing.T) { func BenchmarkRotateRAMFile(b *testing.B) { dir, err := ioutil.TempDir("", "rotate-benchmark") require.NoError(b, err) - defer os.RemoveAll(dir) // nolint[errcheck] + defer os.RemoveAll(dir) //nolint:errcheck benchRotate(b, MaxLogSize, getTestFile(b, dir, MaxLogSize-1)) } @@ -90,7 +90,7 @@ func BenchmarkRotateDiskFile(b *testing.B) { dir, err := ioutil.TempDir(cache, "rotate-benchmark") require.NoError(b, err) - defer os.RemoveAll(dir) // nolint[errcheck] + defer os.RemoveAll(dir) //nolint:errcheck benchRotate(b, MaxLogSize, getTestFile(b, dir, MaxLogSize-1)) } diff --git a/internal/metrics/metrics.go b/internal/metrics/metrics.go index 1d5880295..a4854f439 100644 --- a/internal/metrics/metrics.go +++ b/internal/metrics/metrics.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package metrics collects string constants used to report anonymous usage metrics. package metrics diff --git a/internal/sentry/hostarch_darwin.go b/internal/sentry/hostarch_darwin.go index 612300a17..6b77467ba 100644 --- a/internal/sentry/hostarch_darwin.go +++ b/internal/sentry/hostarch_darwin.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build darwin // +build darwin diff --git a/internal/sentry/hostarch_default.go b/internal/sentry/hostarch_default.go index 4150180a0..7292e0b91 100644 --- a/internal/sentry/hostarch_default.go +++ b/internal/sentry/hostarch_default.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build !darwin // +build !darwin diff --git a/internal/sentry/reporter.go b/internal/sentry/reporter.go index b94784f1c..69a8bff22 100644 --- a/internal/sentry/reporter.go +++ b/internal/sentry/reporter.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package sentry @@ -31,9 +31,9 @@ import ( "github.com/sirupsen/logrus" ) -var skippedFunctions = []string{} //nolint[gochecknoglobals] +var skippedFunctions = []string{} //nolint:gochecknoglobals -func init() { //nolint[noinit, gochecknoinits] +func init() { //nolint:gochecknoinits if err := sentry.Init(sentry.ClientOptions{ Dsn: constants.DSNSentry, Release: constants.Revision, diff --git a/internal/sentry/reporter_test.go b/internal/sentry/reporter_test.go index f99fdd14a..da38ff592 100644 --- a/internal/sentry/reporter_test.go +++ b/internal/sentry/reporter_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package sentry diff --git a/internal/serverutil/controller.go b/internal/serverutil/controller.go index aaa3e0baa..1f6b62256 100644 --- a/internal/serverutil/controller.go +++ b/internal/serverutil/controller.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package serverutil diff --git a/internal/serverutil/error_logger.go b/internal/serverutil/error_logger.go index eec156105..6bc142670 100644 --- a/internal/serverutil/error_logger.go +++ b/internal/serverutil/error_logger.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package serverutil diff --git a/internal/serverutil/listener.go b/internal/serverutil/listener.go index 8066dd138..848f8d8ce 100644 --- a/internal/serverutil/listener.go +++ b/internal/serverutil/listener.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package serverutil diff --git a/internal/serverutil/protocol.go b/internal/serverutil/protocol.go index b0fe0f232..c14d2f603 100644 --- a/internal/serverutil/protocol.go +++ b/internal/serverutil/protocol.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package serverutil diff --git a/internal/serverutil/server.go b/internal/serverutil/server.go index d4eb5a98f..2f5f4a1b4 100644 --- a/internal/serverutil/server.go +++ b/internal/serverutil/server.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package serverutil diff --git a/internal/serverutil/test/controller_test.go b/internal/serverutil/test/controller_test.go index f28fdc151..2b8a119b6 100644 --- a/internal/serverutil/test/controller_test.go +++ b/internal/serverutil/test/controller_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package test @@ -66,9 +66,9 @@ func TestControllerFailOnBusyPort(t *testing.T) { r, s, l, c := setup(t) ocupator := http.Server{Addr: s.Address()} - defer ocupator.Close() //nolint[errcheck] + defer ocupator.Close() //nolint:errcheck - go ocupator.ListenAndServe() //nolint[errcheck] + go ocupator.ListenAndServe() //nolint:errcheck r.Eventually(s.portIsOccupied, time.Second, 50*time.Millisecond) errorCh := l.ProvideChannel(events.ErrorEvent) diff --git a/internal/serverutil/test/server.go b/internal/serverutil/test/server.go index 12de3bfe3..6788c394c 100644 --- a/internal/serverutil/test/server.go +++ b/internal/serverutil/test/server.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package test diff --git a/internal/smtp/backend.go b/internal/smtp/backend.go index b39a19079..4f5cce7b9 100644 --- a/internal/smtp/backend.go +++ b/internal/smtp/backend.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package smtp @@ -54,7 +54,7 @@ func NewSMTPBackend( eventListener listener.Listener, settings settingsProvider, bridge *bridge.Bridge, -) *smtpBackend { //nolint[golint] +) *smtpBackend { //nolint:revive return newSMTPBackend(panicHandler, eventListener, settings, newBridgeWrap(bridge)) } diff --git a/internal/smtp/bridge.go b/internal/smtp/bridge.go index 165b0105c..a5cc2c8ad 100644 --- a/internal/smtp/bridge.go +++ b/internal/smtp/bridge.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package smtp @@ -52,7 +52,7 @@ func (b *bridgeWrap) GetUser(query string) (bridgeUser, error) { if err != nil { return nil, err } - return newBridgeUserWrap(user), nil //nolint[typecheck] missing methods are inherited + return newBridgeUserWrap(user), nil //nolint:typecheck missing methods are inherited } type bridgeUserWrap struct { diff --git a/internal/smtp/dump_default.go b/internal/smtp/dump_default.go index b2535ad5c..8452bf943 100644 --- a/internal/smtp/dump_default.go +++ b/internal/smtp/dump_default.go @@ -1,20 +1,21 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . +//go:build !build_qa // +build !build_qa package smtp diff --git a/internal/smtp/dump_qa.go b/internal/smtp/dump_qa.go index 0adfee046..edf33607f 100644 --- a/internal/smtp/dump_qa.go +++ b/internal/smtp/dump_qa.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // +build build_qa diff --git a/internal/smtp/keys_test.go b/internal/smtp/keys_test.go index a51c020ca..1bff99a85 100644 --- a/internal/smtp/keys_test.go +++ b/internal/smtp/keys_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package smtp diff --git a/internal/smtp/preferences.go b/internal/smtp/preferences.go index 75c63b37e..6e891e5e7 100644 --- a/internal/smtp/preferences.go +++ b/internal/smtp/preferences.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package smtp @@ -166,7 +166,7 @@ func (b *sendPreferencesBuilder) withPublicKey(v *crypto.KeyRing) { // { // encrypt: true | false, // sign: true | false, -// pgpScheme: 1 (ProtonMail custom scheme) +// pgpScheme: 1 (protonmail custom scheme) // | 2 (Protonmail scheme for encrypted-to-outside email) // | 4 (no cryptographic scheme) // | 8 (PGP/INLINE) diff --git a/internal/smtp/preferences_test.go b/internal/smtp/preferences_test.go index 5a184de93..ef94994c3 100644 --- a/internal/smtp/preferences_test.go +++ b/internal/smtp/preferences_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package smtp @@ -30,7 +30,7 @@ func TestPreferencesBuilder(t *testing.T) { testContactKey := loadContactKey(t, testPublicKey) testOtherContactKey := loadContactKey(t, testOtherPublicKey) - tests := []struct { // nolint[maligned] + tests := []struct { //nolint:maligned name string contactMeta *ContactMetadata diff --git a/internal/smtp/repro_test.go b/internal/smtp/repro_test.go index 48ffa6395..796f0a205 100644 --- a/internal/smtp/repro_test.go +++ b/internal/smtp/repro_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package smtp diff --git a/internal/smtp/send_recorder.go b/internal/smtp/send_recorder.go index c273d4320..e6de045d6 100644 --- a/internal/smtp/send_recorder.go +++ b/internal/smtp/send_recorder.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package smtp diff --git a/internal/smtp/send_recorder_test.go b/internal/smtp/send_recorder_test.go index 07d76d157..5a214ded2 100644 --- a/internal/smtp/send_recorder_test.go +++ b/internal/smtp/send_recorder_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package smtp diff --git a/internal/smtp/server.go b/internal/smtp/server.go index a1a8cbd01..b4115a2d2 100644 --- a/internal/smtp/server.go +++ b/internal/smtp/server.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package smtp diff --git a/internal/smtp/smtp.go b/internal/smtp/smtp.go index 87073b45c..443ef3470 100644 --- a/internal/smtp/smtp.go +++ b/internal/smtp/smtp.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package smtp provides SMTP server of the Bridge. package smtp @@ -21,5 +21,5 @@ package smtp import "github.com/sirupsen/logrus" var ( - log = logrus.WithField("pkg", "smtp") //nolint[gochecknoglobals] + log = logrus.WithField("pkg", "smtp") //nolint:gochecknoglobals ) diff --git a/internal/smtp/store.go b/internal/smtp/store.go index 1866dc91a..81d6eb39a 100644 --- a/internal/smtp/store.go +++ b/internal/smtp/store.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package smtp diff --git a/internal/smtp/user.go b/internal/smtp/user.go index bef3e4487..e59a2f629 100644 --- a/internal/smtp/user.go +++ b/internal/smtp/user.go @@ -1,21 +1,22 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . -// NOTE: Comments in this file refer to a specification in a document called "ProtonMail Encryption logic". It will be referred to via abbreviation PMEL. +// NOTE: Comments in this file refer to a specification in a document called +// "Proton Mail Encryption logic". It will be referred to via abbreviation PMEL. package smtp @@ -211,7 +212,7 @@ func (su *smtpUser) Data(r io.Reader) error { } // Send sends an email from the given address to the given addresses with the given body. -func (su *smtpUser) Send(returnPath string, to []string, messageReader io.Reader) (err error) { //nolint[funlen] +func (su *smtpUser) Send(returnPath string, to []string, messageReader io.Reader) (err error) { //nolint:funlen,gocyclo // Called from go-smtp in goroutines - we need to handle panics for each function. defer su.panicHandler.HandlePanic() diff --git a/internal/smtp/utils.go b/internal/smtp/utils.go index 20b3d885f..808478975 100644 --- a/internal/smtp/utils.go +++ b/internal/smtp/utils.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package smtp diff --git a/internal/smtp/vcard_tools.go b/internal/smtp/vcard_tools.go index a11280954..cc4afd789 100644 --- a/internal/smtp/vcard_tools.go +++ b/internal/smtp/vcard_tools.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package smtp diff --git a/internal/store/address.go b/internal/store/address.go index 0783c7364..4a492873d 100644 --- a/internal/store/address.go +++ b/internal/store/address.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/address_mailbox.go b/internal/store/address_mailbox.go index 41c6dbb82..ffd62c7e9 100644 --- a/internal/store/address_mailbox.go +++ b/internal/store/address_mailbox.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/address_message.go b/internal/store/address_message.go index f32e00299..0cdbf1583 100644 --- a/internal/store/address_message.go +++ b/internal/store/address_message.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/cache.go b/internal/store/cache.go index baa08cd8c..fd18d4663 100644 --- a/internal/store/cache.go +++ b/internal/store/cache.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store @@ -103,7 +103,7 @@ func (store *Store) clearCachePassphrase() error { // // Default buildAndCacheJobs vaule is 16, it can be changed by SetBuildAndCacheJobLimit. var ( - buildAndCacheJobs = make(chan struct{}, 16) //nolint[gochecknoglobals] + buildAndCacheJobs = make(chan struct{}, 16) //nolint:gochecknoglobals ) func SetBuildAndCacheJobLimit(maxJobs int) { diff --git a/internal/store/cache/cache_test.go b/internal/store/cache/cache_test.go index 70eb98e85..18054d9aa 100644 --- a/internal/store/cache/cache_test.go +++ b/internal/store/cache/cache_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cache diff --git a/internal/store/cache/compressor.go b/internal/store/cache/compressor.go index f09579e14..9a52902cd 100644 --- a/internal/store/cache/compressor.go +++ b/internal/store/cache/compressor.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cache diff --git a/internal/store/cache/compressor_gzip.go b/internal/store/cache/compressor_gzip.go index 1447b410b..68acde080 100644 --- a/internal/store/cache/compressor_gzip.go +++ b/internal/store/cache/compressor_gzip.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cache diff --git a/internal/store/cache/disk.go b/internal/store/cache/disk.go index fd8da0821..246857c8d 100644 --- a/internal/store/cache/disk.go +++ b/internal/store/cache/disk.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cache @@ -64,8 +64,8 @@ func NewOnDiskCache(path string, cmp Compressor, opts Options) (Cache, error) { file, err := ioutil.TempFile(path, "tmp") defer func() { - file.Close() //nolint[errcheck] - os.Remove(file.Name()) //nolint[errcheck] + file.Close() //nolint:errcheck,gosec + os.Remove(file.Name()) //nolint:errcheck,gosec }() if err != nil { return nil, fmt.Errorf("cannot open test write target: %w", err) diff --git a/internal/store/cache/hash.go b/internal/store/cache/hash.go index ebaf977bd..1c3454b1f 100644 --- a/internal/store/cache/hash.go +++ b/internal/store/cache/hash.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cache diff --git a/internal/store/cache/memory.go b/internal/store/cache/memory.go index 182d32c24..f2e2ee52e 100644 --- a/internal/store/cache/memory.go +++ b/internal/store/cache/memory.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cache diff --git a/internal/store/cache/options.go b/internal/store/cache/options.go index c9a746885..26b256640 100644 --- a/internal/store/cache/options.go +++ b/internal/store/cache/options.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cache diff --git a/internal/store/cache/pending.go b/internal/store/cache/pending.go index 0f184b2f4..6fd0dd699 100644 --- a/internal/store/cache/pending.go +++ b/internal/store/cache/pending.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cache diff --git a/internal/store/cache/pending_test.go b/internal/store/cache/pending_test.go index 46d4a6132..b58e14e74 100644 --- a/internal/store/cache/pending_test.go +++ b/internal/store/cache/pending_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cache diff --git a/internal/store/cache/types.go b/internal/store/cache/types.go index 4e80e64e1..dd83a191e 100644 --- a/internal/store/cache/types.go +++ b/internal/store/cache/types.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package cache diff --git a/internal/store/cache_test.go b/internal/store/cache_test.go index 5eaace2a6..c25f4cee9 100644 --- a/internal/store/cache_test.go +++ b/internal/store/cache_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/cache_watcher.go b/internal/store/cache_watcher.go index 559471f86..10faa8444 100644 --- a/internal/store/cache_watcher.go +++ b/internal/store/cache_watcher.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/cache_worker.go b/internal/store/cache_worker.go index 7c92fb402..01b5b0c7a 100644 --- a/internal/store/cache_worker.go +++ b/internal/store/cache_worker.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/cache_worker_test.go b/internal/store/cache_worker_test.go index 4bcbddd6c..73030d7e9 100644 --- a/internal/store/cache_worker_test.go +++ b/internal/store/cache_worker_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/change.go b/internal/store/change.go index 8a22b8e01..8f7facd71 100644 --- a/internal/store/change.go +++ b/internal/store/change.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/change_test.go b/internal/store/change_test.go index c9fcb7082..3d543a74d 100644 --- a/internal/store/change_test.go +++ b/internal/store/change_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/convert.go b/internal/store/convert.go index 69bf6db21..abc8933fd 100644 --- a/internal/store/convert.go +++ b/internal/store/convert.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/cooldown.go b/internal/store/cooldown.go index 4c0745b31..2f7dd51aa 100644 --- a/internal/store/cooldown.go +++ b/internal/store/cooldown.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/cooldown_test.go b/internal/store/cooldown_test.go index eb96090da..bbb87a726 100644 --- a/internal/store/cooldown_test.go +++ b/internal/store/cooldown_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/event_loop.go b/internal/store/event_loop.go index 573b85d77..2db07898a 100644 --- a/internal/store/event_loop.go +++ b/internal/store/event_loop.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store @@ -162,7 +162,7 @@ func (loop *eventLoop) loop() { return case <-t.C: // Randomise periodic calls within range pollInterval ± pollSpread to reduces potential load spikes on API. - //nolint[gosec] It is OK to use weaker random number generator here + //nolint:gosec // It is OK to use weaker random number generator here time.Sleep(time.Duration(rand.Intn(2*int(pollIntervalSpread.Milliseconds()))) * time.Millisecond) case eventProcessedCh = <-loop.pollCh: // We don't want to wait here. Polling should happen instantly. @@ -214,7 +214,7 @@ func (loop *eventLoop) isBeforeFirstStart() bool { // processNextEvent saves only successfully processed `eventID` into cache // (disk). It will filter out in defer all errors except invalid token error. // Invalid error will be returned and stop the event loop. -func (loop *eventLoop) processNextEvent() (more bool, err error) { // nolint[funlen] +func (loop *eventLoop) processNextEvent() (more bool, err error) { //nolint:funlen l := loop.log. WithField("currentEventID", loop.currentEventID). WithField("pollCounter", loop.pollCounter) @@ -440,7 +440,7 @@ func (loop *eventLoop) processLabels(eventLog *logrus.Entry, labels []*pmapi.Eve return nil } -func (loop *eventLoop) processMessages(eventLog *logrus.Entry, messages []*pmapi.EventMessage) (err error) { // nolint[funlen] +func (loop *eventLoop) processMessages(eventLog *logrus.Entry, messages []*pmapi.EventMessage) (err error) { //nolint:funlen eventLog.Debug("Processing message change event") for _, message := range messages { @@ -541,7 +541,7 @@ func (loop *eventLoop) removeLabelFromMessageWait(labelIDs []string) { } } -func updateMessage(msgLog *logrus.Entry, message *pmapi.Message, updates *pmapi.EventMessageUpdated) { //nolint[funlen] +func updateMessage(msgLog *logrus.Entry, message *pmapi.Message, updates *pmapi.EventMessageUpdated) { //nolint:funlen msgLog.Debug("Updating message") message.Time = updates.Time diff --git a/internal/store/event_loop_test.go b/internal/store/event_loop_test.go index e9d477ac1..281c136a4 100644 --- a/internal/store/event_loop_test.go +++ b/internal/store/event_loop_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/events.go b/internal/store/events.go index ca5b7c333..3748f9ce7 100644 --- a/internal/store/events.go +++ b/internal/store/events.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store @@ -80,7 +80,7 @@ func (c *Events) loadEvents() error { if err != nil { return err } - defer f.Close() //nolint[errcheck] + defer f.Close() //nolint:errcheck,gosec return json.NewDecoder(f).Decode(&c.eventMap) } @@ -94,7 +94,7 @@ func (c *Events) saveEvents() error { if err != nil { return err } - defer f.Close() //nolint[errcheck] + defer f.Close() //nolint:errcheck,gosec return json.NewEncoder(f).Encode(c.eventMap) } diff --git a/internal/store/mailbox.go b/internal/store/mailbox.go index 5182a72da..1929b026d 100644 --- a/internal/store/mailbox.go +++ b/internal/store/mailbox.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store @@ -74,7 +74,7 @@ func txNewMailbox(tx *bolt.Tx, storeAddress *Address, labelID, labelPrefix, labe return mb, err } -func syncDraftsIfNecssary(tx *bolt.Tx, mb *Mailbox) { //nolint[funlen] +func syncDraftsIfNecssary(tx *bolt.Tx, mb *Mailbox) { //nolint:funlen // We didn't support drafts before v1.2.6 and therefore if we now created // Drafts mailbox we need to check whether counts match (drafts are synced). // If not, sync them from local metadata without need to do full resync, @@ -231,7 +231,7 @@ func (storeMailbox *Mailbox) GetDelimiter() string { // deleteMailboxEvent deletes the mailbox bucket. // This is called from the event loop. func (storeMailbox *Mailbox) deleteMailboxEvent() error { - if !storeMailbox.isDeleting.Load().(bool) { + if !storeMailbox.isDeleting.Load().(bool) { //nolint:forcetypeassert // Deleting label removes bucket. Any ongoing connection selected // in such mailbox then might panic because of non-existing bucket. // Closing connetions prevents that panic but if the connection diff --git a/internal/store/mailbox_counts.go b/internal/store/mailbox_counts.go index 367fac23f..668f6a668 100644 --- a/internal/store/mailbox_counts.go +++ b/internal/store/mailbox_counts.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/mailbox_counts_test.go b/internal/store/mailbox_counts_test.go index 4e3e5d884..159b2d91c 100644 --- a/internal/store/mailbox_counts_test.go +++ b/internal/store/mailbox_counts_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/mailbox_ids.go b/internal/store/mailbox_ids.go index 30b33171a..466a4b4c8 100644 --- a/internal/store/mailbox_ids.go +++ b/internal/store/mailbox_ids.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/mailbox_ids_test.go b/internal/store/mailbox_ids_test.go index 3d5780dbb..221371f82 100644 --- a/internal/store/mailbox_ids_test.go +++ b/internal/store/mailbox_ids_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store @@ -76,7 +76,7 @@ func checkMailboxMessageIDs(t *testing.T, m *mocksForStore, mailboxLabel string, } } -func TestGetUIDByHeader(t *testing.T) { //nolint[funlen] +func TestGetUIDByHeader(t *testing.T) { //nolint:funlen m, clear := initMocks(t) defer clear() diff --git a/internal/store/mailbox_message.go b/internal/store/mailbox_message.go index f8fc60a78..dc3fcf66e 100644 --- a/internal/store/mailbox_message.go +++ b/internal/store/mailbox_message.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store @@ -348,7 +348,7 @@ func (storeMailbox *Mailbox) txSkipAndRemoveFromMailbox(tx *bolt.Tx, msg *pmapi. } // txCreateOrUpdateMessages will delete, create or update message from mailbox. -func (storeMailbox *Mailbox) txCreateOrUpdateMessages(tx *bolt.Tx, msgs []*pmapi.Message) error { //nolint[funlen] +func (storeMailbox *Mailbox) txCreateOrUpdateMessages(tx *bolt.Tx, msgs []*pmapi.Message) error { //nolint:funlen shouldSendMailboxUpdate := false // Buckets are not initialized right away because it's a heavy operation. diff --git a/internal/store/main_test.go b/internal/store/main_test.go index f8bbb2aa3..e3acd34e8 100644 --- a/internal/store/main_test.go +++ b/internal/store/main_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store @@ -23,7 +23,7 @@ import ( "github.com/sirupsen/logrus" ) -func init() { //nolint[gochecknoinits] +func init() { //nolint:gochecknoinits logrus.SetLevel(logrus.ErrorLevel) switch os.Getenv("VERBOSITY") { case "trace": diff --git a/internal/store/message.go b/internal/store/message.go index b054a243b..be2fff795 100644 --- a/internal/store/message.go +++ b/internal/store/message.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/store.go b/internal/store/store.go index f6527196a..3c3280bfb 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package store communicates with API and caches metadata in a local database. package store @@ -51,7 +51,7 @@ const ( ) var ( - log = logrus.WithField("pkg", "store") //nolint[gochecknoglobals] + log = logrus.WithField("pkg", "store") //nolint:gochecknoglobals // Database structure: // * metadata @@ -84,27 +84,27 @@ var ( // * {messageID} -> uint32 imapUID // * deleted_ids (can be missing or have no keys) // * {messageID} -> true - metadataBucket = []byte("metadata") //nolint[gochecknoglobals] - headersBucket = []byte("headers") //nolint[gochecknoglobals] - bodystructureBucket = []byte("bodystructure") //nolint[gochecknoglobals] - sizeBucket = []byte("size") //nolint[gochecknoglobals] - countsBucket = []byte("counts") //nolint[gochecknoglobals] - addressInfoBucket = []byte("address_info") //nolint[gochecknoglobals] - addressModeBucket = []byte("address_mode") //nolint[gochecknoglobals] - cachePassphraseBucket = []byte("cache_passphrase") //nolint[gochecknoglobals] - syncStateBucket = []byte("sync_state") //nolint[gochecknoglobals] - mailboxesBucket = []byte("mailboxes") //nolint[gochecknoglobals] - imapIDsBucket = []byte("imap_ids") //nolint[gochecknoglobals] - apiIDsBucket = []byte("api_ids") //nolint[gochecknoglobals] - deletedIDsBucket = []byte("deleted_ids") //nolint[gochecknoglobals] - mboxVersionBucket = []byte("mailboxes_version") //nolint[gochecknoglobals] + metadataBucket = []byte("metadata") //nolint:gochecknoglobals + headersBucket = []byte("headers") //nolint:gochecknoglobals + bodystructureBucket = []byte("bodystructure") //nolint:gochecknoglobals + sizeBucket = []byte("size") //nolint:gochecknoglobals + countsBucket = []byte("counts") //nolint:gochecknoglobals + addressInfoBucket = []byte("address_info") //nolint:gochecknoglobals + addressModeBucket = []byte("address_mode") //nolint:gochecknoglobals + cachePassphraseBucket = []byte("cache_passphrase") //nolint:gochecknoglobals + syncStateBucket = []byte("sync_state") //nolint:gochecknoglobals + mailboxesBucket = []byte("mailboxes") //nolint:gochecknoglobals + imapIDsBucket = []byte("imap_ids") //nolint:gochecknoglobals + apiIDsBucket = []byte("api_ids") //nolint:gochecknoglobals + deletedIDsBucket = []byte("deleted_ids") //nolint:gochecknoglobals + mboxVersionBucket = []byte("mailboxes_version") //nolint:gochecknoglobals // ErrNoSuchAPIID when mailbox does not have API ID. - ErrNoSuchAPIID = errors.New("no such api id") //nolint[gochecknoglobals] + ErrNoSuchAPIID = errors.New("no such api id") //nolint:gochecknoglobals // ErrNoSuchUID when mailbox does not have IMAP UID. - ErrNoSuchUID = errors.New("no such uid") //nolint[gochecknoglobals] + ErrNoSuchUID = errors.New("no such uid") //nolint:gochecknoglobals // ErrNoSuchSeqNum when mailbox does not have IMAP ID. - ErrNoSuchSeqNum = errors.New("no such sequence number") //nolint[gochecknoglobals] + ErrNoSuchSeqNum = errors.New("no such sequence number") //nolint:gochecknoglobals ) // exposeContextForIMAP should be replaced once with context passed @@ -146,7 +146,7 @@ type Store struct { } // New creates or opens a store for the given `user`. -func New( // nolint[funlen] +func New( //nolint:funlen sentryReporter *sentry.Reporter, panicHandler PanicHandler, user BridgeUser, diff --git a/internal/store/store_address_mode.go b/internal/store/store_address_mode.go index bd7662bb2..2d7a0b0f5 100644 --- a/internal/store/store_address_mode.go +++ b/internal/store/store_address_mode.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/store_structure_version.go b/internal/store/store_structure_version.go index 78d75cd36..689d5bea5 100644 --- a/internal/store/store_structure_version.go +++ b/internal/store/store_structure_version.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/store_test.go b/internal/store/store_test.go index e1fc003bd..1206ed781 100644 --- a/internal/store/store_test.go +++ b/internal/store/store_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store @@ -180,7 +180,7 @@ func initMocks(tb testing.TB) (*mocksForStore, func()) { } } -func (mocks *mocksForStore) newStoreNoEvents(t *testing.T, combinedMode bool, msgs ...*pmapi.Message) { //nolint[unparam] +func (mocks *mocksForStore) newStoreNoEvents(t *testing.T, combinedMode bool, msgs ...*pmapi.Message) { //nolint:unparam mocks.user.EXPECT().ID().Return("userID").AnyTimes() mocks.user.EXPECT().IsConnected().Return(true) mocks.user.EXPECT().IsCombinedAddressMode().Return(combinedMode) diff --git a/internal/store/store_test_exports.go b/internal/store/store_test_exports.go index eefe915bf..1ccd991c1 100644 --- a/internal/store/store_test_exports.go +++ b/internal/store/store_test_exports.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store @@ -57,7 +57,7 @@ func (store *Store) TestIsSyncRunning() bool { } // TestGetEventLoop returns the store's event loop. -func (store *Store) TestGetEventLoop() *eventLoop { //nolint[golint] +func (store *Store) TestGetEventLoop() *eventLoop { //nolint:revive return store.eventLoop } diff --git a/internal/store/sync.go b/internal/store/sync.go index 124de172b..16e06776c 100644 --- a/internal/store/sync.go +++ b/internal/store/sync.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store @@ -158,7 +158,7 @@ func getSplitIDAndCount(labelID string, api messageLister, page int) (string, in return messages[0].ID, total, nil } -func syncBatch( //nolint[funlen] +func syncBatch( //nolint:funlen labelID string, store storeSynchronizer, api messageLister, diff --git a/internal/store/sync_state.go b/internal/store/sync_state.go index 60e86fc7a..05de0e004 100644 --- a/internal/store/sync_state.go +++ b/internal/store/sync_state.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/sync_state_test.go b/internal/store/sync_state_test.go index bc5c2a7b0..f5180025c 100644 --- a/internal/store/sync_state_test.go +++ b/internal/store/sync_state_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/sync_test.go b/internal/store/sync_test.go index 0fff34665..814031310 100644 --- a/internal/store/sync_test.go +++ b/internal/store/sync_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store @@ -154,7 +154,7 @@ func generateIDsR(start, stop int) []string { // Tests -func TestSyncAllMail(t *testing.T) { //nolint[funlen] +func TestSyncAllMail(t *testing.T) { //nolint:funlen m, clear := initMocks(t) defer clear() @@ -269,7 +269,7 @@ func TestSyncAllMail_FailedCreateOrUpdateMessage(t *testing.T) { require.EqualError(t, err, "failed to sync group: failed to create or update messages: error") } -func TestFindIDRanges(t *testing.T) { //nolint[funlen] +func TestFindIDRanges(t *testing.T) { //nolint:funlen store := newSyncer() syncState := newTestSyncState(store) @@ -374,7 +374,7 @@ func TestFindIDRanges_FailedListing(t *testing.T) { require.EqualError(t, err, "failed to get first ID and count: failed to list messages: error") } -func TestGetSplitIDAndCount(t *testing.T) { //nolint[funlen] +func TestGetSplitIDAndCount(t *testing.T) { //nolint:funlen tests := []struct { name string err error @@ -520,7 +520,7 @@ func TestSyncBatch_FailedCreateOrUpdateMessage(t *testing.T) { require.EqualError(t, err, "failed to create or update messages: error") } -func testSyncBatch(t *testing.T, store storeSynchronizer, api messageLister, rangeIdx int, splitIDs ...string) error { //nolint[unparam] +func testSyncBatch(t *testing.T, store storeSynchronizer, api messageLister, rangeIdx int, splitIDs ...string) error { //nolint:unparam syncState := newTestSyncState(store, splitIDs...) idRange := syncState.idRanges[rangeIdx] shouldStop := 0 diff --git a/internal/store/types.go b/internal/store/types.go index 6b88b1e9d..868028459 100644 --- a/internal/store/types.go +++ b/internal/store/types.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/ulimit.go b/internal/store/ulimit.go index 668a1f309..3765773a8 100644 --- a/internal/store/ulimit.go +++ b/internal/store/ulimit.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store @@ -50,7 +50,7 @@ func isFdCloseToULimit() bool { } pid := fmt.Sprint(os.Getpid()) - out, err := exec.Command("lsof", "-p", pid).Output() //nolint[gosec] + out, err := exec.Command("lsof", "-p", pid).Output() //nolint:gosec if err != nil { log.Warn("isFdCloseToULimit: ", err) return false diff --git a/internal/store/user.go b/internal/store/user.go index 27ee40962..8c203480a 100644 --- a/internal/store/user.go +++ b/internal/store/user.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/user_address.go b/internal/store/user_address.go index de554f7d7..0b94da19d 100644 --- a/internal/store/user_address.go +++ b/internal/store/user_address.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/user_address_info.go b/internal/store/user_address_info.go index fa7db63f8..c3a36ae8d 100644 --- a/internal/store/user_address_info.go +++ b/internal/store/user_address_info.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/user_mailbox.go b/internal/store/user_mailbox.go index f3c16023b..ef8187ba3 100644 --- a/internal/store/user_mailbox.go +++ b/internal/store/user_mailbox.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/user_message.go b/internal/store/user_message.go index 75889d25e..717402c11 100644 --- a/internal/store/user_message.go +++ b/internal/store/user_message.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store @@ -241,7 +241,7 @@ func (store *Store) createOrUpdateMessageEvent(msg *pmapi.Message) error { // createOrUpdateMessagesEvent tries to create or update messages in database. // This function is optimised for insertion of many messages at once. // It calls createLabelsIfMissing if needed. -func (store *Store) createOrUpdateMessagesEvent(msgs []*pmapi.Message) error { //nolint[funlen] +func (store *Store) createOrUpdateMessagesEvent(msgs []*pmapi.Message) error { //nolint:funlen store.log.WithField("msgs", msgs).Trace("Creating or updating messages in the store") // Strip non meta first to reduce memory (no need to keep all old msg ID data during update). diff --git a/internal/store/user_message_test.go b/internal/store/user_message_test.go index 42e0e78f9..679fec231 100644 --- a/internal/store/user_message_test.go +++ b/internal/store/user_message_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store @@ -126,7 +126,7 @@ func TestDeleteMessage(t *testing.T) { checkMailboxMessageIDs(t, m, pmapi.AllMailLabel, []wantID{{"msg2", 2}}) } -func insertMessage(t *testing.T, m *mocksForStore, id, subject, sender string, unread bool, labelIDs []string) { //nolint[unparam] +func insertMessage(t *testing.T, m *mocksForStore, id, subject, sender string, unread bool, labelIDs []string) { //nolint:unparam require.Nil(t, m.store.createOrUpdateMessageEvent(getTestMessage(id, subject, sender, unread, labelIDs))) } diff --git a/internal/store/user_sync.go b/internal/store/user_sync.go index 6802b0565..0b0623bb0 100644 --- a/internal/store/user_sync.go +++ b/internal/store/user_sync.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/store/user_sync_test.go b/internal/store/user_sync_test.go index 6228b557e..ef10f64b6 100644 --- a/internal/store/user_sync_test.go +++ b/internal/store/user_sync_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package store diff --git a/internal/updater/channels.go b/internal/updater/channels.go index 8af312b97..5784c65a2 100644 --- a/internal/updater/channels.go +++ b/internal/updater/channels.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package updater @@ -30,4 +30,4 @@ const ( // DefaultUpdateChannel is the default update channel to subscribe to. // It is set to the stable channel by default, unless overridden at build time. -var DefaultUpdateChannel = StableChannel // nolint[gochecknoglobals] +var DefaultUpdateChannel = StableChannel //nolint:gochecknoglobals diff --git a/internal/updater/errors.go b/internal/updater/errors.go index 506635c19..7fd09bfb4 100644 --- a/internal/updater/errors.go +++ b/internal/updater/errors.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package updater diff --git a/internal/updater/host_default.go b/internal/updater/host_default.go index 86a53fd4e..8634f5373 100644 --- a/internal/updater/host_default.go +++ b/internal/updater/host_default.go @@ -1,20 +1,21 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . +//go:build !build_qa // +build !build_qa package updater diff --git a/internal/updater/host_qa.go b/internal/updater/host_qa.go index a369e2d0a..e6e9c09f7 100644 --- a/internal/updater/host_qa.go +++ b/internal/updater/host_qa.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // +build build_qa diff --git a/internal/updater/install_darwin.go b/internal/updater/install_darwin.go index bc9251e2b..a0c9d5945 100644 --- a/internal/updater/install_darwin.go +++ b/internal/updater/install_darwin.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package updater diff --git a/internal/updater/install_default.go b/internal/updater/install_default.go index 3f9be3d49..15f295623 100644 --- a/internal/updater/install_default.go +++ b/internal/updater/install_default.go @@ -1,20 +1,21 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . +//go:build !darwin // +build !darwin package updater diff --git a/internal/updater/key_default.go b/internal/updater/key_default.go index 6cac709dd..289153ed9 100644 --- a/internal/updater/key_default.go +++ b/internal/updater/key_default.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package updater diff --git a/internal/updater/locker.go b/internal/updater/locker.go index 96e33ec56..328de2e4e 100644 --- a/internal/updater/locker.go +++ b/internal/updater/locker.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package updater @@ -39,7 +39,7 @@ func newLocker() *locker { } func (l *locker) doOnce(fn func() error) error { - if l.ongoing.Load().(bool) { + if l.ongoing.Load().(bool) { //nolint:forcetypeassert return ErrOperationOngoing } diff --git a/internal/updater/locker_test.go b/internal/updater/locker_test.go index 795c79edb..e4151447b 100644 --- a/internal/updater/locker_test.go +++ b/internal/updater/locker_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package updater diff --git a/internal/updater/sync.go b/internal/updater/sync.go index 6ae228a2a..38b8e452e 100644 --- a/internal/updater/sync.go +++ b/internal/updater/sync.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package updater @@ -129,7 +129,7 @@ func checksum(path string) (hash string) { if err != nil { return } - defer file.Close() //nolint[errcheck] + defer file.Close() //nolint:errcheck,gosec hasher := sha256.New() if _, err := io.Copy(hasher, file); err != nil { @@ -141,7 +141,7 @@ func checksum(path string) (hash string) { // srcDir including app folder. // dstDir including app folder. -func copyRecursively(srcDir, dstDir string) error { // nolint[funlen] +func copyRecursively(srcDir, dstDir string) error { //nolint:funlen return filepath.Walk(srcDir, func(srcPath string, srcInfo os.FileInfo, err error) error { if err != nil { return err @@ -228,7 +228,7 @@ func copyRecursively(srcDir, dstDir string) error { // nolint[funlen] if err != nil { return err } - defer srcReader.Close() //nolint[errcheck] + defer srcReader.Close() //nolint:errcheck,gosec return copyToTmpFileRename(srcReader, dstPath, srcInfo.Mode()) }) } @@ -244,11 +244,11 @@ func copyToTmpFileRename(srcReader io.Reader, dstPath string, dstMode os.FileMod func copyToFileTruncate(srcReader io.Reader, dstPath string, dstMode os.FileMode) error { logrus.Debug("Copy and truncate ", dstPath) - dstWriter, err := os.OpenFile(filepath.Clean(dstPath), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, dstMode) //nolint[gosec] Cannot guess the safe part of path + dstWriter, err := os.OpenFile(filepath.Clean(dstPath), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, dstMode) //nolint:gosec // Cannot guess the safe part of path if err != nil { return err } - defer dstWriter.Close() //nolint[errcheck] + defer dstWriter.Close() //nolint:errcheck,gosec _, err = io.Copy(dstWriter, srcReader) return err } diff --git a/internal/updater/sync_test.go b/internal/updater/sync_test.go index 501842e1c..522cad92b 100644 --- a/internal/updater/sync_test.go +++ b/internal/updater/sync_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package updater @@ -106,7 +106,7 @@ func checkCopyWorks(srcType, dstType string) error { } func checkThatFilesAreSame(src, dst string) error { - cmd := exec.Command("diff", "-qr", src, dst) //nolint[gosec] + cmd := exec.Command("diff", "-qr", src, dst) //nolint:gosec cmd.Stderr = logrus.StandardLogger().WriterLevel(logrus.ErrorLevel) cmd.Stdout = logrus.StandardLogger().WriterLevel(logrus.InfoLevel) return cmd.Run() diff --git a/internal/updater/updater.go b/internal/updater/updater.go index 0a23e9e01..fe354753a 100644 --- a/internal/updater/updater.go +++ b/internal/updater/updater.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package updater diff --git a/internal/updater/updater_test.go b/internal/updater/updater_test.go index 2d194c9ed..ea2c91c28 100644 --- a/internal/updater/updater_test.go +++ b/internal/updater/updater_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package updater diff --git a/internal/updater/version.go b/internal/updater/version.go index d88e3bf1e..d057fca10 100644 --- a/internal/updater/version.go +++ b/internal/updater/version.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package updater diff --git a/internal/users/cache.go b/internal/users/cache.go index 01ece8fd9..2d9e56f05 100644 --- a/internal/users/cache.go +++ b/internal/users/cache.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package users @@ -230,8 +230,8 @@ func (u *Users) MigrateCache(srcPath, dstPath string) error { tmp, err := ioutil.TempFile(srcPath, "tmp") if err == nil { defer func() { - tmp.Close() //nolint[errcheck] - os.Remove(tmp.Name()) //nolint[errcheck] + tmp.Close() //nolint:errcheck,gosec + os.Remove(tmp.Name()) //nolint:errcheck,gosec }() if err := os.Rename(srcPath, dstPath); err == nil { diff --git a/internal/users/cache_test.go b/internal/users/cache_test.go index 2d5cf554f..fb4777eb7 100644 --- a/internal/users/cache_test.go +++ b/internal/users/cache_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package users diff --git a/internal/users/credentials/credentials.go b/internal/users/credentials/credentials.go index 162d8b970..30801ebe8 100644 --- a/internal/users/credentials/credentials.go +++ b/internal/users/credentials/credentials.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package credentials implements our struct stored in keychain. // Store struct is kind of like a database client. @@ -38,7 +38,7 @@ const ( ) var ( - log = logrus.WithField("pkg", "credentials") //nolint[gochecknoglobals] + log = logrus.WithField("pkg", "credentials") //nolint:gochecknoglobals ErrWrongFormat = errors.New("malformed credentials") ) diff --git a/internal/users/credentials/credentials_test.go b/internal/users/credentials/credentials_test.go index 50d26d038..fb8460b72 100644 --- a/internal/users/credentials/credentials_test.go +++ b/internal/users/credentials/credentials_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package credentials diff --git a/internal/users/credentials/pass.go b/internal/users/credentials/pass.go index dd8270584..782112847 100644 --- a/internal/users/credentials/pass.go +++ b/internal/users/credentials/pass.go @@ -1,20 +1,21 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . +//go:build !imaptest // +build !imaptest package credentials diff --git a/internal/users/credentials/pass_imaptest.go b/internal/users/credentials/pass_imaptest.go index fc3173a66..1a095311d 100644 --- a/internal/users/credentials/pass_imaptest.go +++ b/internal/users/credentials/pass_imaptest.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // +build imaptest diff --git a/internal/users/credentials/store.go b/internal/users/credentials/store.go index f32d12bfa..6e0fb9d43 100644 --- a/internal/users/credentials/store.go +++ b/internal/users/credentials/store.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package credentials @@ -28,7 +28,7 @@ import ( "github.com/sirupsen/logrus" ) -var storeLocker = sync.RWMutex{} //nolint[gochecknoglobals] +var storeLocker = sync.RWMutex{} //nolint:gochecknoglobals // Store is an encrypted credentials store. type Store struct { @@ -172,6 +172,7 @@ func (s *Store) List() (userIDs []string, err error) { continue } + // Disabled credentials if creds.Timestamp == 0 { continue } diff --git a/internal/users/credentials/store_test.go b/internal/users/credentials/store_test.go index 9bf7bd382..0bfdf6f64 100644 --- a/internal/users/credentials/store_test.go +++ b/internal/users/credentials/store_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package credentials @@ -56,7 +56,7 @@ type testCredentials struct { IsCombinedAddressMode bool } -func init() { //nolint[gochecknoinits] +func init() { //nolint:gochecknoinits gob.Register(testCredentials{}) } diff --git a/internal/users/types.go b/internal/users/types.go index d4fced1a0..489cac025 100644 --- a/internal/users/types.go +++ b/internal/users/types.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package users diff --git a/internal/users/user.go b/internal/users/user.go index ca893308b..f8c5e9149 100644 --- a/internal/users/user.go +++ b/internal/users/user.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package users @@ -106,7 +106,7 @@ func (u *User) connect(client pmapi.Client, creds *credentials.Credentials) erro } // Connected users have a store. - if err := u.loadStore(); err != nil { //nolint[revive] easier to read + if err := u.loadStore(); err != nil { //nolint:revive easier to read return err } diff --git a/internal/users/user_credentials_test.go b/internal/users/user_credentials_test.go index bd7b8a741..8fe8c7d03 100644 --- a/internal/users/user_credentials_test.go +++ b/internal/users/user_credentials_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package users diff --git a/internal/users/user_new_test.go b/internal/users/user_new_test.go index 5ca56f656..d1921bbce 100644 --- a/internal/users/user_new_test.go +++ b/internal/users/user_new_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package users diff --git a/internal/users/user_store_test.go b/internal/users/user_store_test.go index 907c4f37f..50cc68be3 100644 --- a/internal/users/user_store_test.go +++ b/internal/users/user_store_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package users @@ -23,7 +23,7 @@ import ( r "github.com/stretchr/testify/require" ) -func _TestNeverLongStorePath(t *testing.T) { // nolint[unused] +func _TestNeverLongStorePath(t *testing.T) { //nolint:unused,deadcode r.Fail(t, "not implemented") } diff --git a/internal/users/user_test.go b/internal/users/user_test.go index 353f5c433..c90016f26 100644 --- a/internal/users/user_test.go +++ b/internal/users/user_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package users diff --git a/internal/users/users.go b/internal/users/users.go index c044bc4fe..0b6285edc 100644 --- a/internal/users/users.go +++ b/internal/users/users.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package users provides core business logic providing API over credentials store and PM API. package users @@ -36,8 +36,8 @@ import ( ) var ( - log = logrus.WithField("pkg", "users") //nolint[gochecknoglobals] - isApplicationOutdated = false //nolint[gochecknoglobals] + log = logrus.WithField("pkg", "users") //nolint:gochecknoglobals + isApplicationOutdated = false //nolint:gochecknoglobals // ErrWrongMailboxPassword is returned when login password is OK but // not the mailbox one. @@ -215,7 +215,7 @@ func (u *Users) Login(username string, password []byte) (authClient pmapi.Client } // FinishLogin finishes the login procedure and adds the user into the credentials store. -func (u *Users) FinishLogin(client pmapi.Client, auth *pmapi.Auth, password []byte) (user *User, err error) { //nolint[funlen] +func (u *Users) FinishLogin(client pmapi.Client, auth *pmapi.Auth, password []byte) (user *User, err error) { //nolint:funlen apiUser, passphrase, err := getAPIUser(context.Background(), client, password) if err != nil { return nil, err diff --git a/internal/users/users_clear_test.go b/internal/users/users_clear_test.go index 850789a28..b15cf4455 100644 --- a/internal/users/users_clear_test.go +++ b/internal/users/users_clear_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package users diff --git a/internal/users/users_delete_test.go b/internal/users/users_delete_test.go index 9e3def54f..17a28c3ee 100644 --- a/internal/users/users_delete_test.go +++ b/internal/users/users_delete_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package users diff --git a/internal/users/users_get_test.go b/internal/users/users_get_test.go index ebd71c314..21746c8ff 100644 --- a/internal/users/users_get_test.go +++ b/internal/users/users_get_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package users diff --git a/internal/users/users_login_test.go b/internal/users/users_login_test.go index ea4d701a7..0f2bec60b 100644 --- a/internal/users/users_login_test.go +++ b/internal/users/users_login_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package users diff --git a/internal/users/users_new_test.go b/internal/users/users_new_test.go index 21a346273..b8462a887 100644 --- a/internal/users/users_new_test.go +++ b/internal/users/users_new_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package users diff --git a/internal/users/users_test.go b/internal/users/users_test.go index 98e8efbcc..a8315faec 100644 --- a/internal/users/users_test.go +++ b/internal/users/users_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package users @@ -54,7 +54,7 @@ func TestMain(m *testing.M) { } var ( - testAuthRefresh = &pmapi.Auth{ //nolint[gochecknoglobals] + testAuthRefresh = &pmapi.Auth{ //nolint:gochecknoglobals UserID: "user", AuthRefresh: pmapi.AuthRefresh{ UID: "uid", @@ -63,7 +63,7 @@ var ( }, } - testCredentials = &credentials.Credentials{ //nolint[gochecknoglobals] + testCredentials = &credentials.Credentials{ //nolint:gochecknoglobals UserID: "user", Name: "username", Emails: "user@pm.me", @@ -76,7 +76,7 @@ var ( IsCombinedAddressMode: true, } - testCredentialsSplit = &credentials.Credentials{ //nolint[gochecknoglobals] + testCredentialsSplit = &credentials.Credentials{ //nolint:gochecknoglobals UserID: "users", Name: "usersname", Emails: "users@pm.me;anotheruser@pm.me;alsouser@pm.me", @@ -89,7 +89,7 @@ var ( IsCombinedAddressMode: false, } - testCredentialsDisconnected = &credentials.Credentials{ //nolint[gochecknoglobals] + testCredentialsDisconnected = &credentials.Credentials{ //nolint:gochecknoglobals UserID: "userDisconnected", Name: "username", Emails: "user@pm.me", @@ -102,7 +102,7 @@ var ( IsCombinedAddressMode: true, } - testCredentialsSplitDisconnected = &credentials.Credentials{ //nolint[gochecknoglobals] + testCredentialsSplitDisconnected = &credentials.Credentials{ //nolint:gochecknoglobals UserID: "usersDisconnected", Name: "usersname", Emails: "users@pm.me;anotheruser@pm.me;alsouser@pm.me", @@ -118,32 +118,26 @@ var ( usedSpace = int64(1048576) maxSpace = int64(10485760) - testPMAPIUser = &pmapi.User{ //nolint[gochecknoglobals] + testPMAPIUser = &pmapi.User{ //nolint:gochecknoglobals ID: "user", Name: "username", UsedSpace: &usedSpace, MaxSpace: &maxSpace, } - testPMAPIUserDisconnected = &pmapi.User{ //nolint[gochecknoglobals] + testPMAPIUserDisconnected = &pmapi.User{ //nolint:gochecknoglobals ID: "userDisconnected", Name: "username", } - testPMAPIAddress = &pmapi.Address{ //nolint[gochecknoglobals] + testPMAPIAddress = &pmapi.Address{ //nolint:gochecknoglobals ID: "testAddressID", Type: pmapi.OriginalAddress, Email: "user@pm.me", Receive: true, } - testPMAPIAddresses = []*pmapi.Address{ //nolint[gochecknoglobals] - {ID: "usersAddress1ID", Email: "users@pm.me", Receive: true, Type: pmapi.OriginalAddress}, - {ID: "usersAddress2ID", Email: "anotheruser@pm.me", Receive: true, Type: pmapi.AliasAddress}, - {ID: "usersAddress3ID", Email: "alsouser@pm.me", Receive: true, Type: pmapi.AliasAddress}, - } - - testPMAPIEvent = &pmapi.Event{ // nolint[gochecknoglobals] + testPMAPIEvent = &pmapi.Event{ // nolint:gochecknoglobals EventID: "ACXDmTaBub14w==", } ) @@ -242,7 +236,7 @@ func testNewUsersWithUsers(t *testing.T, m mocks) *Users { return testNewUsers(t, m) } -func testNewUsers(t *testing.T, m mocks) *Users { //nolint[unparam] +func testNewUsers(t *testing.T, m mocks) *Users { //nolint:unparam m.eventListener.EXPECT().ProvideChannel(events.UpgradeApplicationEvent) m.eventListener.EXPECT().ProvideChannel(events.InternetConnChangedEvent) diff --git a/internal/versioner/install.go b/internal/versioner/install.go index 174d7581c..078a81329 100644 --- a/internal/versioner/install.go +++ b/internal/versioner/install.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package versioner diff --git a/internal/versioner/name_default.go b/internal/versioner/name_default.go index 8fa212263..f7a4c2629 100644 --- a/internal/versioner/name_default.go +++ b/internal/versioner/name_default.go @@ -1,20 +1,21 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . +//go:build !windows // +build !windows package versioner diff --git a/internal/versioner/name_windows.go b/internal/versioner/name_windows.go index 885bd8965..d553a703a 100644 --- a/internal/versioner/name_windows.go +++ b/internal/versioner/name_windows.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package versioner diff --git a/internal/versioner/remove.go b/internal/versioner/remove.go index da8255359..d32fd51d7 100644 --- a/internal/versioner/remove.go +++ b/internal/versioner/remove.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build !darwin // +build !darwin diff --git a/internal/versioner/remove_darwin.go b/internal/versioner/remove_darwin.go index 1a14033ce..484b6c09d 100644 --- a/internal/versioner/remove_darwin.go +++ b/internal/versioner/remove_darwin.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build darwin // +build darwin diff --git a/internal/versioner/remove_linux.go b/internal/versioner/remove_linux.go index 91192d743..6403991ae 100644 --- a/internal/versioner/remove_linux.go +++ b/internal/versioner/remove_linux.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build linux // +build linux diff --git a/internal/versioner/remove_windows.go b/internal/versioner/remove_windows.go index ad1ce8810..9d6d9c9a0 100644 --- a/internal/versioner/remove_windows.go +++ b/internal/versioner/remove_windows.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . //go:build windows // +build windows diff --git a/internal/versioner/util.go b/internal/versioner/util.go index bd92fa2a5..b861f9850 100644 --- a/internal/versioner/util.go +++ b/internal/versioner/util.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package versioner diff --git a/internal/versioner/version.go b/internal/versioner/version.go index 9ac9267fe..105a9e122 100644 --- a/internal/versioner/version.go +++ b/internal/versioner/version.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package versioner @@ -65,12 +65,12 @@ func (v *Version) SemVer() *semver.Version { // VerifyFiles verifies all files in the version directory. func (v *Version) VerifyFiles(kr *crypto.KeyRing) error { - fileBytes, err := ioutil.ReadFile(filepath.Join(v.path, sumFile)) // nolint[gosec] + fileBytes, err := ioutil.ReadFile(filepath.Join(v.path, sumFile)) //nolint:gosec if err != nil { return err } - sigBytes, err := ioutil.ReadFile(filepath.Join(v.path, sumFile+".sig")) // nolint[gosec] + sigBytes, err := ioutil.ReadFile(filepath.Join(v.path, sumFile+".sig")) //nolint:gosec if err != nil { return err } diff --git a/internal/versioner/version_test.go b/internal/versioner/version_test.go index d2e0deddb..cdc4f3889 100644 --- a/internal/versioner/version_test.go +++ b/internal/versioner/version_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package versioner diff --git a/internal/versioner/versioner.go b/internal/versioner/versioner.go index 33f4c5534..568d23da9 100644 --- a/internal/versioner/versioner.go +++ b/internal/versioner/versioner.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package versioner diff --git a/internal/versioner/versioner_remove_test.go b/internal/versioner/versioner_remove_test.go index a6a89dce7..0c3a47f0f 100644 --- a/internal/versioner/versioner_remove_test.go +++ b/internal/versioner/versioner_remove_test.go @@ -1,20 +1,21 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . +//go:build !darwin // +build !darwin package versioner diff --git a/internal/versioner/versioner_test.go b/internal/versioner/versioner_test.go index 4b83a6437..0654d2788 100644 --- a/internal/versioner/versioner_test.go +++ b/internal/versioner/versioner_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package versioner diff --git a/pkg/algo/algo.go b/pkg/algo/algo.go index 68b3d7c71..399c170a4 100644 --- a/pkg/algo/algo.go +++ b/pkg/algo/algo.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package algo provides some algorithm utils. package algo diff --git a/pkg/algo/sets.go b/pkg/algo/sets.go index d08425606..6fc717c1d 100644 --- a/pkg/algo/sets.go +++ b/pkg/algo/sets.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package algo diff --git a/pkg/algo/sets_test.go b/pkg/algo/sets_test.go index bdb271833..c8bc90504 100644 --- a/pkg/algo/sets_test.go +++ b/pkg/algo/sets_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package algo @@ -29,7 +29,7 @@ type T struct { func TestSetIntersection(t *testing.T) { keysAreEqual := func(a, b interface{}) bool { - return a.(T).k == b.(T).k + return a.(T).k == b.(T).k //nolint:forcetypeassert } type args struct { diff --git a/pkg/confirmer/confirmer.go b/pkg/confirmer/confirmer.go index 625ccd4a3..31b1d0e4a 100644 --- a/pkg/confirmer/confirmer.go +++ b/pkg/confirmer/confirmer.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package confirmer diff --git a/pkg/confirmer/confirmer_test.go b/pkg/confirmer/confirmer_test.go index d449b24f9..8e13b70b8 100644 --- a/pkg/confirmer/confirmer_test.go +++ b/pkg/confirmer/confirmer_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package confirmer diff --git a/pkg/confirmer/request.go b/pkg/confirmer/request.go index 254282943..dc3e4af11 100644 --- a/pkg/confirmer/request.go +++ b/pkg/confirmer/request.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package confirmer diff --git a/pkg/dialer/dial_client.go b/pkg/dialer/dial_client.go index 8183cedfd..2e92c7ee7 100644 --- a/pkg/dialer/dial_client.go +++ b/pkg/dialer/dial_client.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package dialer diff --git a/pkg/files/removal.go b/pkg/files/removal.go index 9cb77a634..840940f42 100644 --- a/pkg/files/removal.go +++ b/pkg/files/removal.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package files provides standard filesystem operations. package files diff --git a/pkg/files/removal_test.go b/pkg/files/removal_test.go index 2d871de72..8f9f8da1f 100644 --- a/pkg/files/removal_test.go +++ b/pkg/files/removal_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package files diff --git a/pkg/keychain/helper_darwin.go b/pkg/keychain/helper_darwin.go index 013156472..fdd6ab0e1 100644 --- a/pkg/keychain/helper_darwin.go +++ b/pkg/keychain/helper_darwin.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package keychain @@ -24,13 +24,14 @@ import ( "github.com/docker/docker-credential-helpers/credentials" "github.com/keybase/go-keychain" + "github.com/sirupsen/logrus" ) const ( MacOSKeychain = "macos-keychain" ) -func init() { // nolint[noinit] +func init() { //nolint:gochecknoinits Helpers = make(map[string]helperConstructor) // MacOS always provides a keychain. @@ -106,12 +107,15 @@ func (h *macOSHelper) Get(secretURL string) (string, string, error) { return "", "", err } + l := logrus.WithField("pkg", "keychain/darwin").WithField("h.url", h.url).WithField("userID", userID) + query := newQuery(hostURL, userID) query.SetMatchLimit(keychain.MatchLimitOne) query.SetReturnData(true) results, err := keychain.QueryItem(query) if err != nil { + l.WithError(err).Error("Querry item failed") return "", "", parseError(err) } @@ -129,8 +133,11 @@ func (h *macOSHelper) Get(secretURL string) (string, string, error) { func (h *macOSHelper) List() (map[string]string, error) { userIDByURL := make(map[string]string) + l := logrus.WithField("pkg", "keychain/darwin").WithField("h.url", h.url) + userIDs, err := keychain.GetGenericPasswordAccounts(h.url) if err != nil { + l.WithError(err).Warn("Get generic password accounts failed") return nil, parseError(err) } diff --git a/pkg/keychain/helper_dbus_linux.go b/pkg/keychain/helper_dbus_linux.go index ffc4a849b..053c3119d 100644 --- a/pkg/keychain/helper_dbus_linux.go +++ b/pkg/keychain/helper_dbus_linux.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package keychain diff --git a/pkg/keychain/helper_linux.go b/pkg/keychain/helper_linux.go index 2a517ae69..39499ccfb 100644 --- a/pkg/keychain/helper_linux.go +++ b/pkg/keychain/helper_linux.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package keychain @@ -33,7 +33,7 @@ const ( SecretServiceDBus = "secret-service-dbus" ) -func init() { // nolint[noinit] +func init() { //nolint:gochecknoinits Helpers = make(map[string]helperConstructor) if isUsable(newDBusHelper("")) { diff --git a/pkg/keychain/helper_windows.go b/pkg/keychain/helper_windows.go index 925c0152d..71af8c38b 100644 --- a/pkg/keychain/helper_windows.go +++ b/pkg/keychain/helper_windows.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package keychain @@ -24,7 +24,7 @@ import ( const WindowsCredentials = "windows-credentials" -func init() { // nolint[noinit] +func init() { //nolint:gochecknoinits Helpers = make(map[string]helperConstructor) // Windows always provides a keychain. diff --git a/pkg/keychain/keychain.go b/pkg/keychain/keychain.go index 2089ce70e..f73893da9 100644 --- a/pkg/keychain/keychain.go +++ b/pkg/keychain/keychain.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package keychain implements a native secure password store for each platform. package keychain @@ -35,16 +35,16 @@ const Version = "k11" var ( // ErrNoKeychain indicates that no suitable keychain implementation could be loaded. - ErrNoKeychain = errors.New("no keychain") // nolint[noglobals] + ErrNoKeychain = errors.New("no keychain") //nolint:gochecknoglobals // ErrMacKeychainRebuild is returned on macOS with blocked or corrupted keychain. ErrMacKeychainRebuild = errors.New("keychain error -25293") // Helpers holds all discovered keychain helpers. It is populated in init(). - Helpers map[string]helperConstructor // nolint[noglobals] + Helpers map[string]helperConstructor //nolint:gochecknoglobals // defaultHelper is the default helper to use if the user hasn't yet set a preference. - defaultHelper string // nolint[noglobals] + defaultHelper string //nolint:gochecknoglobals ) // NewKeychain creates a new native keychain. @@ -98,7 +98,7 @@ func (kc *Keychain) List() ([]string, error) { return nil, err } - var userIDs []string // nolint[prealloc] + var userIDs []string //nolint:prealloc for url, userID := range userIDsByURL { if url != kc.secretURL(userID) { diff --git a/pkg/keychain/keychain_darwin.go b/pkg/keychain/keychain_darwin.go index a4ac8b810..2a37872d3 100644 --- a/pkg/keychain/keychain_darwin.go +++ b/pkg/keychain/keychain_darwin.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // +build darwin @@ -26,5 +26,5 @@ import ( // hostURL uniquely identifies the app's keychain items within the system keychain. func hostURL(keychainName string) string { - return fmt.Sprintf("ProtonMail%vService", strings.Title(keychainName)) + return fmt.Sprintf("Proton Mail %v", strings.Title(keychainName)) } diff --git a/pkg/keychain/keychain_default.go b/pkg/keychain/keychain_default.go index 84abe8c15..c3a6ac475 100644 --- a/pkg/keychain/keychain_default.go +++ b/pkg/keychain/keychain_default.go @@ -1,20 +1,21 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . +//go:build !darwin // +build !darwin package keychain diff --git a/pkg/keychain/keychain_missing.go b/pkg/keychain/keychain_missing.go index 239fb4101..46e90af88 100644 --- a/pkg/keychain/keychain_missing.go +++ b/pkg/keychain/keychain_missing.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package keychain diff --git a/pkg/keychain/keychain_test.go b/pkg/keychain/keychain_test.go index 840c4b365..d7eebe09a 100644 --- a/pkg/keychain/keychain_test.go +++ b/pkg/keychain/keychain_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package keychain @@ -25,9 +25,9 @@ import ( "github.com/stretchr/testify/require" ) -var suffix = []byte("\x00avoidFix\x00\x00\x00\x00\x00\x00\x00") //nolint[gochecknoglobals] +var suffix = []byte("\x00avoidFix\x00\x00\x00\x00\x00\x00\x00") //nolint:gochecknoglobals -var testData = map[string]string{ //nolint[gochecknoglobals] +var testData = map[string]string{ //nolint:gochecknoglobals "user1": base64.StdEncoding.EncodeToString(append([]byte("data1"), suffix...)), "user2": base64.StdEncoding.EncodeToString(append([]byte("data2"), suffix...)), } diff --git a/pkg/listener/listener.go b/pkg/listener/listener.go index dd451a3ea..dcb932a37 100644 --- a/pkg/listener/listener.go +++ b/pkg/listener/listener.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package listener @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" ) -var log = logrus.WithField("pkg", "bridgeUtils/listener") //nolint[gochecknoglobals] +var log = logrus.WithField("pkg", "bridgeUtils/listener") //nolint:gochecknoglobals // Listener has a list of channels watching for updates. type Listener interface { diff --git a/pkg/listener/listener_test.go b/pkg/listener/listener_test.go index b45bb4a1c..4f34b68fb 100644 --- a/pkg/listener/listener_test.go +++ b/pkg/listener/listener_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package listener diff --git a/pkg/message/boundary_reader.go b/pkg/message/boundary_reader.go index 30d0c834f..538ee4e00 100644 --- a/pkg/message/boundary_reader.go +++ b/pkg/message/boundary_reader.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message diff --git a/pkg/message/build.go b/pkg/message/build.go index 20877b210..374751e4d 100644 --- a/pkg/message/build.go +++ b/pkg/message/build.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message @@ -145,7 +145,7 @@ func (job *Job) GetResult() ([]byte, error) { return nil, err } - return res.([]byte), nil + return res.([]byte), nil //nolint:forcetypeassert } // NOTE: This is not used because it is actually not doing what was expected: It diff --git a/pkg/message/build_boundary.go b/pkg/message/build_boundary.go index ef4491175..fa94611a3 100644 --- a/pkg/message/build_boundary.go +++ b/pkg/message/build_boundary.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message diff --git a/pkg/message/build_encrypted.go b/pkg/message/build_encrypted.go index 2ca449825..fcaafa270 100644 --- a/pkg/message/build_encrypted.go +++ b/pkg/message/build_encrypted.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message @@ -36,7 +36,7 @@ import ( ) // BuildEncrypted is used for importing encrypted message. -func BuildEncrypted(m *pmapi.Message, readers []io.Reader, kr *crypto.KeyRing) ([]byte, error) { //nolint[funlen] +func BuildEncrypted(m *pmapi.Message, readers []io.Reader, kr *crypto.KeyRing) ([]byte, error) { //nolint:funlen b := &bytes.Buffer{} boundary := newBoundary(m.ID).gen() @@ -136,7 +136,7 @@ func getAttachmentHeader(att *pmapi.Attachment, buildForIMAP bool) textproto.MIM } encodedName := pmmime.EncodeHeader(att.Name) - disposition := "attachment" //nolint[goconst] + disposition := "attachment" //nolint:goconst if strings.Contains(att.Header.Get("Content-Disposition"), pmapi.DispositionInline) { disposition = pmapi.DispositionInline } diff --git a/pkg/message/build_framework_test.go b/pkg/message/build_framework_test.go index b3a6f7bad..ba4d56142 100644 --- a/pkg/message/build_framework_test.go +++ b/pkg/message/build_framework_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message @@ -58,7 +58,7 @@ func newTestFetcher( func newTestMessage( t *testing.T, kr *crypto.KeyRing, - messageID, addressID, mimeType, body string, // nolint[unparam] + messageID, addressID, mimeType, body string, //nolint:unparam date time.Time, ) *pmapi.Message { enc, err := kr.Encrypt(crypto.NewPlainMessageFromString(body), kr) @@ -154,7 +154,7 @@ func (s *testSection) expectBody(wantBody matcher) *testSection { return s } -func (s *testSection) expectSection(wantSection matcher) *testSection { // nolint[unparam] +func (s *testSection) expectSection(wantSection matcher) *testSection { //nolint:unparam wantSection.match(s.t, string(s.raw)) return s @@ -169,7 +169,7 @@ func (s *testSection) expectContentType(wantContentType matcher) *testSection { return s } -func (s *testSection) expectContentTypeParam(key string, wantParam matcher) *testSection { // nolint[unparam] +func (s *testSection) expectContentTypeParam(key string, wantParam matcher) *testSection { //nolint:unparam _, params, err := s.part.Header.ContentType() require.NoError(s.t, err) @@ -187,7 +187,7 @@ func (s *testSection) expectContentDisposition(wantDisposition matcher) *testSec return s } -func (s *testSection) expectContentDispositionParam(key string, wantParam matcher) *testSection { // nolint[unparam] +func (s *testSection) expectContentDispositionParam(key string, wantParam matcher) *testSection { //nolint:unparam _, params, err := s.part.Header.ContentDisposition() require.NoError(s.t, err) @@ -214,7 +214,7 @@ func (s *testSection) expectHeader(key string, wantValue matcher) *testSection { return s } -func (s *testSection) expectDecodedHeader(key string, wantValue matcher) *testSection { // nolint[unparam] +func (s *testSection) expectDecodedHeader(key string, wantValue matcher) *testSection { //nolint:unparam dec, err := s.part.Header.Text(key) require.NoError(s.t, err) diff --git a/pkg/message/build_job.go b/pkg/message/build_job.go index ca2ee966e..3aeebad7b 100644 --- a/pkg/message/build_job.go +++ b/pkg/message/build_job.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message diff --git a/pkg/message/build_rfc822.go b/pkg/message/build_rfc822.go index 53080003c..b83fbb657 100644 --- a/pkg/message/build_rfc822.go +++ b/pkg/message/build_rfc822.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message @@ -277,7 +277,7 @@ func buildPGPMIMEFallbackRFC822(msg *pmapi.Message, opts JobOptions) ([]byte, er return buf.Bytes(), nil } -func writeMultipartSignedRFC822(header message.Header, body []byte, sig pmapi.Signature) ([]byte, error) { //nolint[funlen] +func writeMultipartSignedRFC822(header message.Header, body []byte, sig pmapi.Signature) ([]byte, error) { //nolint:funlen buf := new(bytes.Buffer) boundary := newBoundary("").gen() @@ -370,7 +370,7 @@ func writeMultipartEncryptedRFC822(header message.Header, body []byte) ([]byte, return buf.Bytes(), nil } -func getMessageHeader(msg *pmapi.Message, opts JobOptions) message.Header { // nolint[funlen] +func getMessageHeader(msg *pmapi.Message, opts JobOptions) message.Header { //nolint:funlen hdr := toMessageHeader(msg.Header) // SetText will RFC2047-encode. diff --git a/pkg/message/build_rfc822_custom.go b/pkg/message/build_rfc822_custom.go index 0a461b80e..5dfa0294b 100644 --- a/pkg/message/build_rfc822_custom.go +++ b/pkg/message/build_rfc822_custom.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message diff --git a/pkg/message/build_test.go b/pkg/message/build_test.go index 9f00177be..2f189ba6e 100644 --- a/pkg/message/build_test.go +++ b/pkg/message/build_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message diff --git a/pkg/message/encrypt.go b/pkg/message/encrypt.go index 3d7ece441..8aa752c71 100644 --- a/pkg/message/encrypt.go +++ b/pkg/message/encrypt.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message diff --git a/pkg/message/encrypt_test.go b/pkg/message/encrypt_test.go index a218077e1..2f0bd4aa2 100644 --- a/pkg/message/encrypt_test.go +++ b/pkg/message/encrypt_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message diff --git a/pkg/message/envelope.go b/pkg/message/envelope.go index db9829bb5..0f8b856b0 100644 --- a/pkg/message/envelope.go +++ b/pkg/message/envelope.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message diff --git a/pkg/message/flags.go b/pkg/message/flags.go index 8694eaade..c9434e575 100644 --- a/pkg/message/flags.go +++ b/pkg/message/flags.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message diff --git a/pkg/message/header.go b/pkg/message/header.go index f28c429c1..f333338cf 100644 --- a/pkg/message/header.go +++ b/pkg/message/header.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message diff --git a/pkg/message/header_test.go b/pkg/message/header_test.go index 3677afc0c..0dbeca95e 100644 --- a/pkg/message/header_test.go +++ b/pkg/message/header_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message diff --git a/pkg/message/init.go b/pkg/message/init.go index e49b57984..fd8b4f10d 100644 --- a/pkg/message/init.go +++ b/pkg/message/init.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message @@ -22,6 +22,6 @@ import ( pmmime "github.com/ProtonMail/proton-bridge/pkg/mime" ) -func init() { // nolint[noinit] +func init() { //nolint:gochecknoinits rfc5322.CharsetReader = pmmime.CharsetReader } diff --git a/pkg/message/message.go b/pkg/message/message.go index 1f0cf4169..e0a8ccb49 100644 --- a/pkg/message/message.go +++ b/pkg/message/message.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package message contains set of tools to convert message between Proton API // and IMAP format. @@ -27,4 +27,4 @@ const ( rfc822Message = "message/rfc822" ) -var log = logrus.WithField("pkg", "pkg/message") //nolint[gochecknoglobals] +var log = logrus.WithField("pkg", "pkg/message") //nolint:gochecknoglobals diff --git a/pkg/message/parser.go b/pkg/message/parser.go index 1bcd139e9..4ed849eae 100644 --- a/pkg/message/parser.go +++ b/pkg/message/parser.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message @@ -303,7 +303,7 @@ func collectBodyParts(p *parser.Parser, preferredContentType string) (parser.Par return nil, err } - return res.(parser.Parts), nil + return res.(parser.Parts), nil //nolint:forcetypeassert } func collectChildParts(p *parser.Part, visit parser.Visit) ([]parser.Parts, error) { @@ -315,7 +315,7 @@ func collectChildParts(p *parser.Part, visit parser.Visit) ([]parser.Parts, erro return nil, err } - childParts = append(childParts, res.(parser.Parts)) + childParts = append(childParts, res.(parser.Parts)) //nolint:forcetypeassert } return childParts, nil @@ -421,7 +421,7 @@ func AttachPublicKey(p *parser.Parser, key, keyName string) { }) } -func parseMessageHeader(m *pmapi.Message, h message.Header) error { // nolint[funlen] +func parseMessageHeader(m *pmapi.Message, h message.Header) error { //nolint:funlen mimeHeader, err := toMailHeader(h) if err != nil { return err diff --git a/pkg/message/parser/handler.go b/pkg/message/parser/handler.go index 490e7ac8b..bc7f7fe02 100644 --- a/pkg/message/parser/handler.go +++ b/pkg/message/parser/handler.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package parser diff --git a/pkg/message/parser/parser.go b/pkg/message/parser/parser.go index afd1cd461..4aec2dcc0 100644 --- a/pkg/message/parser/parser.go +++ b/pkg/message/parser/parser.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package parser diff --git a/pkg/message/parser/parser_test.go b/pkg/message/parser/parser_test.go index 84c1928e9..3e88fa38a 100644 --- a/pkg/message/parser/parser_test.go +++ b/pkg/message/parser/parser_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package parser diff --git a/pkg/message/parser/part.go b/pkg/message/parser/part.go index 101f1022f..65401eadb 100644 --- a/pkg/message/parser/part.go +++ b/pkg/message/parser/part.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package parser diff --git a/pkg/message/parser/part_test.go b/pkg/message/parser/part_test.go index 8d6019de4..7597f585f 100644 --- a/pkg/message/parser/part_test.go +++ b/pkg/message/parser/part_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package parser diff --git a/pkg/message/parser/trimmer.go b/pkg/message/parser/trimmer.go index a2e581947..d88be315b 100644 --- a/pkg/message/parser/trimmer.go +++ b/pkg/message/parser/trimmer.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package parser diff --git a/pkg/message/parser/trimmer_test.go b/pkg/message/parser/trimmer_test.go index c107f710c..d8fa3dcf5 100644 --- a/pkg/message/parser/trimmer_test.go +++ b/pkg/message/parser/trimmer_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package parser diff --git a/pkg/message/parser/visitor.go b/pkg/message/parser/visitor.go index fa83cf1df..1eaf62233 100644 --- a/pkg/message/parser/visitor.go +++ b/pkg/message/parser/visitor.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package parser diff --git a/pkg/message/parser/walker.go b/pkg/message/parser/walker.go index 2b99c15a3..aeead295c 100644 --- a/pkg/message/parser/walker.go +++ b/pkg/message/parser/walker.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package parser diff --git a/pkg/message/parser/walker_test.go b/pkg/message/parser/walker_test.go index c9a35e7a8..58470e421 100644 --- a/pkg/message/parser/walker_test.go +++ b/pkg/message/parser/walker_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package parser diff --git a/pkg/message/parser/writer.go b/pkg/message/parser/writer.go index e1151dffd..52f7c0287 100644 --- a/pkg/message/parser/writer.go +++ b/pkg/message/parser/writer.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package parser diff --git a/pkg/message/parser/writer_test.go b/pkg/message/parser/writer_test.go index 3b95715ac..9e61cd74b 100644 --- a/pkg/message/parser/writer_test.go +++ b/pkg/message/parser/writer_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package parser diff --git a/pkg/message/parser_test.go b/pkg/message/parser_test.go index 4fe6a536d..4bc60dffd 100644 --- a/pkg/message/parser_test.go +++ b/pkg/message/parser_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message @@ -258,7 +258,7 @@ func TestParseTextPlainWithOctetAttachmentBadFilename(t *testing.T) { func TestParseTextPlainWithOctetAttachmentNameInContentType(t *testing.T) { f := getFileReader("text_plain_octet_attachment_name_in_contenttype.eml") - m, _, _, _, err := Parse(f) //nolint[dogsled] + m, _, _, _, err := Parse(f) //nolint:dogsled require.NoError(t, err) assert.Equal(t, "attachment-contenttype.txt", m.Attachments[0].Name) @@ -267,7 +267,7 @@ func TestParseTextPlainWithOctetAttachmentNameInContentType(t *testing.T) { func TestParseTextPlainWithOctetAttachmentNameConflict(t *testing.T) { f := getFileReader("text_plain_octet_attachment_name_conflict.eml") - m, _, _, _, err := Parse(f) //nolint[dogsled] + m, _, _, _, err := Parse(f) //nolint:dogsled require.NoError(t, err) assert.Equal(t, "attachment-disposition.txt", m.Attachments[0].Name) @@ -575,7 +575,7 @@ func TestParseNonEncodedContentType(t *testing.T) { func TestParseEncodedContentTypeBad(t *testing.T) { f := getFileReader("rfc2047-content-transfer-encoding-bad.eml") - _, _, _, _, err := Parse(f) // nolint[dogsled] + _, _, _, _, err := Parse(f) //nolint:dogsled require.Error(t, err) } diff --git a/pkg/message/scanner.go b/pkg/message/scanner.go index 29491858d..997113591 100644 --- a/pkg/message/scanner.go +++ b/pkg/message/scanner.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message diff --git a/pkg/message/scanner_test.go b/pkg/message/scanner_test.go index edad8abfa..884eaa247 100644 --- a/pkg/message/scanner_test.go +++ b/pkg/message/scanner_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message diff --git a/pkg/message/section.go b/pkg/message/section.go index 72c5a15ae..e80331de3 100644 --- a/pkg/message/section.go +++ b/pkg/message/section.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message @@ -111,7 +111,7 @@ func (bs *BodyStructure) Parse(r io.Reader) error { return bs.parseAllChildSections(r, []int{}, 0) } -func (bs *BodyStructure) parseAllChildSections(r io.Reader, currentPath []int, start int) (err error) { //nolint[funlen] +func (bs *BodyStructure) parseAllChildSections(r io.Reader, currentPath []int, start int) (err error) { //nolint:funlen info := &SectionInfo{ Start: start, Size: 0, @@ -170,11 +170,11 @@ func (bs *BodyStructure) parseAllChildSections(r io.Reader, currentPath []int, s } // Clear all buffers. - bodyReader = nil //nolint[wastedassign] just to be sure we clear garbage collector + bodyReader = nil //nolint:wastedassign // just to be sure we clear garbage collector bodyInfo.reader = nil tp.R = nil - tp = nil //nolint[wastedassign] just to be sure we clear garbage collector - bufInfo = nil //nolint[ineffassign] just to be sure we clear garbage collector + tp = nil //nolint:wastedassign // just to be sure we clear garbage collector + bufInfo = nil //nolint:ineffassign,wastedassign // just to be sure we clear garbage collector info.reader = nil // Store boundaries. @@ -375,7 +375,7 @@ func (bs *BodyStructure) IMAPBodyStructure(currentPart []int) (imapBS *imap.Body imapBS.Disposition = val } - nextPart := append(currentPart, 1) + nextPart := append(currentPart, 1) //nolint:gocritic for { if !bs.hasInfo(nextPart) { break diff --git a/pkg/message/section_test.go b/pkg/message/section_test.go index 332d53ce9..3704032bf 100644 --- a/pkg/message/section_test.go +++ b/pkg/message/section_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message @@ -30,7 +30,7 @@ import ( "github.com/stretchr/testify/require" ) -var enableDebug = false // nolint[global] +var enableDebug = false //nolint:global func debug(msg string, v ...interface{}) { if !enableDebug { diff --git a/pkg/message/writer.go b/pkg/message/writer.go index af03d506e..e14110237 100644 --- a/pkg/message/writer.go +++ b/pkg/message/writer.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package message diff --git a/pkg/mime/encoding.go b/pkg/mime/encoding.go index 39d01140b..2a9a25098 100644 --- a/pkg/mime/encoding.go +++ b/pkg/mime/encoding.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmmime diff --git a/pkg/mime/encoding_test.go b/pkg/mime/encoding_test.go index 5478fc5f6..676a98f39 100644 --- a/pkg/mime/encoding_test.go +++ b/pkg/mime/encoding_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmmime diff --git a/pkg/mime/mediaType.go b/pkg/mime/mediaType.go index e41cfab96..000ba35cc 100644 --- a/pkg/mime/mediaType.go +++ b/pkg/mime/mediaType.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmmime diff --git a/pkg/mime/utf7Decoder.go b/pkg/mime/utf7Decoder.go index 2e4c05fdd..a8600053d 100644 --- a/pkg/mime/utf7Decoder.go +++ b/pkg/mime/utf7Decoder.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmmime diff --git a/pkg/mobileconfig/config.go b/pkg/mobileconfig/config.go index 4114a8339..b700b1703 100644 --- a/pkg/mobileconfig/config.go +++ b/pkg/mobileconfig/config.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package mobileconfig diff --git a/pkg/mobileconfig/template.go b/pkg/mobileconfig/template.go index 5de289d1e..3e39a19ac 100644 --- a/pkg/mobileconfig/template.go +++ b/pkg/mobileconfig/template.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package mobileconfig diff --git a/pkg/parallel/parallel.go b/pkg/parallel/parallel.go index 348bf38af..20825a3d0 100644 --- a/pkg/parallel/parallel.go +++ b/pkg/parallel/parallel.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package parallel @@ -34,7 +34,7 @@ type parallelJob struct { // the input and is passed in order to the `collect` callback. If an error // occurs, the execution is stopped and the error returned. // runParallel blocks until everything is done. -func RunParallel( //nolint[funlen] +func RunParallel( //nolint:funlen workers int, input []interface{}, process func(interface{}) (interface{}, error), diff --git a/pkg/parallel/parallel_test.go b/pkg/parallel/parallel_test.go index 67805ed0f..99e30d834 100644 --- a/pkg/parallel/parallel_test.go +++ b/pkg/parallel/parallel_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package parallel @@ -28,7 +28,7 @@ import ( r "github.com/stretchr/testify/require" ) -// nolint[gochecknoglobals] +//nolint:gochecknoglobals var ( testInput = []interface{}{1, 2, 3, 4, 5, 6, 7, 8, 9, 10} wantOutput = []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10} @@ -45,7 +45,7 @@ func TestParallel(t *testing.T) { t.Run(fmt.Sprintf("%d", workers), func(t *testing.T) { collected := make([]int, 0) collect := func(idx int, value interface{}) error { - collected = append(collected, value.(int)) + collected = append(collected, value.(int)) //nolint:forcetypeassert return nil } @@ -88,13 +88,13 @@ func TestParallelErrorInProcess(t *testing.T) { var lastCollected int process := func(value interface{}) (interface{}, error) { time.Sleep(10 * time.Millisecond) - if value.(int) == 5 { + if value.(int) == 5 { //nolint:forcetypeassert return nil, errors.New("Error") } return value, nil } collect := func(idx int, value interface{}) error { - lastCollected = value.(int) //nolint[forcetypeassert] + lastCollected = value.(int) //nolint:forcetypeassert return nil } @@ -114,7 +114,7 @@ func TestParallelErrorInCollect(t *testing.T) { workers := workers t.Run(fmt.Sprintf("%d", workers), func(t *testing.T) { collect := func(idx int, value interface{}) error { - if value.(int) == 5 { + if value.(int) == 5 { //nolint:forcetypeassert return errors.New("Error") } return nil @@ -128,7 +128,7 @@ func TestParallelErrorInCollect(t *testing.T) { func processSleep(value interface{}) (interface{}, error) { time.Sleep(time.Duration(testProcessSleep) * time.Millisecond) - return value.(int), nil + return value.(int), nil //nolint:forcetypeassert } func collectNil(idx int, value interface{}) error { diff --git a/pkg/pchan/pchan.go b/pkg/pchan/pchan.go index c559b0eae..1abc97500 100644 --- a/pkg/pchan/pchan.go +++ b/pkg/pchan/pchan.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pchan diff --git a/pkg/pchan/pchan_test.go b/pkg/pchan/pchan_test.go index 44f6326a6..b84639e37 100644 --- a/pkg/pchan/pchan_test.go +++ b/pkg/pchan/pchan_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pchan @@ -119,5 +119,5 @@ func getValue(t *testing.T, ch *PChan) int { assert.True(t, ok) - return val.(int) + return val.(int) //nolint:forcetypeassert } diff --git a/pkg/pmapi/addresses.go b/pkg/pmapi/addresses.go index 4f0f2ab9e..6cf7b83ea 100644 --- a/pkg/pmapi/addresses.go +++ b/pkg/pmapi/addresses.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/addresses_test.go b/pkg/pmapi/addresses_test.go index 73bb334d6..f3bd252be 100644 --- a/pkg/pmapi/addresses_test.go +++ b/pkg/pmapi/addresses_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/attachments.go b/pkg/pmapi/attachments.go index 84fa31d08..f7fda8576 100644 --- a/pkg/pmapi/attachments.go +++ b/pkg/pmapi/attachments.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/attachments_test.go b/pkg/pmapi/attachments_test.go index 5893f7e04..7523c319e 100644 --- a/pkg/pmapi/attachments_test.go +++ b/pkg/pmapi/attachments_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -143,7 +143,7 @@ func TestClient_GetAttachment(t *testing.T) { att, err := c.GetAttachment(context.Background(), testAttachment.ID) r.NoError(err) - defer att.Close() //nolint[errcheck] + defer att.Close() //nolint:errcheck // In reality, r contains encrypted data b, err := ioutil.ReadAll(att) diff --git a/pkg/pmapi/auth.go b/pkg/pmapi/auth.go index 160f3c7ab..cff12d033 100644 --- a/pkg/pmapi/auth.go +++ b/pkg/pmapi/auth.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/auth_server_test.go b/pkg/pmapi/auth_server_test.go index 129b6df63..1353ae196 100644 --- a/pkg/pmapi/auth_server_test.go +++ b/pkg/pmapi/auth_server_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/auth_test.go b/pkg/pmapi/auth_test.go index 2806679dd..944510cec 100644 --- a/pkg/pmapi/auth_test.go +++ b/pkg/pmapi/auth_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -60,7 +60,7 @@ func TestAutomaticAuthRefresh(t *testing.T) { r.NotNil(gotAuthRefresh) r.Equal(wantAuthRefresh, *gotAuthRefresh) - cl := c.(*client) //nolint[forcetypeassert] we want to panic here + cl := c.(*client) //nolint:forcetypeassert // we want to panic here r.Equal(wantAuthRefresh.AccessToken, cl.acc) r.Equal(wantAuthRefresh.RefreshToken, cl.ref) r.WithinDuration(expiresIn(100), cl.exp, time.Second) diff --git a/pkg/pmapi/boolean.go b/pkg/pmapi/boolean.go index d32bf4230..6aa68827a 100644 --- a/pkg/pmapi/boolean.go +++ b/pkg/pmapi/boolean.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/client.go b/pkg/pmapi/client.go index 5c7dee041..6a3d5add3 100644 --- a/pkg/pmapi/client.go +++ b/pkg/pmapi/client.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/client_keys.go b/pkg/pmapi/client_keys.go index b6844d0c6..464db6ac7 100644 --- a/pkg/pmapi/client_keys.go +++ b/pkg/pmapi/client_keys.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/client_types.go b/pkg/pmapi/client_types.go index 384cd0f77..efaebb0cb 100644 --- a/pkg/pmapi/client_types.go +++ b/pkg/pmapi/client_types.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/config.go b/pkg/pmapi/config.go index 68af1fbc3..36b437afc 100644 --- a/pkg/pmapi/config.go +++ b/pkg/pmapi/config.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/config_default.go b/pkg/pmapi/config_default.go index 53cce729a..7d6841c60 100644 --- a/pkg/pmapi/config_default.go +++ b/pkg/pmapi/config_default.go @@ -1,20 +1,21 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . +//go:build !build_qa // +build !build_qa package pmapi diff --git a/pkg/pmapi/config_qa.go b/pkg/pmapi/config_qa.go index 4da8f9553..e92b9da36 100644 --- a/pkg/pmapi/config_qa.go +++ b/pkg/pmapi/config_qa.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // +build build_qa diff --git a/pkg/pmapi/contacts.go b/pkg/pmapi/contacts.go index df5a660a3..87934f1f7 100644 --- a/pkg/pmapi/contacts.go +++ b/pkg/pmapi/contacts.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/contacts_test.go b/pkg/pmapi/contacts_test.go index 71bfe32d4..805c1fca5 100644 --- a/pkg/pmapi/contacts_test.go +++ b/pkg/pmapi/contacts_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/context.go b/pkg/pmapi/context.go index de10187d9..74180c9e1 100644 --- a/pkg/pmapi/context.go +++ b/pkg/pmapi/context.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/data_test.go b/pkg/pmapi/data_test.go index ab20ea781..5d5f7d9db 100644 --- a/pkg/pmapi/data_test.go +++ b/pkg/pmapi/data_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -25,9 +25,7 @@ var testIdentity = &crypto.Identity{ } const ( - testUID = "729ad6012421d67ad26950dc898bebe3a6e3caa2" //nolint[gosec] - testAccessToken = "de0423049b44243afeec7d9c1d99be7b46da1e8a" //nolint[gosec] - testAccessTokenOld = "feb3159ac63fb05119bcf4480d939278aa746926" //nolint[gosec] - testRefreshToken = "a49b98256745bb497bec20e9b55f5de16f01fb52" //nolint[gosec] - testRefreshTokenNew = "b894b4c4f20003f12d486900d8b88c7d68e67235" //nolint[gosec] + testUID = "729ad6012421d67ad26950dc898bebe3a6e3caa2" //nolint:gosec + testAccessToken = "de0423049b44243afeec7d9c1d99be7b46da1e8a" //nolint:gosec + testRefreshToken = "a49b98256745bb497bec20e9b55f5de16f01fb52" //nolint:gosec ) diff --git a/pkg/pmapi/dialer_basic.go b/pkg/pmapi/dialer_basic.go index f6a230a4f..552393e4e 100644 --- a/pkg/pmapi/dialer_basic.go +++ b/pkg/pmapi/dialer_basic.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -71,7 +71,7 @@ func (d *BasicTLSDialer) DialTLS(network, address string) (conn net.Conn, err er // If we are not dialing the standard API then we should skip cert verification checks. if address != d.cfg.HostURL { - tlsConfig = &tls.Config{InsecureSkipVerify: true} // nolint[gosec] + tlsConfig = &tls.Config{InsecureSkipVerify: true} //nolint:gosec } return tls.DialWithDialer(dialer, network, address, tlsConfig) diff --git a/pkg/pmapi/dialer_pinning.go b/pkg/pmapi/dialer_pinning.go index 17799da7b..91e1ef127 100644 --- a/pkg/pmapi/dialer_pinning.go +++ b/pkg/pmapi/dialer_pinning.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -26,7 +26,7 @@ import ( // TrustedAPIPins contains trusted public keys of the protonmail API and proxies. // NOTE: the proxy pins are the same for all proxy servers, guaranteed by infra team ;). -var TrustedAPIPins = []string{ // nolint[gochecknoglobals] +var TrustedAPIPins = []string{ //nolint:gochecknoglobals // api.protonmail.ch `pin-sha256="drtmcR2kFkM8qJClsuWgUzxgBkePfRCkRpqUesyDmeE="`, // current `pin-sha256="YRGlaY0jyJ4Jw2/4M8FIftwbDIQfh8Sdro96CeEel54="`, // hot backup diff --git a/pkg/pmapi/dialer_pinning_checker.go b/pkg/pmapi/dialer_pinning_checker.go index 9bcf98a76..d07f765ae 100644 --- a/pkg/pmapi/dialer_pinning_checker.go +++ b/pkg/pmapi/dialer_pinning_checker.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/dialer_pinning_report.go b/pkg/pmapi/dialer_pinning_report.go index ea6cc414f..36c6b8bf3 100644 --- a/pkg/pmapi/dialer_pinning_report.go +++ b/pkg/pmapi/dialer_pinning_report.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/dialer_pinning_reporter.go b/pkg/pmapi/dialer_pinning_reporter.go index d28c03010..4daa33950 100644 --- a/pkg/pmapi/dialer_pinning_reporter.go +++ b/pkg/pmapi/dialer_pinning_reporter.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/dialer_pinning_reporter_test.go b/pkg/pmapi/dialer_pinning_reporter_test.go index c13414aa3..196a7f3ad 100644 --- a/pkg/pmapi/dialer_pinning_reporter_test.go +++ b/pkg/pmapi/dialer_pinning_reporter_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/dialer_pinning_test.go b/pkg/pmapi/dialer_pinning_test.go index 0b5bdd5dd..470c78c58 100644 --- a/pkg/pmapi/dialer_pinning_test.go +++ b/pkg/pmapi/dialer_pinning_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/dialer_proxy.go b/pkg/pmapi/dialer_proxy.go index f39ea86a4..30cb98673 100644 --- a/pkg/pmapi/dialer_proxy.go +++ b/pkg/pmapi/dialer_proxy.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/dialer_proxy_provider.go b/pkg/pmapi/dialer_proxy_provider.go index 1526bf2de..61fdbaa14 100644 --- a/pkg/pmapi/dialer_proxy_provider.go +++ b/pkg/pmapi/dialer_proxy_provider.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -42,7 +42,7 @@ const ( GoogleProvider = "https://dns.google/dns-query" ) -var dohProviders = []string{ //nolint[gochecknoglobals] +var dohProviders = []string{ //nolint:gochecknoglobals Quad9Provider, Quad9PortProvider, GoogleProvider, @@ -68,7 +68,7 @@ type proxyProvider struct { // newProxyProvider creates a new proxyProvider that queries the given DoH providers // to retrieve DNS records for the given query string. -func newProxyProvider(cfg Config, providers []string, query string) (p *proxyProvider) { // nolint[unparam] +func newProxyProvider(cfg Config, providers []string, query string) (p *proxyProvider) { //nolint:unparam p = &proxyProvider{ cfg: cfg, providers: providers, diff --git a/pkg/pmapi/dialer_proxy_provider_test.go b/pkg/pmapi/dialer_proxy_provider_test.go index 4fca808db..f60868ca5 100644 --- a/pkg/pmapi/dialer_proxy_provider_test.go +++ b/pkg/pmapi/dialer_proxy_provider_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/dialer_proxy_test.go b/pkg/pmapi/dialer_proxy_test.go index 039a13ff0..7ac2a4598 100644 --- a/pkg/pmapi/dialer_proxy_test.go +++ b/pkg/pmapi/dialer_proxy_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/errors.go b/pkg/pmapi/errors.go index 2819b20cb..f67a68574 100644 --- a/pkg/pmapi/errors.go +++ b/pkg/pmapi/errors.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/events.go b/pkg/pmapi/events.go index d86ed6ef6..89c5b6448 100644 --- a/pkg/pmapi/events.go +++ b/pkg/pmapi/events.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/events_test.go b/pkg/pmapi/events_test.go index 06141ac3a..b187ebe1c 100644 --- a/pkg/pmapi/events_test.go +++ b/pkg/pmapi/events_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/import.go b/pkg/pmapi/import.go index 403c63a96..83e67b8c3 100644 --- a/pkg/pmapi/import.go +++ b/pkg/pmapi/import.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/import_test.go b/pkg/pmapi/import_test.go index 523ee9f9c..f24c4793f 100644 --- a/pkg/pmapi/import_test.go +++ b/pkg/pmapi/import_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -57,7 +57,7 @@ var testImportRes = &ImportMsgRes{ MessageID: "UKjSNz95KubYjrYmfbv1mbIfGxzY6D64mmHmVpWhkeEau-u0PIS4ru5IFMHgX6WjKpWYKCht3oiOtL5-wZChNg==", } -func TestClient_Import(t *testing.T) { // nolint[funlen] +func TestClient_Import(t *testing.T) { //nolint:funlen s, c := newTestClient(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { r.NoError(t, checkMethodAndPath(req, "POST", "/mail/v4/messages/import")) diff --git a/pkg/pmapi/key.go b/pkg/pmapi/key.go index 41bc9c722..800e15484 100644 --- a/pkg/pmapi/key.go +++ b/pkg/pmapi/key.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/keyring.go b/pkg/pmapi/keyring.go index 8aeb3011f..1deead83d 100644 --- a/pkg/pmapi/keyring.go +++ b/pkg/pmapi/keyring.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -244,7 +244,7 @@ func encryptAttachment(kr *crypto.KeyRing, data io.Reader, filename string) (enc return } - packets := append(pgpSplitMessage.KeyPacket, pgpSplitMessage.DataPacket...) + packets := append(pgpSplitMessage.KeyPacket, pgpSplitMessage.DataPacket...) //nolint:gocritic return bytes.NewReader(packets), nil } diff --git a/pkg/pmapi/keyring_test.go b/pkg/pmapi/keyring_test.go index 7a42520f2..de662bf45 100644 --- a/pkg/pmapi/keyring_test.go +++ b/pkg/pmapi/keyring_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -77,13 +77,13 @@ func TestPMKeys_GetKeyRingAndUnlock(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - kr, err := tt.keys.UnlockAll(tt.args.passphrase, tt.args.userKeyring) // nolint[scopelint] + kr, err := tt.keys.UnlockAll(tt.args.passphrase, tt.args.userKeyring) //nolint:scopelint r.NoError(err) // assert at least one key has been decrypted atLeastOneDecrypted := false - for _, k := range kr.GetKeys() { // nolint[scopelint] + for _, k := range kr.GetKeys() { //nolint:scopelint ok, err := k.IsUnlocked() if err != nil { panic(err) diff --git a/pkg/pmapi/labels.go b/pkg/pmapi/labels.go index e97fef7a8..3d1818d62 100644 --- a/pkg/pmapi/labels.go +++ b/pkg/pmapi/labels.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -52,7 +52,7 @@ func IsSystemLabel(label string) bool { } // LabelColors provides the RGB values of the available label colors. -var LabelColors = []string{ //nolint[gochecknoglobals] +var LabelColors = []string{ //nolint:gochecknoglobals "#7272a7", "#cf5858", "#c26cc7", @@ -76,7 +76,7 @@ var LabelColors = []string{ //nolint[gochecknoglobals] } // Label for message. -type Label struct { //nolint[maligned] +type Label struct { //nolint:maligned ID string Name string Path string diff --git a/pkg/pmapi/labels_test.go b/pkg/pmapi/labels_test.go index fa68db793..d09179505 100644 --- a/pkg/pmapi/labels_test.go +++ b/pkg/pmapi/labels_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/manager.go b/pkg/pmapi/manager.go index 5aa1a559a..191adee59 100644 --- a/pkg/pmapi/manager.go +++ b/pkg/pmapi/manager.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/manager_auth.go b/pkg/pmapi/manager_auth.go index 67c1d42d7..2daad62f6 100644 --- a/pkg/pmapi/manager_auth.go +++ b/pkg/pmapi/manager_auth.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/manager_download.go b/pkg/pmapi/manager_download.go index 7924b10e6..58563be57 100644 --- a/pkg/pmapi/manager_download.go +++ b/pkg/pmapi/manager_download.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/manager_log.go b/pkg/pmapi/manager_log.go index bcec6568f..dd329f7aa 100644 --- a/pkg/pmapi/manager_log.go +++ b/pkg/pmapi/manager_log.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/manager_metrics.go b/pkg/pmapi/manager_metrics.go index 61d1c4e72..d24ff13a1 100644 --- a/pkg/pmapi/manager_metrics.go +++ b/pkg/pmapi/manager_metrics.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/manager_metrics_test.go b/pkg/pmapi/manager_metrics_test.go index 564480f13..1bd9e42cb 100644 --- a/pkg/pmapi/manager_metrics_test.go +++ b/pkg/pmapi/manager_metrics_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/manager_ping.go b/pkg/pmapi/manager_ping.go index 816d49eba..0d013dc72 100644 --- a/pkg/pmapi/manager_ping.go +++ b/pkg/pmapi/manager_ping.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -26,7 +26,7 @@ import ( var ( // retryConnectionSleeps defines a smooth cool down in seconds. - retryConnectionSleeps = []int{2, 5, 10, 30, 60} // nolint[gochecknoglobals] + retryConnectionSleeps = []int{2, 5, 10, 30, 60} //nolint:gochecknoglobals ) func (m *manager) pingUntilSuccess() { diff --git a/pkg/pmapi/manager_proxy.go b/pkg/pmapi/manager_proxy.go index a9e48f494..814b567d2 100644 --- a/pkg/pmapi/manager_proxy.go +++ b/pkg/pmapi/manager_proxy.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/manager_report.go b/pkg/pmapi/manager_report.go index 6e8d1d1ac..813d75fd3 100644 --- a/pkg/pmapi/manager_report.go +++ b/pkg/pmapi/manager_report.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/manager_report_test.go b/pkg/pmapi/manager_report_test.go index 6a4485ffc..0117fc86f 100644 --- a/pkg/pmapi/manager_report_test.go +++ b/pkg/pmapi/manager_report_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/manager_report_types.go b/pkg/pmapi/manager_report_types.go index 4d0dc27c1..5721d6072 100644 --- a/pkg/pmapi/manager_report_types.go +++ b/pkg/pmapi/manager_report_types.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/manager_test.go b/pkg/pmapi/manager_test.go index 5d0859873..3454d21eb 100644 --- a/pkg/pmapi/manager_test.go +++ b/pkg/pmapi/manager_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/manager_types.go b/pkg/pmapi/manager_types.go index d4d862c16..e647e7ed3 100644 --- a/pkg/pmapi/manager_types.go +++ b/pkg/pmapi/manager_types.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/message_send.go b/pkg/pmapi/message_send.go index 5f80062b9..524c21734 100644 --- a/pkg/pmapi/message_send.go +++ b/pkg/pmapi/message_send.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/message_send_test.go b/pkg/pmapi/message_send_test.go index 36854c15e..5f32582f9 100644 --- a/pkg/pmapi/message_send_test.go +++ b/pkg/pmapi/message_send_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/messages.go b/pkg/pmapi/messages.go index b9f08e2a0..a35417468 100644 --- a/pkg/pmapi/messages.go +++ b/pkg/pmapi/messages.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -150,7 +150,7 @@ const InternalIDDomain = `protonmail.internalid` // RxInternalReferenceFormat is compiled regexp which describes the match for // a message ID used in reference headers. -var RxInternalReferenceFormat = regexp.MustCompile(`(?U)<(.+)@` + regexp.QuoteMeta(InternalIDDomain) + `>`) //nolint[gochecknoglobals] +var RxInternalReferenceFormat = regexp.MustCompile(`(?U)<(.+)@` + regexp.QuoteMeta(InternalIDDomain) + `>`) //nolint:gochecknoglobals // Message structure. type Message struct { @@ -460,7 +460,7 @@ type MessagesFilter struct { AutoWildcard *bool } -func (filter *MessagesFilter) urlValues() url.Values { // nolint[funlen] +func (filter *MessagesFilter) urlValues() url.Values { //nolint:funlen v := url.Values{} if filter.Page != 0 { diff --git a/pkg/pmapi/messages_test.go b/pkg/pmapi/messages_test.go index e2041562a..9847ad849 100644 --- a/pkg/pmapi/messages_test.go +++ b/pkg/pmapi/messages_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/observer.go b/pkg/pmapi/observer.go index d7a3a7bec..f710516c3 100644 --- a/pkg/pmapi/observer.go +++ b/pkg/pmapi/observer.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/paging.go b/pkg/pmapi/paging.go index 13b24460d..9614d7291 100644 --- a/pkg/pmapi/paging.go +++ b/pkg/pmapi/paging.go @@ -1,25 +1,25 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi const defaultPageSize = 100 -func doPaged(elements []string, pageSize int, fn func([]string) error) error { //nolint[unparam] +func doPaged(elements []string, pageSize int, fn func([]string) error) error { //nolint:unparam for len(elements) > pageSize { if err := fn(elements[:pageSize]); err != nil { return err diff --git a/pkg/pmapi/passwords.go b/pkg/pmapi/passwords.go index 7b9ea863a..f03628ad9 100644 --- a/pkg/pmapi/passwords.go +++ b/pkg/pmapi/passwords.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/passwords_test.go b/pkg/pmapi/passwords_test.go index 9fd01ab6a..6c9440d2a 100644 --- a/pkg/pmapi/passwords_test.go +++ b/pkg/pmapi/passwords_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/pmapi.go b/pkg/pmapi/pmapi.go index 467059334..52429475c 100644 --- a/pkg/pmapi/pmapi.go +++ b/pkg/pmapi/pmapi.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -21,4 +21,4 @@ import ( "github.com/sirupsen/logrus" ) -var log = logrus.WithField("pkg", "pmapi") //nolint[gochecknoglobals] +var log = logrus.WithField("pkg", "pmapi") //nolint:gochecknoglobals diff --git a/pkg/pmapi/pmapi_test.go b/pkg/pmapi/pmapi_test.go index 51ac2aa5e..b75306ba6 100644 --- a/pkg/pmapi/pmapi_test.go +++ b/pkg/pmapi/pmapi_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -62,7 +62,7 @@ func init() { } } -func readTestFile(name string, trimNewlines bool) string { // nolint[unparam] +func readTestFile(name string, trimNewlines bool) string { //nolint:unparam data, err := ioutil.ReadFile("testdata/" + name) if err != nil { panic(err) diff --git a/pkg/pmapi/response.go b/pkg/pmapi/response.go index bc399569d..12146009d 100644 --- a/pkg/pmapi/response.go +++ b/pkg/pmapi/response.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -112,7 +112,7 @@ func catchRetryAfter(_ *resty.Client, res *resty.Response) (time.Duration, error } // To avoid spikes when all clients retry at the same time, we add some random wait. - seconds += rand.Intn(10) //nolint[gosec] It is OK to use weak random number generator here. + seconds += rand.Intn(10) //nolint:gosec // It is OK to use weak random number generator here. log.Warningf("Retrying %s after %ds induced by http code %d", res.Request.URL, seconds, res.StatusCode()) return time.Duration(seconds) * time.Second, nil diff --git a/pkg/pmapi/server_test.go b/pkg/pmapi/server_test.go index f46d6a3b2..e85ff25bd 100644 --- a/pkg/pmapi/server_test.go +++ b/pkg/pmapi/server_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi @@ -127,11 +127,11 @@ func checkHeader(h http.Header, field, exp string) error { return nil } -func isAuthReq(r *http.Request, uid, token string) error { //nolint[unparam] always retrieves testUID +func isAuthReq(r *http.Request, uid, token string) error { //nolint:unparam always retrieves testUID if err := checkHeader(r.Header, "x-pm-uid", uid); err != nil { return err } - if err := checkHeader(r.Header, "authorization", "Bearer "+token); err != nil { //nolint[revive] can return the error right away but this is easier to read + if err := checkHeader(r.Header, "authorization", "Bearer "+token); err != nil { //nolint:revive can return the error right away but this is easier to read return err } return nil diff --git a/pkg/pmapi/settings.go b/pkg/pmapi/settings.go index 0f912e25d..e5c71e638 100644 --- a/pkg/pmapi/settings.go +++ b/pkg/pmapi/settings.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/users.go b/pkg/pmapi/users.go index b57a3194a..161f4218e 100644 --- a/pkg/pmapi/users.go +++ b/pkg/pmapi/users.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/users_test.go b/pkg/pmapi/users_test.go index 1a058dd79..750c98504 100644 --- a/pkg/pmapi/users_test.go +++ b/pkg/pmapi/users_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pmapi/utils.go b/pkg/pmapi/utils.go index b28c585e9..e6c9adfca 100644 --- a/pkg/pmapi/utils.go +++ b/pkg/pmapi/utils.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pmapi diff --git a/pkg/pool/pool.go b/pkg/pool/pool.go index 7151c44c9..3f760017f 100644 --- a/pkg/pool/pool.go +++ b/pkg/pool/pool.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pool diff --git a/pkg/pool/pool_test.go b/pkg/pool/pool_test.go index 7b171c52b..3beb9174b 100644 --- a/pkg/pool/pool_test.go +++ b/pkg/pool/pool_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package pool_test diff --git a/pkg/ports/ports.go b/pkg/ports/ports.go index 8aa7c96cb..5b75ba8b1 100644 --- a/pkg/ports/ports.go +++ b/pkg/ports/ports.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package ports diff --git a/pkg/ports/ports_test.go b/pkg/ports/ports_test.go index 27b5dda1c..55619800c 100644 --- a/pkg/ports/ports_test.go +++ b/pkg/ports/ports_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package ports diff --git a/pkg/semaphore/semaphore.go b/pkg/semaphore/semaphore.go index 53990b235..4d5e33438 100644 --- a/pkg/semaphore/semaphore.go +++ b/pkg/semaphore/semaphore.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package semaphore diff --git a/pkg/signature/signature.go b/pkg/signature/signature.go index b8018a57f..4264dfc00 100644 --- a/pkg/signature/signature.go +++ b/pkg/signature/signature.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package signature implements functions to verify files by their detached signatures. package signature diff --git a/pkg/sum/sum.go b/pkg/sum/sum.go index c1d6e93e0..f094c5d52 100644 --- a/pkg/sum/sum.go +++ b/pkg/sum/sum.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package sum @@ -67,7 +67,7 @@ func RecursiveSum(rootDir, skipFileName string) ([]byte, error) { log.WithError(err).Error("Failed to write path") return err } - f, err := os.Open(path) // nolint[gosec] + f, err := os.Open(path) //nolint:gosec if err != nil { log.WithError(err).Error("Failed to open file") return err diff --git a/pkg/sum/sum_test.go b/pkg/sum/sum_test.go index 9c138000d..9bda7a487 100644 --- a/pkg/sum/sum_test.go +++ b/pkg/sum/sum_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package sum diff --git a/pkg/tar/tar.go b/pkg/tar/tar.go index 47f84e7ed..24154665c 100644 --- a/pkg/tar/tar.go +++ b/pkg/tar/tar.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tar @@ -83,7 +83,7 @@ func UntarToDir(r io.Reader, dir string) error { } default: - f, err := os.Create(target) + f, err := os.Create(filepath.Clean(target)) if err != nil { return err } diff --git a/test/accounts/account.go b/test/accounts/account.go index b5520be33..31f65dd0a 100644 --- a/test/accounts/account.go +++ b/test/accounts/account.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package accounts @@ -90,7 +90,7 @@ func (a *TestAccount) initKeys() { func readTestFile(fileName string) []byte { testDataFolder := os.Getenv("TEST_DATA") path := filepath.Join(testDataFolder, fileName) - data, err := ioutil.ReadFile(path) //nolint[gosec] + data, err := ioutil.ReadFile(path) //nolint:gosec if err != nil { panic(err) } diff --git a/test/accounts/accounts.go b/test/accounts/accounts.go index 6a8d28f28..332b93c94 100644 --- a/test/accounts/accounts.go +++ b/test/accounts/accounts.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package accounts @@ -37,7 +37,7 @@ type TestAccounts struct { } func Load(path string) (*TestAccounts, error) { - data, err := ioutil.ReadFile(path) //nolint[gosec] + data, err := ioutil.ReadFile(path) //nolint:gosec if err != nil { return nil, errors.Wrap(err, "failed to load JSON") } diff --git a/test/api_actions_test.go b/test/api_actions_test.go index 55ffdb23c..e443d6ced 100644 --- a/test/api_actions_test.go +++ b/test/api_actions_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/api_checks_test.go b/test/api_checks_test.go index 0cc99cedc..071503b7a 100644 --- a/test/api_checks_test.go +++ b/test/api_checks_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/api_setup_test.go b/test/api_setup_test.go index 298866c6c..caa65f084 100644 --- a/test/api_setup_test.go +++ b/test/api_setup_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/bdd_test.go b/test/bdd_test.go index 4cf00bc9b..c954ab392 100644 --- a/test/bdd_test.go +++ b/test/bdd_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests @@ -64,7 +64,7 @@ func ScenarioInitializer(s *godog.ScenarioContext) { UsersChecksFeatureContext(s) } -var ctx *testContext.TestContext //nolint[gochecknoglobals] +var ctx *testContext.TestContext //nolint:gochecknoglobals func beforeScenario(scenarioCtx context.Context, _ *godog.Scenario) (context.Context, error) { ctx = testContext.New() diff --git a/test/benchmarks/bench_results/human-table.py b/test/benchmarks/bench_results/human-table.py index fc39afd88..5ccd0788e 100644 --- a/test/benchmarks/bench_results/human-table.py +++ b/test/benchmarks/bench_results/human-table.py @@ -1,21 +1,21 @@ #!/usr/bin/env python -# Copyright (c) 2022 Proton Technologies AG +# Copyright (c) 2022 Proton AG # -# This file is part of ProtonMail Bridge. +# This file is part of Proton Mail Bridge. # -# ProtonMail Bridge is free software: you can redistribute it and/or modify +# Proton Mail Bridge is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# ProtonMail Bridge is distributed in the hope that it will be useful, +# Proton Mail Bridge is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with ProtonMail Bridge. If not, see . +# along with Proton Mail Bridge. If not, see . import glob diff --git a/test/benchmarks/bench_test.go b/test/benchmarks/bench_test.go index f650f70e4..c48abbf63 100644 --- a/test/benchmarks/bench_test.go +++ b/test/benchmarks/bench_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package benchmarks diff --git a/test/bridge_actions_test.go b/test/bridge_actions_test.go index cfebb39b1..0cea6bac1 100644 --- a/test/bridge_actions_test.go +++ b/test/bridge_actions_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/common_checks_test.go b/test/common_checks_test.go index 3ed7e2c15..580426c2b 100644 --- a/test/common_checks_test.go +++ b/test/common_checks_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/context/accounts.go b/test/context/accounts.go index 73d0c97f1..1b1e1ab4c 100644 --- a/test/context/accounts.go +++ b/test/context/accounts.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/bddt.go b/test/context/bddt.go index 91df4a523..ad3a6089d 100644 --- a/test/context/bddt.go +++ b/test/context/bddt.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/bridge.go b/test/context/bridge.go index df3343e09..74bdd9def 100644 --- a/test/context/bridge.go +++ b/test/context/bridge.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/bridge_panic_handler.go b/test/context/bridge_panic_handler.go index c60204fdb..7aa040413 100644 --- a/test/context/bridge_panic_handler.go +++ b/test/context/bridge_panic_handler.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/cache.go b/test/context/cache.go index aedd37249..db6489f93 100644 --- a/test/context/cache.go +++ b/test/context/cache.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/calls/calls.go b/test/context/calls/calls.go index 22c0d848b..c4cd48713 100644 --- a/test/context/calls/calls.go +++ b/test/context/calls/calls.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package calls diff --git a/test/context/cleaner.go b/test/context/cleaner.go index a52339048..5eba9fa9a 100644 --- a/test/context/cleaner.go +++ b/test/context/cleaner.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/context.go b/test/context/context.go index 409ae56d0..3bdd8cc68 100644 --- a/test/context/context.go +++ b/test/context/context.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . // Package context allows integration tests to be written in a fluent, english-like way. package context @@ -147,7 +147,7 @@ func (ctx *TestContext) GetUserAgent() string { } // GetTestingT returns testing.T compatible struct. -func (ctx *TestContext) GetTestingT() *bddT { //nolint[golint] +func (ctx *TestContext) GetTestingT() *bddT { //nolint:revive return ctx.t } @@ -174,5 +174,5 @@ func (ctx *TestContext) MessagePreparationFinished(username string) { } func (ctx *TestContext) CredentialsFailsOnWrite(shouldFail bool) { - ctx.credStore.(*fakeCredStore).failOnWrite = shouldFail + ctx.credStore.(*fakeCredStore).failOnWrite = shouldFail //nolint:forcetypeassert } diff --git a/test/context/credentials.go b/test/context/credentials.go index c0f78fff8..655111659 100644 --- a/test/context/credentials.go +++ b/test/context/credentials.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/environments.go b/test/context/environments.go index ecd67d914..6891fd753 100644 --- a/test/context/environments.go +++ b/test/context/environments.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/globals.go b/test/context/globals.go index dbc37f340..3cda19bee 100644 --- a/test/context/globals.go +++ b/test/context/globals.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/imap.go b/test/context/imap.go index a853ca264..1eef3eb09 100644 --- a/test/context/imap.go +++ b/test/context/imap.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/locations.go b/test/context/locations.go index 62613f825..bd7d8f5ce 100644 --- a/test/context/locations.go +++ b/test/context/locations.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/pmapi_controller.go b/test/context/pmapi_controller.go index 434fe4717..d8aed4295 100644 --- a/test/context/pmapi_controller.go +++ b/test/context/pmapi_controller.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/settings.go b/test/context/settings.go index 3a14802da..f9812c8d5 100644 --- a/test/context/settings.go +++ b/test/context/settings.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context @@ -43,8 +43,8 @@ func newFakeSettings() *fakeSettings { } // We should use nonstandard ports to not conflict with bridge. - s.SetInt(settings.IMAPPortKey, 21100+rand.Intn(100)) //nolint[gosec] G404 It is OK to use weak random number generator here - s.SetInt(settings.SMTPPortKey, 21200+rand.Intn(100)) //nolint[gosec] G404 It is OK to use weak random number generator here + s.SetInt(settings.IMAPPortKey, 21100+rand.Intn(100)) //nolint:gosec // G404 It is OK to use weak random number generator here + s.SetInt(settings.SMTPPortKey, 21200+rand.Intn(100)) //nolint:gosec // G404 It is OK to use weak random number generator here return s } diff --git a/test/context/smtp.go b/test/context/smtp.go index 198ce9991..ac0511f0d 100644 --- a/test/context/smtp.go +++ b/test/context/smtp.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/store.go b/test/context/store.go index aca0a360f..e8b9f0506 100644 --- a/test/context/store.go +++ b/test/context/store.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/updater.go b/test/context/updater.go index 7ac0a8265..9664dae65 100644 --- a/test/context/updater.go +++ b/test/context/updater.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/users.go b/test/context/users.go index ccf99f59b..040cdcb96 100644 --- a/test/context/users.go +++ b/test/context/users.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context @@ -39,7 +39,7 @@ func (ctx *TestContext) GetUsers() *users.Users { // LoginUser logs in the user with the given username, password, and mailbox password. func (ctx *TestContext) LoginUser(username string, password, mailboxPassword []byte) error { - srp.RandReader = rand.New(rand.NewSource(42)) //nolint[gosec] It is OK to use weaker random number generator here + srp.RandReader = rand.New(rand.NewSource(42)) //nolint:gosec // It is OK to use weaker random number generator here client, auth, err := ctx.users.Login(username, password) if err != nil { diff --git a/test/context/utils.go b/test/context/utils.go index 26cc7340c..40240e8bf 100644 --- a/test/context/utils.go +++ b/test/context/utils.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/context/versioner.go b/test/context/versioner.go index 07a6cba3c..6998bd2f4 100644 --- a/test/context/versioner.go +++ b/test/context/versioner.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package context diff --git a/test/fakeapi/attachments.go b/test/fakeapi/attachments.go index 9e9d5c4fe..60132f5c5 100644 --- a/test/fakeapi/attachments.go +++ b/test/fakeapi/attachments.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/fakeapi/auth.go b/test/fakeapi/auth.go index bc8d5296d..a814330ab 100644 --- a/test/fakeapi/auth.go +++ b/test/fakeapi/auth.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/fakeapi/contacts.go b/test/fakeapi/contacts.go index e66dc51c9..d880e52f6 100644 --- a/test/fakeapi/contacts.go +++ b/test/fakeapi/contacts.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/fakeapi/controller.go b/test/fakeapi/controller.go index ef31274b6..70b0e84e0 100644 --- a/test/fakeapi/controller.go +++ b/test/fakeapi/controller.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/fakeapi/controller_calls.go b/test/fakeapi/controller_calls.go index be67bd8fb..328b3d979 100644 --- a/test/fakeapi/controller_calls.go +++ b/test/fakeapi/controller_calls.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/fakeapi/controller_control.go b/test/fakeapi/controller_control.go index c3345d60a..00d25e415 100644 --- a/test/fakeapi/controller_control.go +++ b/test/fakeapi/controller_control.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi @@ -28,7 +28,7 @@ import ( "github.com/ProtonMail/proton-bridge/test/accounts" ) -var systemLabelNameToID = map[string]string{ //nolint[gochecknoglobals] +var systemLabelNameToID = map[string]string{ //nolint:gochecknoglobals "INBOX": pmapi.InboxLabel, "Trash": pmapi.TrashLabel, "Spam": pmapi.SpamLabel, diff --git a/test/fakeapi/controller_session.go b/test/fakeapi/controller_session.go index a4a0a5f33..cecde2477 100644 --- a/test/fakeapi/controller_session.go +++ b/test/fakeapi/controller_session.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi @@ -30,7 +30,7 @@ type fakeSession struct { hasFullScope bool } -var errWrongNameOrPassword = errors.New("Incorrect login credentials. Please try again") //nolint[stylecheck] +var errWrongNameOrPassword = errors.New("Incorrect login credentials. Please try again") //nolint:stylecheck func (ctl *Controller) checkAccessToken(uid, acc string) bool { session, ok := ctl.sessionsByUID[uid] diff --git a/test/fakeapi/controller_user.go b/test/fakeapi/controller_user.go index 16a3de061..01c9e534b 100644 --- a/test/fakeapi/controller_user.go +++ b/test/fakeapi/controller_user.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/fakeapi/counts.go b/test/fakeapi/counts.go index ce1378ffb..db04e894a 100644 --- a/test/fakeapi/counts.go +++ b/test/fakeapi/counts.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/fakeapi/download.go b/test/fakeapi/download.go index 5d3a48474..e20060f61 100644 --- a/test/fakeapi/download.go +++ b/test/fakeapi/download.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/fakeapi/events.go b/test/fakeapi/events.go index 6b9bf6dd6..e9c181ad2 100644 --- a/test/fakeapi/events.go +++ b/test/fakeapi/events.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/fakeapi/fakeapi.go b/test/fakeapi/fakeapi.go index 771085d7f..5bd1ae641 100644 --- a/test/fakeapi/fakeapi.go +++ b/test/fakeapi/fakeapi.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi @@ -120,7 +120,7 @@ func (api *FakePMAPI) checkAndRecordCall(method method, path string, request int } if path != "/auth/2fa" && !api.controller.checkScope(api.uid) { - return errors.New("Access token does not have sufficient scope") //nolint[stylecheck] + return errors.New("Access token does not have sufficient scope") //nolint:stylecheck } return nil diff --git a/test/fakeapi/idgenerator.go b/test/fakeapi/idgenerator.go index 929ba62f2..3fcf9c2b1 100644 --- a/test/fakeapi/idgenerator.go +++ b/test/fakeapi/idgenerator.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/fakeapi/keys.go b/test/fakeapi/keys.go index 6e7496a62..49cd62237 100644 --- a/test/fakeapi/keys.go +++ b/test/fakeapi/keys.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/fakeapi/labels.go b/test/fakeapi/labels.go index 81e48f8ef..083681f26 100644 --- a/test/fakeapi/labels.go +++ b/test/fakeapi/labels.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/fakeapi/manager.go b/test/fakeapi/manager.go index cd0a86928..98eb20d84 100644 --- a/test/fakeapi/manager.go +++ b/test/fakeapi/manager.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/fakeapi/messages.go b/test/fakeapi/messages.go index 348eae419..8ccb2fd40 100644 --- a/test/fakeapi/messages.go +++ b/test/fakeapi/messages.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi @@ -207,7 +207,7 @@ func (api *FakePMAPI) Import(_ context.Context, importMessageRequests pmapi.Impo } func (api *FakePMAPI) generateMessageFromImportRequest(msgReq *pmapi.ImportMsgReq) (*pmapi.Message, error) { - m, _, _, _, err := message.Parse(bytes.NewReader(msgReq.Message)) // nolint[dogsled] + m, _, _, _, err := message.Parse(bytes.NewReader(msgReq.Message)) //nolint:dogsled if err != nil { return nil, err } @@ -418,7 +418,7 @@ func (api *FakePMAPI) MarkMessagesUnread(_ context.Context, apiIDs []string) err return nil } -func (api *FakePMAPI) updateMessages(method method, path string, request interface{}, apiIDs []string, updateCallback func(*pmapi.Message) error) error { //nolint[unparam] +func (api *FakePMAPI) updateMessages(method method, path string, request interface{}, apiIDs []string, updateCallback func(*pmapi.Message) error) error { //nolint:unparam if err := api.checkAndRecordCall(method, path, request); err != nil { return err } diff --git a/test/fakeapi/user.go b/test/fakeapi/user.go index e7b71e9f6..3ba77e7ec 100644 --- a/test/fakeapi/user.go +++ b/test/fakeapi/user.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/fakeapi/utils.go b/test/fakeapi/utils.go index 864a38118..52669a173 100644 --- a/test/fakeapi/utils.go +++ b/test/fakeapi/utils.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package fakeapi diff --git a/test/imap_actions_auth_test.go b/test/imap_actions_auth_test.go index 809b12865..e40d66726 100644 --- a/test/imap_actions_auth_test.go +++ b/test/imap_actions_auth_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/imap_actions_mailbox_test.go b/test/imap_actions_mailbox_test.go index a164bf09f..e85fcce20 100644 --- a/test/imap_actions_mailbox_test.go +++ b/test/imap_actions_mailbox_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/imap_actions_messages_test.go b/test/imap_actions_messages_test.go index c1ba3a70c..297857b9a 100644 --- a/test/imap_actions_messages_test.go +++ b/test/imap_actions_messages_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/imap_checks_test.go b/test/imap_checks_test.go index bc37c3e98..f899161c3 100644 --- a/test/imap_checks_test.go +++ b/test/imap_checks_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/imap_setup_test.go b/test/imap_setup_test.go index e90c91886..925fe6532 100644 --- a/test/imap_setup_test.go +++ b/test/imap_setup_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/internal_error.go b/test/internal_error.go index d2ef36246..a049785d1 100644 --- a/test/internal_error.go +++ b/test/internal_error.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/keyring.go b/test/keyring.go index f9e0f6a61..414a0ce1e 100644 --- a/test/keyring.go +++ b/test/keyring.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/liveapi/calls.go b/test/liveapi/calls.go index 96aa224fd..08c997cc9 100644 --- a/test/liveapi/calls.go +++ b/test/liveapi/calls.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package liveapi diff --git a/test/liveapi/cleanup.go b/test/liveapi/cleanup.go index e3dc7f746..c47d07802 100644 --- a/test/liveapi/cleanup.go +++ b/test/liveapi/cleanup.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package liveapi diff --git a/test/liveapi/controller.go b/test/liveapi/controller.go index 675cb3989..e7af7d661 100644 --- a/test/liveapi/controller.go +++ b/test/liveapi/controller.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package liveapi diff --git a/test/liveapi/events.go b/test/liveapi/events.go index 2791f560d..c1b690356 100644 --- a/test/liveapi/events.go +++ b/test/liveapi/events.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package liveapi diff --git a/test/liveapi/labels.go b/test/liveapi/labels.go index 7f60bffad..84a03c0a2 100644 --- a/test/liveapi/labels.go +++ b/test/liveapi/labels.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package liveapi @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" ) -var systemLabelNameToID = map[string]string{ //nolint[gochecknoglobals] +var systemLabelNameToID = map[string]string{ //nolint:gochecknoglobals "INBOX": pmapi.InboxLabel, "Trash": pmapi.TrashLabel, "Spam": pmapi.SpamLabel, diff --git a/test/liveapi/messages.go b/test/liveapi/messages.go index 0502ec5df..8110e5285 100644 --- a/test/liveapi/messages.go +++ b/test/liveapi/messages.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package liveapi diff --git a/test/liveapi/persistent_clients.go b/test/liveapi/persistent_clients.go index 35680068e..f076ebe73 100644 --- a/test/liveapi/persistent_clients.go +++ b/test/liveapi/persistent_clients.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package liveapi diff --git a/test/liveapi/transport.go b/test/liveapi/transport.go index 35598da01..02e406e67 100644 --- a/test/liveapi/transport.go +++ b/test/liveapi/transport.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package liveapi diff --git a/test/liveapi/users.go b/test/liveapi/users.go index 79fc03e55..a3d7321a6 100644 --- a/test/liveapi/users.go +++ b/test/liveapi/users.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package liveapi diff --git a/test/main_test.go b/test/main_test.go index 14bd5112c..032abe3bc 100644 --- a/test/main_test.go +++ b/test/main_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests @@ -27,12 +27,12 @@ import ( "github.com/cucumber/godog/colors" ) -var opt = godog.Options{ //nolint[gochecknoglobals] +var opt = godog.Options{ //nolint:gochecknoglobals Output: colors.Colored(os.Stdout), Format: "progress", // can define default values } -func init() { //nolint[gochecknoinits] +func init() { //nolint:gochecknoinits godog.BindCommandLineFlags("godog.", &opt) // This would normally be done using ldflags but `godog` command doesn't support that. diff --git a/test/mocks/debug.go b/test/mocks/debug.go index de1ed3daf..a17a4c697 100644 --- a/test/mocks/debug.go +++ b/test/mocks/debug.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package mocks diff --git a/test/mocks/imap_client.go b/test/mocks/imap_client.go index 78c88d6fd..4ac3f2a36 100644 --- a/test/mocks/imap_client.go +++ b/test/mocks/imap_client.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package mocks @@ -101,7 +101,7 @@ func (c *IMAPClient) ListMailboxes() *IMAPResponse { } func (c *IMAPClient) Select(mailboxName string) *IMAPResponse { - return c.SendCommand(fmt.Sprintf("SELECT \"%s\"", mailboxName)) //nolint[gosec] + return c.SendCommand(fmt.Sprintf("SELECT \"%s\"", mailboxName)) //nolint:gosec } func (c *IMAPClient) CreateMailbox(mailboxName string) *IMAPResponse { @@ -109,7 +109,7 @@ func (c *IMAPClient) CreateMailbox(mailboxName string) *IMAPResponse { } func (c *IMAPClient) DeleteMailbox(mailboxName string) *IMAPResponse { - return c.SendCommand(fmt.Sprintf("DELETE \"%s\"", mailboxName)) //nolint[gosec] + return c.SendCommand(fmt.Sprintf("DELETE \"%s\"", mailboxName)) //nolint:gosec } func (c *IMAPClient) RenameMailbox(mailboxName, newMailboxName string) *IMAPResponse { diff --git a/test/mocks/imap_response.go b/test/mocks/imap_response.go index da79b4edb..745192576 100644 --- a/test/mocks/imap_response.go +++ b/test/mocks/imap_response.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package mocks @@ -37,7 +37,7 @@ type IMAPResponse struct { done bool } -func (ir *IMAPResponse) sendCommand(reqTag string, reqIndex int, command string, debug *debug, conn io.Writer, response *bufio.Reader) { //nolint[interfacer] +func (ir *IMAPResponse) sendCommand(reqTag string, reqIndex int, command string, debug *debug, conn io.Writer, response *bufio.Reader) { //nolint:interfacer defer func() { ir.done = true }() tstart := time.Now() @@ -73,7 +73,7 @@ func (ir *IMAPResponse) sendCommand(reqTag string, reqIndex int, command string, } debug.printRes(line) - if strings.HasPrefix(line, "* ") { //nolint[gocritic] + if strings.HasPrefix(line, "* ") { //nolint:gocritic if section != "" { ir.sections = append(ir.sections, section) } diff --git a/test/mocks/imap_server.go b/test/mocks/imap_server.go index 5177cb91f..c4f9492dc 100644 --- a/test/mocks/imap_server.go +++ b/test/mocks/imap_server.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package mocks diff --git a/test/mocks/smtp.go b/test/mocks/smtp.go index 475845eac..008eb9b41 100644 --- a/test/mocks/smtp.go +++ b/test/mocks/smtp.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package mocks @@ -136,11 +136,11 @@ func (c *SMTPClient) Logout() *SMTPResponse { // Sending func (c *SMTPClient) EML(fileName, bcc string) *SMTPResponse { - f, err := os.Open(fileName) //nolint[gosec] + f, err := os.Open(fileName) //nolint:gosec if err != nil { panic(fmt.Errorf("smtp eml open: %s", err)) } - defer f.Close() //nolint[errcheck] + defer f.Close() //nolint:errcheck,gosec return c.SendMail(f, bcc) } diff --git a/test/mocks/smtp_response.go b/test/mocks/smtp_response.go index 758c32336..1a427b2fa 100644 --- a/test/mocks/smtp_response.go +++ b/test/mocks/smtp_response.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package mocks diff --git a/test/mocks/testingt.go b/test/mocks/testingt.go index bac1f82be..0af406fd5 100644 --- a/test/mocks/testingt.go +++ b/test/mocks/testingt.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package mocks diff --git a/test/mocks/utils.go b/test/mocks/utils.go index 33430b848..5cbcd90eb 100644 --- a/test/mocks/utils.go +++ b/test/mocks/utils.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package mocks diff --git a/test/smtp_actions_test.go b/test/smtp_actions_test.go index 04f1cf87b..5af600860 100644 --- a/test/smtp_actions_test.go +++ b/test/smtp_actions_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/smtp_checks_test.go b/test/smtp_checks_test.go index 19afeca7b..85b2d25b0 100644 --- a/test/smtp_checks_test.go +++ b/test/smtp_checks_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/smtp_setup_test.go b/test/smtp_setup_test.go index 4a1fda204..d3381d60d 100644 --- a/test/smtp_setup_test.go +++ b/test/smtp_setup_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/store_actions_test.go b/test/store_actions_test.go index f2b440d84..027112959 100644 --- a/test/store_actions_test.go +++ b/test/store_actions_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/store_checks_test.go b/test/store_checks_test.go index c597ce1d2..f7c4fd062 100644 --- a/test/store_checks_test.go +++ b/test/store_checks_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests @@ -188,7 +188,7 @@ func storeMessagesContainsMessageRow(account *accounts.TestAccount, storeMessage return messagesContainsMessageRow(account, messages, head, row) } -func messagesContainsMessageRow(account *accounts.TestAccount, allMessages []interface{}, head []*messages.PickleTableCell, row *messages.PickleTableRow) (bool, error) { //nolint[funlen] +func messagesContainsMessageRow(account *accounts.TestAccount, allMessages []interface{}, head []*messages.PickleTableCell, row *messages.PickleTableRow) (bool, error) { //nolint:funlen,gocyclo found := false for _, someMessage := range allMessages { var message *pmapi.Message @@ -217,12 +217,12 @@ func messagesContainsMessageRow(account *accounts.TestAccount, allMessages []int if message.ExternalID != cell.Value { matches = false } - case "from": //nolint[goconst] + case "from": //nolint:goconst address := ctx.EnsureAddress(account.Username(), cell.Value) if !areAddressesSame(message.Sender.Address, address) { matches = false } - case "to": //nolint[goconst] + case "to": //nolint:goconst for _, address := range strings.Split(cell.Value, ",") { address = ctx.EnsureAddress(account.Username(), address) for _, to := range message.ToList { @@ -242,7 +242,7 @@ func messagesContainsMessageRow(account *accounts.TestAccount, allMessages []int } } } - case "subject": //nolint[goconst] + case "subject": //nolint:goconst expectedSubject := cell.Value if expectedSubject == "" { expectedSubject = "(No Subject)" @@ -250,13 +250,13 @@ func messagesContainsMessageRow(account *accounts.TestAccount, allMessages []int if message.Subject != expectedSubject { matches = false } - case "body": //nolint[goconst] + case "body": //nolint:goconst if message.Body != cell.Value { matches = false } case "read": var unread pmapi.Boolean - if cell.Value == "true" { //nolint[goconst] + if cell.Value == "true" { //nolint:goconst unread = false } else { unread = true @@ -265,7 +265,7 @@ func messagesContainsMessageRow(account *accounts.TestAccount, allMessages []int if message.Unread != unread { matches = false } - case "deleted": //nolint[goconst] + case "deleted": //nolint:goconst if storeMessage == nil { return false, fmt.Errorf("deleted column not supported for pmapi message object") } diff --git a/test/store_setup_test.go b/test/store_setup_test.go index d1eb106ec..def49daf9 100644 --- a/test/store_setup_test.go +++ b/test/store_setup_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests @@ -194,7 +194,7 @@ func processMessageTableCell(column, cellValue, username string, message *pmapi. case "read": var unread pmapi.Boolean - if cellValue == "true" { //nolint[goconst] + if cellValue == "true" { //nolint:goconst unread = false } else { unread = true @@ -205,7 +205,7 @@ func processMessageTableCell(column, cellValue, username string, message *pmapi. if cellValue == "true" { message.LabelIDs = append(message.LabelIDs, "10") } - case "time": //nolint[goconst] It is more easy to read like this + case "time": //nolint:goconst It is more easy to read like this date, err := time.Parse(timeFormat, cellValue) if err != nil { return internalError(err, "parsing time") diff --git a/test/users_actions_test.go b/test/users_actions_test.go index b0d7905dd..9f0ae8b55 100644 --- a/test/users_actions_test.go +++ b/test/users_actions_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/users_checks_test.go b/test/users_checks_test.go index e32ea4581..1dcd2ab12 100644 --- a/test/users_checks_test.go +++ b/test/users_checks_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests diff --git a/test/users_setup_test.go b/test/users_setup_test.go index 30eb2acdc..21f16d860 100644 --- a/test/users_setup_test.go +++ b/test/users_setup_test.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge.Bridge. +// This file is part of Proton Mail Bridge.Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package tests @@ -124,7 +124,7 @@ func thereIsNoDatabaseFileForUser(bddUserID string) error { } filePath := ctx.GetDatabaseFilePath(account.UserID()) if _, err := os.Stat(filePath); err != nil { - return nil //nolint[nilerr] Error means the file is not there or not accessible so test passed + return nil //nolint:nilerr // Error means the file is not there or not accessible so test passed } return internalError(os.Remove(filePath), "removing database file of %s", account.Username()) } diff --git a/utils/changelog_linter.sh b/utils/changelog_linter.sh index 4949aabba..d1e54820c 100755 --- a/utils/changelog_linter.sh +++ b/utils/changelog_linter.sh @@ -1,21 +1,21 @@ #!/bin/bash -# Copyright (c) 2022 Proton Technologies AG +# Copyright (c) 2022 Proton AG # -# This file is part of ProtonMail Bridge. +# This file is part of Proton Mail Bridge. # -# ProtonMail Bridge is free software: you can redistribute it and/or modify +# Proton Mail Bridge is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# ProtonMail Bridge is distributed in the hope that it will be useful, +# Proton Mail Bridge is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with ProtonMail Bridge. If not, see . +# along with Proton Mail Bridge. If not, see . if [ $# -ne 1 ]; then echo "First argument must be path to file" diff --git a/utils/credits.sh b/utils/credits.sh index abf121405..9f56e5348 100755 --- a/utils/credits.sh +++ b/utils/credits.sh @@ -1,21 +1,21 @@ #!/bin/bash -# Copyright (c) 2022 Proton Technologies AG +# Copyright (c) 2022 Proton AG # -# This file is part of ProtonMail Bridge. +# This file is part of Proton Mail Bridge. # -# ProtonMail Bridge is free software: you can redistribute it and/or modify +# Proton Mail Bridge is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# ProtonMail Bridge is distributed in the hope that it will be useful, +# Proton Mail Bridge is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with ProtonMail Bridge. If not, see . +# along with Proton Mail Bridge. If not, see . ## Generate credits from go.mod diff --git a/utils/githooks/pre-push b/utils/githooks/pre-push index 5d701387d..4f93d2a9a 100644 --- a/utils/githooks/pre-push +++ b/utils/githooks/pre-push @@ -1,21 +1,21 @@ #!/bin/sh -# Copyright (c) 2021 Proton Technologies AG +# Copyright (c) 2022 Proton AG # -# This file is part of ProtonMail Bridge. +# This file is part of Proton Mail Bridge. # -# ProtonMail Bridge is free software: you can redistribute it and/or modify +# Proton Mail Bridge is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# ProtonMail Bridge is distributed in the hope that it will be useful, +# Proton Mail Bridge is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with ProtonMail Bridge. If not, see . +# along with Proton Mail Bridge. If not, see . # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been diff --git a/utils/hasher/main.go b/utils/hasher/main.go index 278e5b644..65bbf2466 100644 --- a/utils/hasher/main.go +++ b/utils/hasher/main.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package main @@ -32,7 +32,7 @@ func main() { } } -func createApp() *cli.App { // nolint[funlen] +func createApp() *cli.App { //nolint:funlen app := cli.NewApp() app.Name = "hasher" diff --git a/utils/license_header.txt b/utils/license_header.txt index 77331add1..6aabe6ec5 100644 --- a/utils/license_header.txt +++ b/utils/license_header.txt @@ -1,17 +1,17 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . diff --git a/utils/missing_license.sh b/utils/missing_license.sh index 1da91b3ef..d10932f48 100755 --- a/utils/missing_license.sh +++ b/utils/missing_license.sh @@ -1,21 +1,21 @@ #!/bin/bash -# Copyright (c) 2022 Proton Technologies AG +# Copyright (c) 2022 Proton AG # -# This file is part of ProtonMail Bridge. +# This file is part of Proton Mail Bridge. # -# ProtonMail Bridge is free software: you can redistribute it and/or modify +# Proton Mail Bridge is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# ProtonMail Bridge is distributed in the hope that it will be useful, +# Proton Mail Bridge is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with ProtonMail Bridge. If not, see . +# along with Proton Mail Bridge. If not, see . YEAR=`date +%Y` MISSING_FILES=$(find . \ @@ -24,7 +24,7 @@ MISSING_FILES=$(find . \ -not -path "./.cache/*" \ -not -name "*mock*.go" \ -regextype posix-egrep -regex ".*\.go|.*\.qml|.*\.sh|.*\.py" \ - -exec grep -L "Copyright (c) ${YEAR} Proton Technologies AG" {} \;) + -exec grep -L "Copyright (c) ${YEAR} Proton AG" {} \;) for f in ${MISSING_FILES} do @@ -37,7 +37,7 @@ do fi if [[ $1 == "change-year" ]] then - sed -i "s/Copyright (c) [0-9]\\{4\\} Proton Technologies AG/Copyright (c) ${YEAR} Proton Technologies AG/" $f || exit 3 + sed -i "s/Copyright (c) [0-9]\\{4\\} Proton AG/Copyright (c) ${YEAR} Proton AG/" $f || exit 3 echo -n "... replaced copyright year" fi echo diff --git a/utils/rebranding.sh b/utils/rebranding.sh new file mode 100755 index 000000000..f87f45db0 --- /dev/null +++ b/utils/rebranding.sh @@ -0,0 +1,100 @@ +##!/bin/bash + +# Copyright (c) 2022 Proton AG +# +# This file is part of Proton Mail Bridge. +# +# Proton Mail Bridge is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Proton Mail Bridge is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Proton Mail Bridge. If not, see . + + +REPLACE_FILES=$(find . -not -path "./vendor/*" \ + -not -path "./vendor-cache/*" \ + -not -path "./.cache/*" \ + -not -name "*mock*.go" \ + -regextype posix-egrep \ + -regex ".*\.go|.*\.qml|qmldir|.*\.qmlproject|.*\.txt|.*\.md|.*\.h|.*\.cpp|.*\.m|.*\.sh|.*\.py" \ + -exec grep -L "Copyright (c) 2022 Proton AG" {} \;) + +for f in ${REPLACE_FILES} +do + if [[ $f =~ rebranding.sh ]]; then continue; fi; + echo "replacing $f" + + # This file is part of Proton Mail Bridge. + # Proton Mail Bridge is free software: you can redistribute it and/or modify + # Proton Mail Bridge is distributed in the hope that it will be useful, + # along with Proton Mail Bridge. If not, see . + # Copyright (c) 2022 Proton AG + for repl in \ + "s/This file is part of ProtonMail Bridge./This file is part of Proton Mail Bridge./" \ + "s/ProtonMail Bridge is free software:/Proton Mail Bridge is free software:/" \ + "s/ProtonMail Bridge is distributed in the hope that it will be useful/Proton Mail Bridge is distributed in the hope that it will be useful/" \ + "s/along with ProtonMail Bridge. If not, see/along with Proton Mail Bridge. If not, see/" \ + "s/along with ProtonMail Bridge. If not, see/along with Proton Mail Bridge. If not, see/" \ + "s/Copyright (c) 2022 Proton Technologies AG/Copyright (c) 2022 Proton AG/" \ + "s/Copyright (c) 2021 Proton Technologies AG/Copyright (c) 2022 Proton AG/" \ + "s/Copyright (c) 2020 Proton Technologies AG/Copyright (c) 2022 Proton AG/" + do + sed -i "$repl" "$f" || exit 3 + done +done + + +## Manual fixes +# ./CONTRIBUTING.md +# ./internal/frontend/qml/Proton/qmldir +# ./utils/githooks/pre-push +# ./BUILDS.md +# ./README.md +# ./Changelog.md +# ./doc/bridge.md + +## Manual greps +# ack ProtonMail | ack -v rebranding | ack -v test | ack -v github.com/ProtonMail | ack ProtonMail +# ack Technologies + +## GUI: use backend or global var +# internal/frontend/qml/Notifications/Notifications.qml +# internal/frontend/qml/StatusWindow.qml +# internal/frontend/qml/MainWindow.qml +# internal/frontend/qml/WelcomeGuide.qml + +## CLI: +# internal/frontend/cli/utils.go +# internal/frontend/cli/frontend.go + +## Config (no migration needed) +# internal/imap/server.go -- IMAP ID +# internal/smtp/user.go -- comment +# internal/config/tls/tls.go -- newly created cert only +# cmd/launcher/main.go (sentry) + +## App rename and installation paths (might have huge impact on functionality) +# cmd/Desktop-Bridge/main.go -- base +# - sentry +# - notifications +# - autostart +# - cli.App name +# - frontend programName +# internal/frontend/share/info.rc +# - Test it works with icon (is used in release?) +# - needs re-install +# dist/proton-bridge.desktop +# - check it works with reinstall, needs reinstall +# internal/locations/locations.go +# - check it works with reinstall, needs reinstall + +## Keep unchanged +# internal/constants/constants.go:23 for locations provider + diff --git a/utils/release_notes.sh b/utils/release_notes.sh index e9cb5ecbe..832a07f21 100755 --- a/utils/release_notes.sh +++ b/utils/release_notes.sh @@ -1,21 +1,21 @@ #!/bin/bash -# Copyright (c) 2022 Proton Technologies AG +# Copyright (c) 2022 Proton AG # -# This file is part of ProtonMail Bridge. +# This file is part of Proton Mail Bridge. # -# ProtonMail Bridge is free software: you can redistribute it and/or modify +# Proton Mail Bridge is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# ProtonMail Bridge is distributed in the hope that it will be useful, +# Proton Mail Bridge is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with ProtonMail Bridge. If not, see . +# along with Proton Mail Bridge. If not, see . # Generate HTML release notes diff --git a/utils/remove_non_relative_links_darwin.sh b/utils/remove_non_relative_links_darwin.sh index 348f40b6e..38a2bb0a0 100755 --- a/utils/remove_non_relative_links_darwin.sh +++ b/utils/remove_non_relative_links_darwin.sh @@ -1,21 +1,21 @@ #!/bin/bash -# Copyright (c) 2022 Proton Technologies AG +# Copyright (c) 2022 Proton AG # -# This file is part of ProtonMail Bridge. +# This file is part of Proton Mail Bridge. # -# ProtonMail Bridge is free software: you can redistribute it and/or modify +# Proton Mail Bridge is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# ProtonMail Bridge is distributed in the hope that it will be useful, +# Proton Mail Bridge is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with ProtonMail Bridge. If not, see . +# along with Proton Mail Bridge. If not, see . # The Qt libs are dynamically loaded with rules like: `@rpath/QtGui.framework/Versions/5/QtGui` # @rpath instructs the dynamic linker to search a list of paths in order to locate the framework diff --git a/utils/sync_bench.py b/utils/sync_bench.py index 78b800ad4..b4ee00250 100644 --- a/utils/sync_bench.py +++ b/utils/sync_bench.py @@ -1,22 +1,22 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (c) 2022 Proton Technologies AG +# Copyright (c) 2022 Proton AG # -# This file is part of ProtonMail Bridge. +# This file is part of Proton Mail Bridge. # -# ProtonMail Bridge is free software: you can redistribute it and/or modify +# Proton Mail Bridge is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# ProtonMail Bridge is distributed in the hope that it will be useful, +# Proton Mail Bridge is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with ProtonMail Bridge. If not, see . +# along with Proton Mail Bridge. If not, see . # first try diff --git a/utils/versioner/main.go b/utils/versioner/main.go index f65512e1c..a692e8f33 100644 --- a/utils/versioner/main.go +++ b/utils/versioner/main.go @@ -1,19 +1,19 @@ -// Copyright (c) 2022 Proton Technologies AG +// Copyright (c) 2022 Proton AG // -// This file is part of ProtonMail Bridge. +// This file is part of Proton Mail Bridge. // -// ProtonMail Bridge is free software: you can redistribute it and/or modify +// Proton Mail Bridge is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ProtonMail Bridge is distributed in the hope that it will be useful, +// Proton Mail Bridge is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . +// along with Proton Mail Bridge. If not, see . package main @@ -42,7 +42,7 @@ func main() { } } -func createApp() *cli.App { // nolint[funlen] +func createApp() *cli.App { //nolint:funlen app := cli.NewApp() app.Name = "versioner"