Skip to content

Commit dddcb5d

Browse files
authored
fix: assert copyright headers (#787)
utilizes flake8 plugin <https://pypi.org/project/flake8-copyright-validator/> to assert the correct headers Signed-off-by: Jan Kowalleck <[email protected]>
1 parent b2cc77e commit dddcb5d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+320
-32
lines changed

.flake8

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,26 @@ ignore =
1818
ANN101,ANN102
1919
# ignore ANN401 for dynamically typed *args and **kwargs
2020
ANN401
21+
22+
## https://pypi.org/project/flake8-copyright-validator/
23+
lines-to-exclude =
24+
'#!/usr/bin/env python'
25+
26+
## https://pypi.org/project/flake8-copyright-validator/
27+
copyright-text =
28+
'# This file is part of CycloneDX Python'
29+
'#'
30+
'# Licensed under the Apache License, Version 2.0 (the "License");'
31+
'# you may not use this file except in compliance with the License.'
32+
'# You may obtain a copy of the License at'
33+
'#'
34+
'# http://www.apache.org/licenses/LICENSE-2.0'
35+
'#'
36+
'# Unless required by applicable law or agreed to in writing, software'
37+
'# distributed under the License is distributed on an "AS IS" BASIS,'
38+
'# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.'
39+
'# See the License for the specific language governing permissions and'
40+
'# limitations under the License.'
41+
'#'
42+
'# SPDX-License-Identifier: Apache-2.0'
43+
'# Copyright (c) OWASP Foundation. All Rights Reserved.'

cyclonedx_py/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx_py/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx_py/_internal/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx_py/_internal/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx_py/_internal/cli_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx_py/_internal/environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx_py/_internal/pipenv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx_py/_internal/poetry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx_py/_internal/requirements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)