Skip to content

Commit

Permalink
Copyright header hygiene improvements (flutter#21089)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cbracken authored Sep 11, 2020
1 parent 78f968e commit 36f7f3c
Show file tree
Hide file tree
Showing 34 changed files with 76 additions and 26 deletions.
4 changes: 4 additions & 0 deletions examples/glfw/FlutterEmbedderGLFW.cc
Original file line number Diff line number Diff line change
@@ -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 <assert.h>
#include <embedder.h>
#include <glfw3.h>

#include <chrono>
#include <iostream>

Expand Down
4 changes: 4 additions & 0 deletions examples/glfw/main.dart
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion flow/embedded_views.h
Original file line number Diff line number Diff line change
@@ -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_

Expand Down
2 changes: 1 addition & 1 deletion flow/flow_run_all_unittests.cc
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion flow/flow_test_utils.cc
Original file line number Diff line number Diff line change
@@ -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 <string>

namespace flutter {
Expand Down
2 changes: 1 addition & 1 deletion flow/flow_test_utils.h
Original file line number Diff line number Diff line change
@@ -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 <string>

namespace flutter {
Expand Down
4 changes: 4 additions & 0 deletions flutter_frontend_server/bin/starter.dart
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
4 changes: 4 additions & 0 deletions shell/common/shell_test_external_view_embedder.cc
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
5 changes: 5 additions & 0 deletions shell/platform/android/apk_asset_provider.cc
Original file line number Diff line number Diff line change
@@ -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 <unistd.h>

#include <algorithm>
#include <sstream>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions shell/platform/embedder/fixtures/main.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 4 additions & 0 deletions shell/platform/windows/testing/mock_win32_window.cc
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions shell/platform/windows/testing/win32_flutter_window_test.cc
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions shell/platform/windows/win32_dpi_utils.cc
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions shell/platform/windows/win32_flutter_window.cc
Original file line number Diff line number Diff line change
@@ -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 <chrono>
Expand Down
4 changes: 4 additions & 0 deletions testing/dart/channel_buffers_test.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion testing/dart/dart_test.dart
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion testing/dart/image_filter_test.dart
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion testing/dart/paragraph_test.dart
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion testing/dart/semantics_test.dart
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion testing/dart/task_order_test.dart
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion testing/dart/text_test.dart
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion testing/scenario_app/lib/src/channel_util.dart
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion testing/scenario_app/lib/src/initial_route_reply.dart
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion testing/scenario_app/lib/src/locale_initialization.dart
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion testing/scenario_app/lib/src/platform_echo_mixin.dart
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion testing/scenario_app/lib/src/poppable_screen.dart
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion testing/scenario_app/lib/src/touches_scenario.dart
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
4 changes: 4 additions & 0 deletions testing/symbols/verify_exported.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion third_party/txt/src/txt/styled_runs.cc
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tools/const_finder/test/const_finder_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void _checkNonConsts() {
},
<String, dynamic>{
'file': 'file://$fixtures/pkg/package.dart',
'line': 10,
'line': 14,
'column': 25,
}
]
Expand Down
4 changes: 4 additions & 0 deletions tools/const_finder/test/fixtures/pkg/package.dart
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
7 changes: 4 additions & 3 deletions tools/generate_package_config/bin/generate_from_legacy.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down

0 comments on commit 36f7f3c

Please sign in to comment.