From f3c69faf8b88c5be71222cff9ecde0a3eb7fe3c2 Mon Sep 17 00:00:00 2001 From: Jakub Date: Tue, 5 Apr 2022 15:50:21 +0200 Subject: [PATCH] GODT-1260: Renaming * Renaming GUI, CLI, no-impact config. * License header and documentation rebranding. * Rename app title and vendor. Impact: manual install * Migrating mac keychain and launch on startup. * Fix linter and linter renaming --- .golangci.yml | 1 - BUILDS.md | 2 +- CONTRIBUTING.md | 3 +- COPYING_NOTES.md | 8 +- Changelog.md | 2 +- README.md | 22 +-- cmd/Desktop-Bridge/main.go | 14 +- cmd/launcher/main.go | 16 +-- dist/proton-bridge.desktop | 4 +- doc/bridge.md | 2 +- internal/api/api.go | 16 +-- internal/api/ctx.go | 10 +- internal/api/focus.go | 12 +- internal/app/base/args.go | 10 +- internal/app/base/base.go | 22 ++- internal/app/base/migration.go | 133 +++++++++++++++++- internal/app/base/profiling.go | 10 +- internal/app/base/restart.go | 12 +- internal/app/base/restart_test.go | 10 +- internal/app/bridge/bridge.go | 12 +- internal/bridge/autostart.go | 10 +- internal/bridge/bridge.go | 12 +- internal/bridge/bug_report.go | 14 +- internal/bridge/constants.go | 10 +- internal/bridge/release_notes.go | 10 +- internal/bridge/store_factory.go | 10 +- internal/bridge/types.go | 10 +- internal/config/cache/cache.go | 10 +- internal/config/cache/cache_test.go | 10 +- internal/config/settings/kvs.go | 12 +- internal/config/settings/kvs_test.go | 10 +- internal/config/settings/settings.go | 12 +- internal/config/tls/cert_store_darwin.go | 14 +- internal/config/tls/cert_store_linux.go | 10 +- internal/config/tls/cert_store_windows.go | 10 +- internal/config/tls/tls.go | 20 +-- internal/config/tls/tls_test.go | 10 +- internal/config/useragent/platform.go | 10 +- internal/config/useragent/platform_test.go | 10 +- internal/config/useragent/useragent.go | 10 +- internal/config/useragent/useragent_test.go | 10 +- internal/constants/constants.go | 12 +- internal/constants/update_default.go | 17 +-- internal/constants/update_qa.go | 13 +- internal/cookies/jar.go | 10 +- internal/cookies/jar_test.go | 10 +- internal/crash/actions.go | 10 +- internal/crash/handler.go | 10 +- internal/crash/handler_test.go | 10 +- internal/events/events.go | 10 +- internal/frontend/cli/account_utils.go | 10 +- internal/frontend/cli/accounts.go | 12 +- internal/frontend/cli/frontend.go | 18 +-- internal/frontend/cli/system.go | 12 +- internal/frontend/cli/updates.go | 10 +- internal/frontend/cli/utils.go | 22 +-- internal/frontend/clientconfig/config.go | 12 +- .../frontend/clientconfig/config_applemail.go | 17 +-- internal/frontend/frontend.go | 10 +- internal/frontend/qml/AccountDelegate.qml | 10 +- internal/frontend/qml/AccountView.qml | 10 +- internal/frontend/qml/Banner.qml | 10 +- internal/frontend/qml/Bridge.qml | 13 +- .../frontend/qml/BridgeTest/UserControl.qml | 10 +- internal/frontend/qml/BridgeTest/UserList.qml | 10 +- .../frontend/qml/BridgeTest/UserModel.qml | 10 +- internal/frontend/qml/Bridge_test.qml | 10 +- internal/frontend/qml/BugReportView.qml | 10 +- internal/frontend/qml/Configuration.qml | 10 +- internal/frontend/qml/ConfigurationItem.qml | 10 +- internal/frontend/qml/ContentWrapper.qml | 10 +- internal/frontend/qml/DebugWrapper.qml | 10 +- internal/frontend/qml/GeneralSettings.qml | 10 +- internal/frontend/qml/HelpView.qml | 10 +- internal/frontend/qml/KeychainSettings.qml | 10 +- internal/frontend/qml/LocalCacheSettings.qml | 10 +- internal/frontend/qml/MainWindow.qml | 11 +- internal/frontend/qml/NotificationDialog.qml | 10 +- internal/frontend/qml/NotificationPopups.qml | 10 +- .../qml/Notifications/Notification.qml | 10 +- .../qml/Notifications/NotificationFilter.qml | 10 +- .../qml/Notifications/Notifications.qml | 12 +- internal/frontend/qml/PortSettings.qml | 10 +- internal/frontend/qml/Proton/Action.qml | 10 +- .../frontend/qml/Proton/ApplicationWindow.qml | 10 +- internal/frontend/qml/Proton/Button.qml | 10 +- internal/frontend/qml/Proton/CheckBox.qml | 10 +- internal/frontend/qml/Proton/ColorScheme.qml | 10 +- internal/frontend/qml/Proton/ComboBox.qml | 10 +- internal/frontend/qml/Proton/Dialog.qml | 10 +- internal/frontend/qml/Proton/Label.qml | 10 +- internal/frontend/qml/Proton/Menu.qml | 10 +- internal/frontend/qml/Proton/MenuItem.qml | 10 +- internal/frontend/qml/Proton/Popup.qml | 10 +- internal/frontend/qml/Proton/RadioButton.qml | 10 +- internal/frontend/qml/Proton/Style.qml | 10 +- internal/frontend/qml/Proton/Switch.qml | 10 +- internal/frontend/qml/Proton/TextArea.qml | 10 +- internal/frontend/qml/Proton/TextField.qml | 10 +- internal/frontend/qml/Proton/Toggle.qml | 10 +- internal/frontend/qml/Proton/qmldir | 10 +- internal/frontend/qml/SMTPSettings.qml | 10 +- internal/frontend/qml/SettingsItem.qml | 10 +- internal/frontend/qml/SettingsView.qml | 10 +- internal/frontend/qml/SetupGuide.qml | 10 +- internal/frontend/qml/SignIn.qml | 10 +- internal/frontend/qml/SplashScreen.qml | 10 +- internal/frontend/qml/Status.qml | 10 +- internal/frontend/qml/StatusWindow.qml | 11 +- internal/frontend/qml/WelcomeGuide.qml | 12 +- internal/frontend/qml/bridgeqml.qmlproject | 10 +- internal/frontend/qml/tests/Buttons.qml | 10 +- internal/frontend/qml/tests/ButtonsColumn.qml | 10 +- internal/frontend/qml/tests/CheckBoxes.qml | 10 +- internal/frontend/qml/tests/ComboBoxes.qml | 10 +- internal/frontend/qml/tests/RadioButtons.qml | 10 +- internal/frontend/qml/tests/Switches.qml | 10 +- internal/frontend/qml/tests/Test.qml | 10 +- .../frontend/qml/tests/TestComponents.qml | 10 +- internal/frontend/qml/tests/TextAreas.qml | 10 +- internal/frontend/qml/tests/TextFields.qml | 10 +- internal/frontend/qt/dockicon/DockIcon.h | 10 +- internal/frontend/qt/dockicon/DockIcon.m | 10 +- .../frontend/qt/dockicon/dockicon_darwin.go | 10 +- .../frontend/qt/dockicon/dockicon_default.go | 10 +- internal/frontend/qt/frontend.go | 12 +- internal/frontend/qt/frontend_events.go | 10 +- internal/frontend/qt/frontend_help.go | 10 +- internal/frontend/qt/frontend_init.go | 10 +- internal/frontend/qt/frontend_nogui.go | 13 +- internal/frontend/qt/frontend_settings.go | 10 +- internal/frontend/qt/frontend_updates.go | 10 +- internal/frontend/qt/frontend_users.go | 10 +- internal/frontend/qt/helpers.go | 10 +- internal/frontend/qt/log/log.cpp | 10 +- internal/frontend/qt/log/log.go | 10 +- internal/frontend/qt/log/log.h | 10 +- internal/frontend/qt/qml_backend.go | 10 +- internal/frontend/qt/qml_users.go | 10 +- internal/frontend/share/info.rc | 8 +- internal/frontend/theme/detect_darwin.go | 12 +- internal/frontend/theme/detect_default.go | 10 +- internal/frontend/theme/detect_windows.go | 10 +- internal/frontend/theme/theme.go | 10 +- internal/frontend/theme/theme_test.go | 10 +- internal/frontend/types/types.go | 12 +- internal/imap/backend.go | 12 +- internal/imap/backend_cache.go | 14 +- internal/imap/bridge.go | 14 +- internal/imap/id/extension.go | 10 +- internal/imap/idle/extension.go | 10 +- internal/imap/imap.go | 12 +- internal/imap/mailbox.go | 10 +- internal/imap/mailbox_append.go | 16 +-- internal/imap/mailbox_fetch.go | 12 +- internal/imap/mailbox_fetch_test.go | 10 +- internal/imap/mailbox_header.go | 10 +- internal/imap/mailbox_messages.go | 32 ++--- internal/imap/mailbox_root.go | 10 +- internal/imap/server.go | 14 +- internal/imap/store.go | 16 +-- internal/imap/uidplus/extension.go | 15 +- internal/imap/uidplus/extension_test.go | 10 +- internal/imap/updates.go | 10 +- internal/imap/updates_test.go | 10 +- internal/imap/user.go | 16 +-- internal/locations/locations.go | 20 +-- internal/locations/locations_test.go | 10 +- internal/locations/provider.go | 10 +- internal/logging/clear.go | 10 +- internal/logging/crash.go | 10 +- internal/logging/logging.go | 13 +- internal/logging/logging_test.go | 10 +- internal/logging/rotator.go | 10 +- internal/logging/rotator_test.go | 14 +- internal/metrics/metrics.go | 10 +- internal/sentry/hostarch_darwin.go | 10 +- internal/sentry/hostarch_default.go | 10 +- internal/sentry/reporter.go | 14 +- internal/sentry/reporter_test.go | 10 +- internal/serverutil/controller.go | 10 +- internal/serverutil/error_logger.go | 10 +- internal/serverutil/listener.go | 10 +- internal/serverutil/protocol.go | 10 +- internal/serverutil/server.go | 10 +- internal/serverutil/test/controller_test.go | 14 +- internal/serverutil/test/server.go | 10 +- internal/smtp/backend.go | 12 +- internal/smtp/bridge.go | 12 +- internal/smtp/dump_default.go | 11 +- internal/smtp/dump_qa.go | 10 +- internal/smtp/keys_test.go | 10 +- internal/smtp/preferences.go | 12 +- internal/smtp/preferences_test.go | 12 +- internal/smtp/repro_test.go | 10 +- internal/smtp/send_recorder.go | 10 +- internal/smtp/send_recorder_test.go | 10 +- internal/smtp/server.go | 10 +- internal/smtp/smtp.go | 12 +- internal/smtp/store.go | 10 +- internal/smtp/user.go | 15 +- internal/smtp/utils.go | 10 +- internal/smtp/vcard_tools.go | 10 +- internal/store/address.go | 10 +- internal/store/address_mailbox.go | 10 +- internal/store/address_message.go | 10 +- internal/store/cache.go | 12 +- internal/store/cache/cache_test.go | 10 +- internal/store/cache/compressor.go | 10 +- internal/store/cache/compressor_gzip.go | 10 +- internal/store/cache/disk.go | 14 +- internal/store/cache/hash.go | 10 +- internal/store/cache/memory.go | 10 +- internal/store/cache/options.go | 10 +- internal/store/cache/pending.go | 10 +- internal/store/cache/pending_test.go | 10 +- internal/store/cache/types.go | 10 +- internal/store/cache_test.go | 10 +- internal/store/cache_watcher.go | 10 +- internal/store/cache_worker.go | 10 +- internal/store/cache_worker_test.go | 10 +- internal/store/change.go | 10 +- internal/store/change_test.go | 10 +- internal/store/convert.go | 10 +- internal/store/cooldown.go | 10 +- internal/store/cooldown_test.go | 10 +- internal/store/event_loop.go | 18 +-- internal/store/event_loop_test.go | 10 +- internal/store/events.go | 14 +- internal/store/mailbox.go | 14 +- internal/store/mailbox_counts.go | 10 +- internal/store/mailbox_counts_test.go | 10 +- internal/store/mailbox_ids.go | 10 +- internal/store/mailbox_ids_test.go | 12 +- internal/store/mailbox_message.go | 12 +- internal/store/main_test.go | 12 +- internal/store/message.go | 10 +- internal/store/store.go | 48 +++---- internal/store/store_address_mode.go | 10 +- internal/store/store_structure_version.go | 10 +- internal/store/store_test.go | 12 +- internal/store/store_test_exports.go | 12 +- internal/store/sync.go | 12 +- internal/store/sync_state.go | 10 +- internal/store/sync_state_test.go | 10 +- internal/store/sync_test.go | 18 +-- internal/store/types.go | 10 +- internal/store/ulimit.go | 12 +- internal/store/user.go | 10 +- internal/store/user_address.go | 10 +- internal/store/user_address_info.go | 10 +- internal/store/user_mailbox.go | 10 +- internal/store/user_message.go | 12 +- internal/store/user_message_test.go | 12 +- internal/store/user_sync.go | 10 +- internal/store/user_sync_test.go | 10 +- internal/updater/channels.go | 12 +- internal/updater/errors.go | 10 +- internal/updater/host_default.go | 11 +- internal/updater/host_qa.go | 10 +- internal/updater/install_darwin.go | 10 +- internal/updater/install_default.go | 11 +- internal/updater/key_default.go | 10 +- internal/updater/locker.go | 12 +- internal/updater/locker_test.go | 10 +- internal/updater/sync.go | 20 +-- internal/updater/sync_test.go | 12 +- internal/updater/updater.go | 10 +- internal/updater/updater_test.go | 10 +- internal/updater/version.go | 10 +- internal/users/cache.go | 14 +- internal/users/cache_test.go | 10 +- internal/users/credentials/credentials.go | 12 +- .../users/credentials/credentials_test.go | 10 +- internal/users/credentials/pass.go | 11 +- internal/users/credentials/pass_imaptest.go | 10 +- internal/users/credentials/store.go | 13 +- internal/users/credentials/store_test.go | 12 +- internal/users/types.go | 10 +- internal/users/user.go | 12 +- internal/users/user_credentials_test.go | 10 +- internal/users/user_new_test.go | 10 +- internal/users/user_store_test.go | 12 +- internal/users/user_test.go | 10 +- internal/users/users.go | 16 +-- internal/users/users_clear_test.go | 10 +- internal/users/users_delete_test.go | 10 +- internal/users/users_get_test.go | 10 +- internal/users/users_login_test.go | 10 +- internal/users/users_new_test.go | 10 +- internal/users/users_test.go | 36 ++--- internal/versioner/install.go | 10 +- internal/versioner/name_default.go | 11 +- internal/versioner/name_windows.go | 10 +- internal/versioner/remove.go | 10 +- internal/versioner/remove_darwin.go | 10 +- internal/versioner/remove_linux.go | 10 +- internal/versioner/remove_windows.go | 10 +- internal/versioner/util.go | 10 +- internal/versioner/version.go | 14 +- internal/versioner/version_test.go | 10 +- internal/versioner/versioner.go | 10 +- internal/versioner/versioner_remove_test.go | 11 +- internal/versioner/versioner_test.go | 10 +- pkg/algo/algo.go | 10 +- pkg/algo/sets.go | 10 +- pkg/algo/sets_test.go | 12 +- pkg/confirmer/confirmer.go | 10 +- pkg/confirmer/confirmer_test.go | 10 +- pkg/confirmer/request.go | 10 +- pkg/dialer/dial_client.go | 10 +- pkg/files/removal.go | 10 +- pkg/files/removal_test.go | 10 +- pkg/keychain/helper_darwin.go | 19 ++- pkg/keychain/helper_dbus_linux.go | 10 +- pkg/keychain/helper_linux.go | 12 +- pkg/keychain/helper_windows.go | 12 +- pkg/keychain/keychain.go | 18 +-- pkg/keychain/keychain_darwin.go | 12 +- pkg/keychain/keychain_default.go | 11 +- pkg/keychain/keychain_missing.go | 10 +- pkg/keychain/keychain_test.go | 14 +- pkg/listener/listener.go | 12 +- pkg/listener/listener_test.go | 10 +- pkg/message/boundary_reader.go | 10 +- pkg/message/build.go | 12 +- pkg/message/build_boundary.go | 10 +- pkg/message/build_encrypted.go | 14 +- pkg/message/build_framework_test.go | 20 +-- pkg/message/build_job.go | 10 +- pkg/message/build_rfc822.go | 14 +- pkg/message/build_rfc822_custom.go | 10 +- pkg/message/build_test.go | 10 +- pkg/message/encrypt.go | 10 +- pkg/message/encrypt_test.go | 10 +- pkg/message/envelope.go | 10 +- pkg/message/flags.go | 10 +- pkg/message/header.go | 10 +- pkg/message/header_test.go | 10 +- pkg/message/init.go | 12 +- pkg/message/message.go | 12 +- pkg/message/parser.go | 16 +-- pkg/message/parser/handler.go | 10 +- pkg/message/parser/parser.go | 10 +- pkg/message/parser/parser_test.go | 10 +- pkg/message/parser/part.go | 10 +- pkg/message/parser/part_test.go | 10 +- pkg/message/parser/trimmer.go | 10 +- pkg/message/parser/trimmer_test.go | 10 +- pkg/message/parser/visitor.go | 10 +- pkg/message/parser/walker.go | 10 +- pkg/message/parser/walker_test.go | 10 +- pkg/message/parser/writer.go | 10 +- pkg/message/parser/writer_test.go | 10 +- pkg/message/parser_test.go | 16 +-- pkg/message/scanner.go | 10 +- pkg/message/scanner_test.go | 10 +- pkg/message/section.go | 20 +-- pkg/message/section_test.go | 12 +- pkg/message/writer.go | 10 +- pkg/mime/encoding.go | 10 +- pkg/mime/encoding_test.go | 10 +- pkg/mime/mediaType.go | 10 +- pkg/mime/utf7Decoder.go | 10 +- pkg/mobileconfig/config.go | 10 +- pkg/mobileconfig/template.go | 10 +- pkg/parallel/parallel.go | 12 +- pkg/parallel/parallel_test.go | 22 +-- pkg/pchan/pchan.go | 10 +- pkg/pchan/pchan_test.go | 12 +- pkg/pmapi/addresses.go | 10 +- pkg/pmapi/addresses_test.go | 10 +- pkg/pmapi/attachments.go | 10 +- pkg/pmapi/attachments_test.go | 12 +- pkg/pmapi/auth.go | 10 +- pkg/pmapi/auth_server_test.go | 10 +- pkg/pmapi/auth_test.go | 12 +- pkg/pmapi/boolean.go | 10 +- pkg/pmapi/client.go | 10 +- pkg/pmapi/client_keys.go | 10 +- pkg/pmapi/client_types.go | 10 +- pkg/pmapi/config.go | 10 +- pkg/pmapi/config_default.go | 11 +- pkg/pmapi/config_qa.go | 10 +- pkg/pmapi/contacts.go | 10 +- pkg/pmapi/contacts_test.go | 10 +- pkg/pmapi/context.go | 10 +- pkg/pmapi/data_test.go | 18 ++- pkg/pmapi/dialer_basic.go | 12 +- pkg/pmapi/dialer_pinning.go | 12 +- pkg/pmapi/dialer_pinning_checker.go | 10 +- pkg/pmapi/dialer_pinning_report.go | 10 +- pkg/pmapi/dialer_pinning_reporter.go | 10 +- pkg/pmapi/dialer_pinning_reporter_test.go | 10 +- pkg/pmapi/dialer_pinning_test.go | 10 +- pkg/pmapi/dialer_proxy.go | 10 +- pkg/pmapi/dialer_proxy_provider.go | 14 +- pkg/pmapi/dialer_proxy_provider_test.go | 10 +- pkg/pmapi/dialer_proxy_test.go | 10 +- pkg/pmapi/errors.go | 10 +- pkg/pmapi/events.go | 10 +- pkg/pmapi/events_test.go | 10 +- pkg/pmapi/import.go | 10 +- pkg/pmapi/import_test.go | 12 +- pkg/pmapi/key.go | 10 +- pkg/pmapi/keyring.go | 12 +- pkg/pmapi/keyring_test.go | 14 +- pkg/pmapi/labels.go | 14 +- pkg/pmapi/labels_test.go | 10 +- pkg/pmapi/manager.go | 10 +- pkg/pmapi/manager_auth.go | 10 +- pkg/pmapi/manager_download.go | 10 +- pkg/pmapi/manager_log.go | 10 +- pkg/pmapi/manager_metrics.go | 10 +- pkg/pmapi/manager_metrics_test.go | 10 +- pkg/pmapi/manager_ping.go | 12 +- pkg/pmapi/manager_proxy.go | 10 +- pkg/pmapi/manager_report.go | 10 +- pkg/pmapi/manager_report_test.go | 10 +- pkg/pmapi/manager_report_types.go | 10 +- pkg/pmapi/manager_test.go | 10 +- pkg/pmapi/manager_types.go | 10 +- pkg/pmapi/message_send.go | 10 +- pkg/pmapi/message_send_test.go | 10 +- pkg/pmapi/messages.go | 14 +- pkg/pmapi/messages_test.go | 10 +- pkg/pmapi/observer.go | 10 +- pkg/pmapi/paging.go | 12 +- pkg/pmapi/passwords.go | 10 +- pkg/pmapi/passwords_test.go | 10 +- pkg/pmapi/pmapi.go | 12 +- pkg/pmapi/pmapi_test.go | 12 +- pkg/pmapi/response.go | 12 +- pkg/pmapi/server_test.go | 14 +- pkg/pmapi/settings.go | 10 +- pkg/pmapi/users.go | 10 +- pkg/pmapi/users_test.go | 10 +- pkg/pmapi/utils.go | 10 +- pkg/pool/pool.go | 10 +- pkg/pool/pool_test.go | 10 +- pkg/ports/ports.go | 10 +- pkg/ports/ports_test.go | 10 +- pkg/semaphore/semaphore.go | 10 +- pkg/signature/signature.go | 10 +- pkg/sum/sum.go | 12 +- pkg/sum/sum_test.go | 10 +- pkg/tar/tar.go | 12 +- test/accounts/account.go | 12 +- test/accounts/accounts.go | 12 +- test/api_actions_test.go | 10 +- test/api_checks_test.go | 10 +- test/api_setup_test.go | 10 +- test/bdd_test.go | 12 +- test/benchmarks/bench_results/human-table.py | 10 +- test/benchmarks/bench_test.go | 10 +- test/bridge_actions_test.go | 10 +- test/common_checks_test.go | 10 +- test/context/accounts.go | 10 +- test/context/bddt.go | 10 +- test/context/bridge.go | 10 +- test/context/bridge_panic_handler.go | 10 +- test/context/cache.go | 10 +- test/context/calls/calls.go | 10 +- test/context/cleaner.go | 10 +- test/context/context.go | 14 +- test/context/credentials.go | 10 +- test/context/environments.go | 10 +- test/context/globals.go | 10 +- test/context/imap.go | 10 +- test/context/locations.go | 10 +- test/context/pmapi_controller.go | 10 +- test/context/settings.go | 14 +- test/context/smtp.go | 10 +- test/context/store.go | 10 +- test/context/updater.go | 10 +- test/context/users.go | 12 +- test/context/utils.go | 10 +- test/context/versioner.go | 10 +- test/fakeapi/attachments.go | 10 +- test/fakeapi/auth.go | 10 +- test/fakeapi/contacts.go | 10 +- test/fakeapi/controller.go | 10 +- test/fakeapi/controller_calls.go | 10 +- test/fakeapi/controller_control.go | 12 +- test/fakeapi/controller_session.go | 12 +- test/fakeapi/controller_user.go | 10 +- test/fakeapi/counts.go | 10 +- test/fakeapi/download.go | 10 +- test/fakeapi/events.go | 10 +- test/fakeapi/fakeapi.go | 12 +- test/fakeapi/idgenerator.go | 10 +- test/fakeapi/keys.go | 10 +- test/fakeapi/labels.go | 10 +- test/fakeapi/manager.go | 10 +- test/fakeapi/messages.go | 14 +- test/fakeapi/user.go | 10 +- test/fakeapi/utils.go | 10 +- test/imap_actions_auth_test.go | 10 +- test/imap_actions_mailbox_test.go | 10 +- test/imap_actions_messages_test.go | 10 +- test/imap_checks_test.go | 10 +- test/imap_setup_test.go | 10 +- test/internal_error.go | 10 +- test/keyring.go | 10 +- test/liveapi/calls.go | 10 +- test/liveapi/cleanup.go | 10 +- test/liveapi/controller.go | 10 +- test/liveapi/events.go | 10 +- test/liveapi/labels.go | 12 +- test/liveapi/messages.go | 10 +- test/liveapi/persistent_clients.go | 10 +- test/liveapi/transport.go | 10 +- test/liveapi/users.go | 10 +- test/main_test.go | 14 +- test/mocks/debug.go | 10 +- test/mocks/imap_client.go | 14 +- test/mocks/imap_response.go | 14 +- test/mocks/imap_server.go | 10 +- test/mocks/smtp.go | 14 +- test/mocks/smtp_response.go | 10 +- test/mocks/testingt.go | 10 +- test/mocks/utils.go | 10 +- test/smtp_actions_test.go | 10 +- test/smtp_checks_test.go | 10 +- test/smtp_setup_test.go | 10 +- test/store_actions_test.go | 10 +- test/store_checks_test.go | 24 ++-- test/store_setup_test.go | 14 +- test/users_actions_test.go | 10 +- test/users_checks_test.go | 10 +- test/users_setup_test.go | 12 +- utils/changelog_linter.sh | 10 +- utils/credits.sh | 10 +- utils/githooks/pre-push | 10 +- utils/hasher/main.go | 12 +- utils/license_header.txt | 10 +- utils/missing_license.sh | 14 +- utils/rebranding.sh | 100 +++++++++++++ utils/release_notes.sh | 10 +- utils/remove_non_relative_links_darwin.sh | 10 +- utils/sync_bench.py | 10 +- utils/versioner/main.go | 12 +- 542 files changed, 3220 insertions(+), 2981 deletions(-) create mode 100755 utils/rebranding.sh diff --git a/.golangci.yml b/.golangci.yml index ebaab17f..7efac305 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 c2df4d0c..e6d9c548 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 824a8c84..ea729c2f 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 916656d3..57abbed1 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 1a0a53a3..090c6e7c 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 1c8226b4..2ea8c764 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 879c90b9..0255fd95 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 287fd91c..ed050d84 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 15294b64..5dc83c01 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 b521dd0b..969a322f 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 6d903aa1..050c28a9 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 f11c822e..24c2ba16 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 3dcd5231..424dbc11 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 6382c310..21d36689 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 e70bb98d..ac4adc93 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 c5bcd36a..8ca413ae 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 76229ef3..f5cd4a59 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 3608fc7e..c03e1b22 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 546c862e..2567edb2 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 8e49811c..b8f766ca 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 43d5b93c..f8112b94 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 f3b64b4f..23c1e6cb 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 2a41c08d..8b01163b 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 08ae3e27..d7ed8bd4 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 8334a380..117f8b3b 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 fad5a2ba..297f3370 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 8475ab5f..d4a085aa 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 925790a7..d9a0374a 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 2d7b3d86..d694d5e1 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 27ff4d64..152630e3 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 6de60945..672846f4 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 06078e8f..9133424d 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 0ecb9584..981b7cad 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 7d1d12d4..614ad31a 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 1a93b326..d8af6749 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 677cdb8f..2d68b75f 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 f6f27f83..0248995c 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 593c8811..df691800 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 6e85d796..27136444 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 c7b14586..4db2a04b 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 34938d76..344f7982 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 da2ba96a..f09127ab 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 81a573aa..57dadc36 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 a802f323..560e798e 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 b5005927..2e7b0e3e 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 5c5985e8..6979164e 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 e6476f74..5cd8a3f1 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 41c241be..5dbcb6c0 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 b8ba22f3..ade2ca17 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 a2e7f54b..50b87943 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 2848a3a6..d818102f 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 e34b28a3..58940234 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 732a93be..4e97798c 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 625f8165..e2f792bd 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 af38ab66..7bd5ed83 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 3f10c52b..e5277543 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 e480dbe3..6fdf0bb2 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 dd563194..2282e299 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 8b288e4d..732649e1 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 3ba931c3..001a7761 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 599eb957..67e7f2ec 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 f024057d..740a975b 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 7deb44c2..4ea8c1a2 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 385197e4..50e64390 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 b9c76667..effe4bc1 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 b7756853..138db61e 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 db55cf95..2e41be8f 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 d5db8757..891b2bca 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 f6a843c6..ac7471bd 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 9ad7ff75..60327598 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 ef63a630..2beddd30 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 b4af77f5..7bfb241d 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 1637b387..fbd53778 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 5d6a8827..0b9d7095 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 00fc017d..e9f3a824 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 f81a1e53..bf618342 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 02d1c52f..8dfa488f 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 51fc89a8..7b73caa7 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 35d7df07..4c89a979 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 24a8e934..6b2718b7 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 c0216e50..2477788e 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 227696d2..05d99662 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 0eee6a69..943e6b0c 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 1e7de0d4..aac7202d 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 db4dcfa5..9b72dfe1 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 9049f23f..a521ab40 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 ffb00508..2390ffa2 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 7b1353ff..07c14bda 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 e347a478..f0dc5285 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 d5d63956..e8171561 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 3a867db9..4099149c 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 3c6b2363..a444f453 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 a2cd6177..3307734d 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 62e3deab..57770590 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 3b2b17d0..f10ee4da 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 34cfd0fd..f50ed537 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 a6d1531a..9b85b768 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 5d002056..fad74f5f 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 a81b1025..621d7387 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 28a129c2..2236cc23 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 7aef398b..c52bb8ef 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 35307421..7c713993 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 064d035d..59dfd9d9 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 5d821927..c436b953 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 0dc48b87..3fb94efe 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 d3073856..a39c00e0 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 36e6e034..23488588 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 a4f8b569..addb7caf 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 4285db72..d4dc1fa6 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 b70fa914..a56f06e9 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 d46df654..15f0db8e 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 996f55b3..c44feb4b 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 eefd585f..988d5f89 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 2943fcd6..18b86841 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 8d6fd684..c95e62ac 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 a85fbd74..2625f2c0 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 7973c1ef..eae07448 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 1236e70f..9093b33e 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 ad26f550..61c12bdf 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 6efb69d0..ba8632d9 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 8b368492..6d83da5b 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 e4310044..cc242449 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 82fdc667..8059064b 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 43e61ea9..e5b60faf 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 c1f94f2d..bd1a9fb0 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 bbfc966d..da87aa30 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 cf9ac28c..b0a9a924 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 c2374e12..2145ec6c 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 17bfbdad..78bcbfa7 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 442c11b0..cbe9bcbf 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 c3b97203..38933416 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 3c48f1ad..3c606c6a 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 05b6a782..42e48c8f 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 ddfe0a9f..e5a7e401 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 1950b060..64ca9589 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 25128259..815dc696 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 777e97af..a20c8396 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 2c678679..b3bc9f6a 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 c513a928..79b2cc45 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 69438d91..1bad72d8 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 f0a71a3a..f9a8e840 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 ca79eb66..c3b9cc56 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 fa3a390e..e54a59a2 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 d0b30d16..60397426 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 a99e33f6..8364069b 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 32cdb960..e179b61d 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 e3e9c3e4..cff6c88f 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 aa7b308d..dd7a75f6 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 72b8a9e0..bbbaa1d2 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 d5f62c02..8b805364 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 f490d98b..273aa761 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 16adcdd3..a461163c 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 06d5131f..3bbcc730 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 01e7d482..fdb5ea99 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 09e768f4..b3d56921 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 e60967ad..e6be9282 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 16f97cb6..dbcba188 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 d71f1efb..18be95ab 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 64fa9740..e36fa4c3 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 4f55f538..3839f16e 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 aa7c207e..776b52b0 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 dcf8d07a..ac22adae 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 6c1be33b..840b0010 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 7b429632..b3c92280 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 122a2f57..f632c0ea 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 a00a3032..b2506328 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 d089e7d9..702d8684 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 33077109..6893462c 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 0095e20f..e7083563 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 ce70a2f1..ee64ef1f 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 d1cb7c1a..cca9ca33 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 791b1443..c22eea34 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 145a1f9c..a05f4f21 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 63a79fde..21fb5651 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 600f95b3..e361b310 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 1d588029..a4854f43 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 612300a1..6b77467b 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 4150180a..7292e0b9 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 b94784f1..69a8bff2 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 f99fdd14..da38ff59 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 aaa3e0ba..1f6b6225 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 eec15610..6bc14267 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 8066dd13..848f8d8c 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 b0fe0f23..c14d2f60 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 d4eb5a98..2f5f4a1b 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 f28fdc15..2b8a119b 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 12de3bfe..6788c394 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 b39a1907..4f5cce7b 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 165b0105..a5cc2c8a 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 b2535ad5..8452bf94 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 0adfee04..edf33607 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 a51c020c..1bff99a8 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 75c63b37..6e891e5e 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 5a184de9..ef94994c 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 48ffa639..796f0a20 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 c273d432..e6de045d 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 07d76d15..5a214ded 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 a1a8cbd0..b4115a2d 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 87073b45..443ef347 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 1866dc91..81d6eb39 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 bef3e448..e59a2f62 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 20b3d885..80847897 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 a1128095..cc4afd78 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 0783c736..4a492873 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 41c6dbb8..ffd62c7e 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 f32e0029..0cdbf158 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 baa08cd8..fd18d466 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 70eb98e8..18054d9a 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 f09579e1..9a52902c 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 1447b410..68acde08 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 fd8da082..246857c8 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 ebaf977b..1c3454b1 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 182d32c2..f2e2ee52 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 c9a74688..26b25664 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 0f184b2f..6fd0dd69 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 46d4a613..b58e14e7 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 4e80e64e..dd83a191 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 5eaace2a..c25f4cee 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 559471f8..10faa844 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 7c92fb40..01b5b0c7 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 4bcbddd6..73030d7e 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 8a22b8e0..8f7facd7 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 c9fcb708..3d543a74 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 69bf6db2..abc8933f 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 4c0745b3..2f7dd51a 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 eb96090d..bbb87a72 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 573b85d7..2db07898 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 e9d477ac..281c136a 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 ca5b7c33..3748f9ce 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 5182a72d..1929b026 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 367fac23..668f6a66 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 4e3e5d88..159b2d91 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 30b33171..466a4b4c 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 3d5780db..221371f8 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 f8fc60a7..dc3fcf66 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 f8bbb2aa..e3acd34e 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 b054a243..be2fff79 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 f6527196..3c3280bf 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 bd7662bb..2d7a0b0f 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 78d75cd3..689d5bea 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 e1fc003b..1206ed78 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 eefe915b..1ccd991c 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 124de172..16e06776 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 60e86fc7..05de0e00 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 bc5c2a7b..f5180025 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 0fff3466..81403131 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 6b88b1e9..86802845 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 668a1f30..3765773a 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 27ee4096..8c203480 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 de554f7d..0b94da19 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 fa7db63f..c3a36ae8 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 f3c16023..ef8187ba 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 75889d25..717402c1 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 42e0e78f..679fec23 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 6802b056..0b0623bb 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 6228b557..ef10f64b 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 8af312b9..5784c65a 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 506635c1..7fd09bfb 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 86a53fd4..8634f537 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 a369e2d0..e6e9c09f 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 bc9251e2..a0c9d594 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 3f9be3d4..15f29562 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 6cac709d..289153ed 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 96e33ec5..328de2e4 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 795c79ed..e4151447 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 6ae228a2..38b8e452 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 501842e1..522cad92 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 0a23e9e0..fe354753 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 2d194c9e..ea2c91c2 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 d88e3bf1..d057fca1 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 01ece8fd..2d9e56f0 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 2d5cf554..fb4777eb 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 162d8b97..30801ebe 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 50d26d03..fb8460b7 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 dd827058..78211284 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 fc3173a6..1a095311 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 f32d12bf..6e0fb9d4 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 9bf7bd38..0bfdf6f6 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 d4fced1a..489cac02 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 ca893308..f8c5e914 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 bd7b8a74..8fe8c7d0 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 5ca56f65..d1921bbc 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 907c4f37..50cc68be 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 353f5c43..c90016f2 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 c044bc4f..0b6285ed 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 850789a2..b15cf445 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 9e3def54..17a28c3e 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 ebd71c31..21746c8f 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 ea4d701a..0f2bec60 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 21a34627..b8462a88 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 98e8efbc..a8315fae 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 174d7581..078a8132 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 8fa21226..f7a4c262 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 885bd896..d553a703 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 da825535..d32fd51d 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 1a14033c..484b6c09 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 91192d74..6403991a 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 ad1ce881..9d6d9c9a 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 bd92fa2a..b861f985 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 9ac9267f..105a9e12 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 d2e0dedd..cdc4f388 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 33f4c553..568d23da 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 a6a89dce..0c3a47f0 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 4b83a643..0654d278 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 68b3d7c7..399c170a 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 d0842560..6fc717c1 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 bdb27183..c8bc9050 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 625ccd4a..31b1d0e4 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 d449b24f..8e13b70b 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 25428294..dc3e4af1 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 8183cedf..2e92c7ee 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 9cb77a63..840940f4 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 2d871de7..8f9f8da1 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 01315647..fdd6ab0e 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 ffc4a849..053c3119 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 2a517ae6..39499ccf 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 925c0152..71af8c38 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 2089ce70..f73893da 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 a4ac8b81..2a37872d 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 84abe8c1..c3a6ac47 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 239fb410..46e90af8 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 840c4b36..d7eebe09 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 dd451a3e..dcb932a3 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 b45bb4a1..4f34b68f 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 30d0c834..538ee4e0 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 20877b21..374751e4 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 ef449117..fa94611a 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 2ca44982..fcaafa27 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 b3a6f7ba..ba4d5614 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 ca2ee966..3aeebad7 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 53080003..b83fbb65 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 0a461b80..5dfa0294 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 9f00177b..2f189ba6 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 3d7ece44..8aa752c7 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 a218077e..2f0bd4aa 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 db9829bb..0f8b856b 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 8694eaad..c9434e57 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 f28c429c..f333338c 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 3677afc0..0dbeca95 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 e49b5798..fd8b4f10 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 1f0cf416..e0a8ccb4 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 1bcd139e..4ed849ea 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 490e7ac8..bc7f7fe0 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 afd1cd46..4aec2dcc 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 84c1928e..3e88fa38 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 101f1022..65401ead 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 8d6019de..7597f585 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 a2e58194..d88be315 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 c107f710..d8fa3dcf 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 fa83cf1d..1eaf6223 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 2b99c15a..aeead295 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 c9a35e7a..58470e42 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 e1151dff..52f7c028 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 3b95715a..9e61cd74 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 4fe6a536..4bc60dff 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 29491858..99711359 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 edad8abf..884eaa24 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 72c5a15a..e80331de 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 332d53ce..3704032b 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 af03d506..e1411023 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 39d01140..2a9a2509 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 5478fc5f..676a98f3 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 e41cfab9..000ba35c 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 2e4c05fd..a8600053 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 4114a833..b700b170 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 5de289d1..3e39a19a 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 348bf38a..20825a3d 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 67805ed0..99e30d83 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 c559b0ea..1abc9750 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 44f6326a..b84639e3 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 4f0f2ab9..6cf7b83e 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 73bb334d..f3bd252b 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 84fa31d0..f7fda857 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 5893f7e0..7523c319 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 160f3c7a..cff12d03 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 129b6df6..1353ae19 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 2806679d..944510ce 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 d32bf423..6aa68827 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 5c7dee04..6a3d5add 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 b6844d0c..464db6ac 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 384cd0f7..efaebb0c 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 68af1fbc..36b437af 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 53cce729..7d6841c6 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 4da8f955..e92b9da3 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 df5a660a..87934f1f 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 71bfe32d..805c1fca 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 de10187d..74180c9e 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 ab20ea78..5d5f7d9d 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 f6a230a4..552393e4 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 17799da7..91e1ef12 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 9bcf98a7..d07f765a 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 ea6cc414..36c6b8bf 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 d28c0301..4daa3395 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 c13414aa..196a7f3a 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 0b5bdd5d..470c78c5 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 f39ea86a..30cb9867 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 1526bf2d..61fdbaa1 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 4fca808d..f60868ca 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 039a13ff..7ac2a459 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 2819b20c..f67a6857 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 d86ed6ef..89c5b644 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 06141ac3..b187ebe1 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 403c63a9..83e67b8c 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 523ee9f9..f24c4793 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 41bc9c72..800e1548 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 8aeb3011..1deead83 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 7a42520f..de662bf4 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 e97fef7a..3d1818d6 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 fa68db79..d0917950 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 5aa1a559..191adee5 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 67c1d42d..2daad62f 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 7924b10e..58563be5 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 bcec6568..dd329f7a 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 61d1c4e7..d24ff13a 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 564480f1..1bd9e42c 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 816d49eb..0d013dc7 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 a9e48f49..814b567d 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 6e8d1d1a..813d75fd 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 6a4485ff..0117fc86 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 4d0dc27c..5721d607 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 5d085987..3454d21e 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 d4d862c1..e647e7ed 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 5f80062b..524c2173 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 36854c15..5f32582f 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 b9f08e2a..a3541746 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 e2041562..9847ad84 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 d7a3a7be..f710516c 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 13b24460..9614d729 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 7b9ea863..f03628ad 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 9fd01ab6..6c9440d2 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 46705933..52429475 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 51ac2aa5..b75306ba 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 bc399569..12146009 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 f46d6a3b..e85ff25b 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 0f912e25..e5c71e63 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 b57a3194..161f4218 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 1a058dd7..750c9850 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 b28c585e..e6c9adfc 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 7151c44c..3f760017 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 7b171c52..3beb9174 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 8aa7c96c..5b75ba8b 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 27b5dda1..55619800 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 53990b23..4d5e3343 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 b8018a57..4264dfc0 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 c1d6e93e..f094c5d5 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 9c138000..9bda7a48 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 47f84e7e..24154665 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 b5520be3..31f65dd0 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 6a8d28f2..332b93c9 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 55ffdb23..e443d6ce 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 0cc99ced..071503b7 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 298866c6..caa65f08 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 4cf00bc9..c954ab39 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 fc39afd8..5ccd0788 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 f650f70e..c48abbf6 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 cfebb39b..0cea6bac 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 3ed7e2c1..580426c2 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 73d0c97f..1b1e1ab4 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 91df4a52..ad3a6089 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 df3343e0..74bdd9de 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 c60204fd..7aa04041 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 aedd3724..db6489f9 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 22c0d848..c4cd4871 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 a5233904..5eba9fa9 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 409ae56d..3bdd8cc6 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 c0f78fff..65511165 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 ecd67d91..6891fd75 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 dbc37f34..3cda19be 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 a853ca26..1eef3eb0 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 62613f82..bd7d8f5c 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 434fe471..d8aed429 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 3a14802d..f9812c8d 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 198ce999..ac0511f0 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 aca0a360..e8b9f050 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 7ac0a826..9664dae6 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 ccf99f59..040cdcb9 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 26cc7340..40240e8b 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 07a6cba3..6998bd2f 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 9e9d5c4f..60132f5c 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 bc8d5296..a814330a 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 e66dc51c..d880e52f 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 ef31274b..70b0e84e 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 be67bd8f..328b3d97 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 c3345d60..00d25e41 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 a4a0a5f3..cecde247 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 16a3de06..01c9e534 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 ce1378ff..db04e894 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 5d3a4847..e20060f6 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 6b9bf6dd..e9c181ad 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 771085d7..5bd1ae64 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 929ba62f..3fcf9c2b 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 6e7496a6..49cd6223 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 81e48f8e..083681f2 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 cd0a8692..98eb20d8 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 348eae41..8ccb2fd4 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 e7b71e9f..3ba77e7e 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 864a3811..52669a17 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 809b1286..e40d6672 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 a164bf09..e85fcce2 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 c1ba3a70..297857b9 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 bc37c3e9..f899161c 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 e90c9188..925fe653 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 d2ef3624..a049785d 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 f9e0f6a6..414a0ce1 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 96aa224f..08c997cc 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 e3dc7f74..c47d0780 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 675cb398..e7af7d66 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 2791f560..c1b69035 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 7f60bffa..84a03c0a 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 0502ec5d..8110e528 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 35680068..f076ebe7 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 35598da0..02e406e6 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 79fc03e5..a3d7321a 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 14bd5112..032abe3b 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 de1ed3da..a17a4c69 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 78c88d6f..4ac3f2a3 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 da79b4ed..74519257 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 5177cb91..c4f9492d 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 475845ea..008eb9b4 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 758c3233..1a427b2f 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 bac1f82b..0af406fd 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 33430b84..5cbcd90e 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 04f1cf87..5af60086 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 19afeca7..85b2d25b 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 4a1fda20..d3381d60 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 f2b440d8..02711295 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 c597ce1d..f7c4fd06 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 d1eb106e..def49daf 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 b0d7905d..9f0ae8b5 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 e32ea458..1dcd2ab1 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 30eb2acd..21f16d86 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 4949aabb..d1e54820 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 abf12140..9f56e534 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 5d701387..4f93d2a9 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 278e5b64..65bbf246 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 77331add..6aabe6ec 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 1da91b3e..d10932f4 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 00000000..f87f45db --- /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 e9cb5ecb..832a07f2 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 348f40b6..38a2bb0a 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 78b800ad..b4ee0025 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 f65512e1..a692e8f3 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"