Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(577)

Unified Diff: pkg/analyzer/lib/src/codegen/tools.dart

Issue 2651743004: Make it possible to generate headers with the correct year (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/codegen/tools.dart
diff --git a/pkg/analyzer/lib/src/codegen/tools.dart b/pkg/analyzer/lib/src/codegen/tools.dart
index cccab10ce4abda6d4e009be9d8dc2f2345fab25a..da7181287fb0fd7f616199672d78a3e01680cd82 100644
--- a/pkg/analyzer/lib/src/codegen/tools.dart
+++ b/pkg/analyzer/lib/src/codegen/tools.dart
@@ -155,12 +155,12 @@ class CodeGenerator {
});
}
- void outputHeader({bool javaStyle: false}) {
+ void outputHeader({bool javaStyle: false, String year = null}) {
String header;
if (codeGeneratorSettings.languageName == 'java') {
header = '''
/*
- * Copyright (c) 2015, the Dart project authors.
+ * Copyright (c) ${year ?? '2015'}, the Dart project authors.
*
* Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
@@ -177,7 +177,7 @@ class CodeGenerator {
*/''';
} else if (codeGeneratorSettings.languageName == 'python') {
header = '''
-# Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+# Copyright (c) ${year ?? '2014'}, 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.
#
@@ -187,7 +187,7 @@ class CodeGenerator {
''';
} else {
header = '''
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) ${year ?? '2014'}, 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.
//
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698