From 36f7f3ca820a36b6f56ce75e10333dbde9ab1885 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 11 Sep 2020 08:55:37 -0700 Subject: [PATCH] Copyright header hygiene improvements (#21089) Add copyright headers in a few files where they were missing. Trim trailing blank comment line where present, for consistency with other engine code. Use the standard libtxt copyright header in one file where it differed (extra (C) and comma compared to other files in libtxt). This also amends tools/const_finder/test/const_finder_test.dart to look for a const an additional four lines down to account for the copyright header added to the test fixture. --- examples/glfw/FlutterEmbedderGLFW.cc | 4 ++++ examples/glfw/main.dart | 4 ++++ flow/embedded_views.h | 2 +- flow/flow_run_all_unittests.cc | 2 +- flow/flow_test_utils.cc | 2 +- flow/flow_test_utils.h | 2 +- flutter_frontend_server/bin/starter.dart | 4 ++++ shell/common/shell_test_external_view_embedder.cc | 4 ++++ shell/platform/android/apk_asset_provider.cc | 5 +++++ .../common/cpp/client_wrapper/testing/stub_flutter_api.cc | 4 ---- shell/platform/embedder/fixtures/main.dart | 4 ++++ shell/platform/windows/testing/mock_win32_window.cc | 4 ++++ .../platform/windows/testing/win32_flutter_window_test.cc | 4 ++++ shell/platform/windows/win32_dpi_utils.cc | 4 ++++ shell/platform/windows/win32_flutter_window.cc | 4 ++++ testing/dart/channel_buffers_test.dart | 4 ++++ testing/dart/dart_test.dart | 2 +- testing/dart/image_filter_test.dart | 2 +- testing/dart/paragraph_test.dart | 2 +- testing/dart/semantics_test.dart | 2 +- testing/dart/task_order_test.dart | 2 +- testing/dart/text_test.dart | 2 +- testing/scenario_app/lib/src/channel_util.dart | 2 +- testing/scenario_app/lib/src/initial_route_reply.dart | 2 +- testing/scenario_app/lib/src/locale_initialization.dart | 2 +- testing/scenario_app/lib/src/platform_echo_mixin.dart | 2 +- testing/scenario_app/lib/src/poppable_screen.dart | 2 +- .../scenario_app/lib/src/send_text_focus_semantics.dart | 2 +- testing/scenario_app/lib/src/touches_scenario.dart | 2 +- testing/symbols/verify_exported.dart | 4 ++++ third_party/txt/src/txt/styled_runs.cc | 2 +- tools/const_finder/test/const_finder_test.dart | 2 +- tools/const_finder/test/fixtures/pkg/package.dart | 4 ++++ .../generate_package_config/bin/generate_from_legacy.dart | 7 ++++--- 34 files changed, 76 insertions(+), 26 deletions(-) diff --git a/examples/glfw/FlutterEmbedderGLFW.cc b/examples/glfw/FlutterEmbedderGLFW.cc index 92473c70c5..5389fb298d 100644 --- a/examples/glfw/FlutterEmbedderGLFW.cc +++ b/examples/glfw/FlutterEmbedderGLFW.cc @@ -1,7 +1,11 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. #include #include #include + #include #include diff --git a/examples/glfw/main.dart b/examples/glfw/main.dart index 1f2daa6fb1..4b8f5dde93 100644 --- a/examples/glfw/main.dart +++ b/examples/glfw/main.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:flutter/foundation.dart' show debugDefaultTargetPlatformOverride; diff --git a/flow/embedded_views.h b/flow/embedded_views.h index cbfde22878..a89d2cb3e0 100644 --- a/flow/embedded_views.h +++ b/flow/embedded_views.h @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// + #ifndef FLUTTER_FLOW_EMBEDDED_VIEWS_H_ #define FLUTTER_FLOW_EMBEDDED_VIEWS_H_ diff --git a/flow/flow_run_all_unittests.cc b/flow/flow_run_all_unittests.cc index a3a927c375..efa27a7433 100644 --- a/flow/flow_run_all_unittests.cc +++ b/flow/flow_run_all_unittests.cc @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// + #include "flutter/fml/build_config.h" #include "flutter/fml/command_line.h" #include "flutter/fml/logging.h" diff --git a/flow/flow_test_utils.cc b/flow/flow_test_utils.cc index 9b2abdf980..2e2bc5e483 100644 --- a/flow/flow_test_utils.cc +++ b/flow/flow_test_utils.cc @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// + #include namespace flutter { diff --git a/flow/flow_test_utils.h b/flow/flow_test_utils.h index ec4300e70c..ed4ca287fe 100644 --- a/flow/flow_test_utils.h +++ b/flow/flow_test_utils.h @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// + #include namespace flutter { diff --git a/flutter_frontend_server/bin/starter.dart b/flutter_frontend_server/bin/starter.dart index e95335c62f..27037aac5a 100644 --- a/flutter_frontend_server/bin/starter.dart +++ b/flutter_frontend_server/bin/starter.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + // @dart=2.8 library frontend_server; diff --git a/shell/common/shell_test_external_view_embedder.cc b/shell/common/shell_test_external_view_embedder.cc index 07557768a4..c26fbd2a17 100644 --- a/shell/common/shell_test_external_view_embedder.cc +++ b/shell/common/shell_test_external_view_embedder.cc @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + #include "shell_test_external_view_embedder.h" namespace flutter { diff --git a/shell/platform/android/apk_asset_provider.cc b/shell/platform/android/apk_asset_provider.cc index 7ffbf2b45a..9f52aa56bf 100644 --- a/shell/platform/android/apk_asset_provider.cc +++ b/shell/platform/android/apk_asset_provider.cc @@ -1,4 +1,9 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + #include + #include #include diff --git a/shell/platform/common/cpp/client_wrapper/testing/stub_flutter_api.cc b/shell/platform/common/cpp/client_wrapper/testing/stub_flutter_api.cc index 7cdd354a4d..749f99c024 100644 --- a/shell/platform/common/cpp/client_wrapper/testing/stub_flutter_api.cc +++ b/shell/platform/common/cpp/client_wrapper/testing/stub_flutter_api.cc @@ -2,10 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - #include "flutter/shell/platform/common/cpp/client_wrapper/testing/stub_flutter_api.h" static flutter::testing::StubFlutterApi* s_stub_implementation; diff --git a/shell/platform/embedder/fixtures/main.dart b/shell/platform/embedder/fixtures/main.dart index 95c25aaefb..de4cf422b6 100644 --- a/shell/platform/embedder/fixtures/main.dart +++ b/shell/platform/embedder/fixtures/main.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'dart:async'; import 'dart:typed_data'; import 'dart:ui'; diff --git a/shell/platform/windows/testing/mock_win32_window.cc b/shell/platform/windows/testing/mock_win32_window.cc index 01543df2d6..68e8e3f516 100644 --- a/shell/platform/windows/testing/mock_win32_window.cc +++ b/shell/platform/windows/testing/mock_win32_window.cc @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + #include "flutter/shell/platform/windows/testing/mock_win32_window.h" namespace flutter { diff --git a/shell/platform/windows/testing/win32_flutter_window_test.cc b/shell/platform/windows/testing/win32_flutter_window_test.cc index bae1d9cd8d..b514a96a57 100644 --- a/shell/platform/windows/testing/win32_flutter_window_test.cc +++ b/shell/platform/windows/testing/win32_flutter_window_test.cc @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + #include "flutter/shell/platform/windows/testing/win32_flutter_window_test.h" namespace flutter { diff --git a/shell/platform/windows/win32_dpi_utils.cc b/shell/platform/windows/win32_dpi_utils.cc index 8fe994c463..25e8b4a510 100644 --- a/shell/platform/windows/win32_dpi_utils.cc +++ b/shell/platform/windows/win32_dpi_utils.cc @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + #include "win32_dpi_utils.h" namespace flutter { diff --git a/shell/platform/windows/win32_flutter_window.cc b/shell/platform/windows/win32_flutter_window.cc index 42915f2535..c79e0a5364 100644 --- a/shell/platform/windows/win32_flutter_window.cc +++ b/shell/platform/windows/win32_flutter_window.cc @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + #include "flutter/shell/platform/windows/win32_flutter_window.h" #include diff --git a/testing/dart/channel_buffers_test.dart b/testing/dart/channel_buffers_test.dart index 96047fb17a..a6d0152015 100644 --- a/testing/dart/channel_buffers_test.dart +++ b/testing/dart/channel_buffers_test.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + // @dart = 2.6 import 'dart:convert'; import 'dart:typed_data'; diff --git a/testing/dart/dart_test.dart b/testing/dart/dart_test.dart index 6f8467e4aa..97735d9113 100644 --- a/testing/dart/dart_test.dart +++ b/testing/dart/dart_test.dart @@ -1,4 +1,4 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/testing/dart/image_filter_test.dart b/testing/dart/image_filter_test.dart index 8ba9351b47..fb0297bc3e 100644 --- a/testing/dart/image_filter_test.dart +++ b/testing/dart/image_filter_test.dart @@ -1,4 +1,4 @@ -// Copyright 2019 The Flutter Authors. All rights reserved. +// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/testing/dart/paragraph_test.dart b/testing/dart/paragraph_test.dart index 4a760d0be5..2f4ec6f6bc 100644 --- a/testing/dart/paragraph_test.dart +++ b/testing/dart/paragraph_test.dart @@ -1,4 +1,4 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/testing/dart/semantics_test.dart b/testing/dart/semantics_test.dart index 4257b479b1..5a7146c01f 100644 --- a/testing/dart/semantics_test.dart +++ b/testing/dart/semantics_test.dart @@ -1,4 +1,4 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. +// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/testing/dart/task_order_test.dart b/testing/dart/task_order_test.dart index 64aacf59ac..4bfd71702b 100644 --- a/testing/dart/task_order_test.dart +++ b/testing/dart/task_order_test.dart @@ -1,4 +1,4 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/testing/dart/text_test.dart b/testing/dart/text_test.dart index 9b4798f15f..559aeef539 100644 --- a/testing/dart/text_test.dart +++ b/testing/dart/text_test.dart @@ -1,4 +1,4 @@ -// Copyright 2019 The Flutter Authors. All rights reserved. +// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/testing/scenario_app/lib/src/channel_util.dart b/testing/scenario_app/lib/src/channel_util.dart index 5f8c4c0d1d..986494f5ff 100644 --- a/testing/scenario_app/lib/src/channel_util.dart +++ b/testing/scenario_app/lib/src/channel_util.dart @@ -1,4 +1,4 @@ -// Copyright 2019 The Flutter Authors. All rights reserved. +// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/testing/scenario_app/lib/src/initial_route_reply.dart b/testing/scenario_app/lib/src/initial_route_reply.dart index d53a118e84..c42e7608da 100644 --- a/testing/scenario_app/lib/src/initial_route_reply.dart +++ b/testing/scenario_app/lib/src/initial_route_reply.dart @@ -1,4 +1,4 @@ -// Copyright 2019 The Flutter Authors. All rights reserved. +// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/testing/scenario_app/lib/src/locale_initialization.dart b/testing/scenario_app/lib/src/locale_initialization.dart index 8e48a91b7c..6157de30be 100644 --- a/testing/scenario_app/lib/src/locale_initialization.dart +++ b/testing/scenario_app/lib/src/locale_initialization.dart @@ -1,4 +1,4 @@ -// Copyright 2020 The Flutter Authors. All rights reserved. +// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/testing/scenario_app/lib/src/platform_echo_mixin.dart b/testing/scenario_app/lib/src/platform_echo_mixin.dart index fbd67338f5..2e735d86c6 100644 --- a/testing/scenario_app/lib/src/platform_echo_mixin.dart +++ b/testing/scenario_app/lib/src/platform_echo_mixin.dart @@ -1,4 +1,4 @@ -// Copyright 2019 The Flutter Authors. All rights reserved. +// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/testing/scenario_app/lib/src/poppable_screen.dart b/testing/scenario_app/lib/src/poppable_screen.dart index c2a1f91c71..6ecd655b02 100644 --- a/testing/scenario_app/lib/src/poppable_screen.dart +++ b/testing/scenario_app/lib/src/poppable_screen.dart @@ -1,4 +1,4 @@ -// Copyright 2019 The Flutter Authors. All rights reserved. +// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/testing/scenario_app/lib/src/send_text_focus_semantics.dart b/testing/scenario_app/lib/src/send_text_focus_semantics.dart index 9b5839212d..529dafcea5 100644 --- a/testing/scenario_app/lib/src/send_text_focus_semantics.dart +++ b/testing/scenario_app/lib/src/send_text_focus_semantics.dart @@ -1,4 +1,4 @@ -// Copyright 2020 The Flutter Authors. All rights reserved. +// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/testing/scenario_app/lib/src/touches_scenario.dart b/testing/scenario_app/lib/src/touches_scenario.dart index 7afcf030fc..dbbf50ff15 100644 --- a/testing/scenario_app/lib/src/touches_scenario.dart +++ b/testing/scenario_app/lib/src/touches_scenario.dart @@ -1,4 +1,4 @@ -// Copyright 2020 The Flutter Authors. All rights reserved. +// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/testing/symbols/verify_exported.dart b/testing/symbols/verify_exported.dart index 2bd2d236d0..0a26a3cf4b 100644 --- a/testing/symbols/verify_exported.dart +++ b/testing/symbols/verify_exported.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + // @dart = 2.6 import 'dart:convert'; import 'dart:io'; diff --git a/third_party/txt/src/txt/styled_runs.cc b/third_party/txt/src/txt/styled_runs.cc index 7c7ba75db5..aa39ef75d9 100644 --- a/third_party/txt/src/txt/styled_runs.cc +++ b/third_party/txt/src/txt/styled_runs.cc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Google, Inc. + * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tools/const_finder/test/const_finder_test.dart b/tools/const_finder/test/const_finder_test.dart index e68146761b..0046660baf 100644 --- a/tools/const_finder/test/const_finder_test.dart +++ b/tools/const_finder/test/const_finder_test.dart @@ -132,7 +132,7 @@ void _checkNonConsts() { }, { 'file': 'file://$fixtures/pkg/package.dart', - 'line': 10, + 'line': 14, 'column': 25, } ] diff --git a/tools/const_finder/test/fixtures/pkg/package.dart b/tools/const_finder/test/fixtures/pkg/package.dart index 62ba73c357..1b9d1eb255 100644 --- a/tools/const_finder/test/fixtures/pkg/package.dart +++ b/tools/const_finder/test/fixtures/pkg/package.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:const_finder_fixtures/target.dart'; void createTargetInPackage() { diff --git a/tools/generate_package_config/bin/generate_from_legacy.dart b/tools/generate_package_config/bin/generate_from_legacy.dart index 011e5e11ba..f1a7d6e235 100644 --- a/tools/generate_package_config/bin/generate_from_legacy.dart +++ b/tools/generate_package_config/bin/generate_from_legacy.dart @@ -1,6 +1,7 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + // @dart=2.8 import 'dart:convert'; import 'dart:io'; -- GitLab