Skip to content

Commit

Permalink
[dev-tool][customization] fix duplicate file header (Azure#27610)
Browse files Browse the repository at this point in the history
There are two trailing whitespace in the header template. However after
we customize, we run format so the whitespaces are removed. That would
fail the checks of whether the header already exists. This PR removes
the trailing whitespaces thus after formatting the header still matches
the template.
  • Loading branch information
jeremymeng authored Oct 31, 2023
1 parent 369b113 commit 54c6760
Show file tree
Hide file tree
Showing 18 changed files with 2 additions and 273 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ const licenseHeader = `// Copyright (c) Microsoft Corporation.
const generatedCodeNotice = `
/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
*
* Any changes you make here may be lost.
*
*
* If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom
*/`;

Expand Down
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/WidgetServiceClient.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/api/WidgetServiceContext.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
15 changes: 0 additions & 15 deletions sdk/template/template-dpg/src/api/foo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,6 @@
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/
export function foo(): void {
console.log("foo");
}
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/api/models.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/api/operations.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/common/interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/rest/clientDefinitions.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/rest/index.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/rest/isUnexpected.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/rest/models.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/rest/outputModels.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/rest/parameters.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
16 changes: 0 additions & 16 deletions sdk/template/template-dpg/src/rest/responses.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
* Any changes you make here may be lost.
*
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
*/

/**
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
*
Expand Down
Loading

0 comments on commit 54c6760

Please sign in to comment.