diff --git a/scripts/ci/verify_license.py b/scripts/ci/verify_license.py index e7e1d0aca9b..851defc266f 100644 --- a/scripts/ci/verify_license.py +++ b/scripts/ci/verify_license.py @@ -19,6 +19,17 @@ # -------------------------------------------------------------------------------------------- """ +AUTOREST_LICENSE_HEADER = """# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +""" + def main(): env_path = os.path.join(REPO_ROOT, 'env') @@ -31,7 +42,7 @@ def main(): for python_file in file_itr: with open(python_file, 'r') as f: file_text = f.read() - if file_text and LICENSE_HEADER not in file_text: + if file_text and (LICENSE_HEADER not in file_text and AUTOREST_LICENSE_HEADER not in file_text): files_without_header.append(os.path.join(current_dir, python_file)) if files_without_header: