Skip to content

Commit

Permalink
Add missing license headers and make ddev validate license-headers
Browse files Browse the repository at this point in the history
…pass (DataDog#13511)

* Add missing license headers and make `ddev validate license-headers` pass

* Fix style

* Add Unicode BOM to files that require it

To avoid dealing with the special case of needing a "magic" comment
specifying the encoding for license header validation, since they are
only a few and it's only needed for Python 2, this adds the UTF-8 BOM
mark signature to those files needing it.
  • Loading branch information
alopezz authored Jan 10, 2023
1 parent 416aec7 commit 4f7bf83
Show file tree
Hide file tree
Showing 196 changed files with 668 additions and 28 deletions.
4 changes: 4 additions & 0 deletions active_directory/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

# Always prefer setuptools over distutils
# To use a consistent encoding
from codecs import open
Expand Down
3 changes: 3 additions & 0 deletions active_directory/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
3 changes: 3 additions & 0 deletions activemq_xml/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
4 changes: 4 additions & 0 deletions airflow/tests/k8s_sample/dags/task_fail.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from datetime import datetime

from airflow import DAG
Expand Down
4 changes: 4 additions & 0 deletions airflow/tests/k8s_sample/dags/task_ok.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from datetime import datetime

from airflow import DAG
Expand Down
4 changes: 4 additions & 0 deletions apache/datadog_checks/apache/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

__version__ = "4.2.0"
3 changes: 3 additions & 0 deletions aspdotnet/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
4 changes: 4 additions & 0 deletions avi_vantage/datadog_checks/avi_vantage/metrics.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

VIRTUAL_SERVICE_METRICS = {
# The following commented metrics are documented but don't seem to be available.
# "dns_client.avg_avi_errors": {
Expand Down
4 changes: 4 additions & 0 deletions avi_vantage/tests/test_config_validation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

import pytest

from datadog_checks.avi_vantage import AviVantageCheck
Expand Down
4 changes: 4 additions & 0 deletions btrfs/datadog_checks/btrfs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from .__about__ import __version__
from .btrfs import BTRFS

Expand Down
4 changes: 4 additions & 0 deletions btrfs/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

# To use a consistent encoding
from codecs import open
from os import path
Expand Down
3 changes: 3 additions & 0 deletions btrfs/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
3 changes: 3 additions & 0 deletions cacti/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
4 changes: 4 additions & 0 deletions calico/datadog_checks/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# (C) Datadog, Inc. 2022-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore
4 changes: 4 additions & 0 deletions calico/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2022-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from codecs import open # To use a consistent encoding
from os import path

Expand Down
4 changes: 3 additions & 1 deletion calico/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

# (C) Datadog, Inc. 2022-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
3 changes: 3 additions & 0 deletions cassandra/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
3 changes: 3 additions & 0 deletions cassandra_nodetool/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
4 changes: 4 additions & 0 deletions ceph/datadog_checks/ceph/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

__version__ = "2.7.0"
4 changes: 4 additions & 0 deletions ceph/datadog_checks/ceph/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from .__about__ import __version__
from .ceph import Ceph

Expand Down
4 changes: 4 additions & 0 deletions ceph/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

# To use a consistent encoding
from codecs import open
from os import path
Expand Down
3 changes: 3 additions & 0 deletions ceph/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
4 changes: 4 additions & 0 deletions cert_manager/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2022-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from codecs import open # To use a consistent encoding
from os import path

Expand Down
3 changes: 3 additions & 0 deletions cilium/tests/legacy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
4 changes: 4 additions & 0 deletions cisco_aci/tests/cisco_aci_query.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2022-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

import json

import requests
Expand Down
2 changes: 1 addition & 1 deletion cisco_aci/tests/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# C Datadog, Inc. 2018
# (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under Simplified BSD License see LICENSE

Expand Down
2 changes: 1 addition & 1 deletion cisco_aci/tests/mock_sender.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# C Datadog, Inc. 2018
# (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under Simplified BSD License see LICENSE

Expand Down
4 changes: 4 additions & 0 deletions consul/datadog_checks/consul/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

__version__ = "2.2.0"
4 changes: 4 additions & 0 deletions consul/datadog_checks/consul/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from .__about__ import __version__
from .consul import ConsulCheck

Expand Down
3 changes: 3 additions & 0 deletions consul/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
4 changes: 4 additions & 0 deletions couch/datadog_checks/couch/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

__version__ = "5.2.0"
3 changes: 3 additions & 0 deletions couch/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
4 changes: 4 additions & 0 deletions couchbase/datadog_checks/couchbase/couchbase_consts.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

import re

from datadog_checks.base import AgentCheck
Expand Down
3 changes: 3 additions & 0 deletions couchbase/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
4 changes: 4 additions & 0 deletions crio/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from codecs import open # To use a consistent encoding
from os import path

Expand Down
4 changes: 4 additions & 0 deletions crio/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from copy import deepcopy

import pytest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
from ...utils import complete_valid_checks
from ..console import CONTEXT_SETTINGS, abort, echo_failure, echo_info, echo_success, echo_warning

IGNORES = {"datadog_checks_dev": ["datadog_checks/dev/tooling/templates"], "all": ["tests/compose", "tests/docker"]}
IGNORES = {
"all": ["tests/compose", "tests/docker"],
"datadog_checks_dev": ["datadog_checks/dev/tooling/templates"],
"php_fpm": ["datadog_checks/php_fpm/vendor"],
"snmp": ["tests/mibs"],
"tokumx": ["datadog_checks/tokumx/vendor"],
}


@click.command(context_settings=CONTEXT_SETTINGS, short_help='Validate license headers in python files')
Expand Down
4 changes: 4 additions & 0 deletions directory/datadog_checks/directory/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from .__about__ import __version__
from .directory import DirectoryCheck

Expand Down
3 changes: 3 additions & 0 deletions directory/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
3 changes: 3 additions & 0 deletions dns_check/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
4 changes: 4 additions & 0 deletions dotnetclr/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

# To use a consistent encoding
from codecs import open
from os import path
Expand Down
3 changes: 3 additions & 0 deletions dotnetclr/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
3 changes: 3 additions & 0 deletions ecs_fargate/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
4 changes: 4 additions & 0 deletions eks_fargate/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

import sys


Expand Down
4 changes: 4 additions & 0 deletions envoy/datadog_checks/envoy/parser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

import re
from math import isnan
from typing import Any, Dict, List, Tuple
Expand Down
4 changes: 4 additions & 0 deletions envoy/datadog_checks/envoy/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

import re

import requests
Expand Down
3 changes: 3 additions & 0 deletions envoy/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
4 changes: 4 additions & 0 deletions envoy/tests/common.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

import os

import pytest
Expand Down
4 changes: 4 additions & 0 deletions envoy/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

import os

import pytest
Expand Down
3 changes: 3 additions & 0 deletions envoy/tests/legacy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
4 changes: 4 additions & 0 deletions envoy/tests/legacy/common.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

import os

from datadog_checks.dev import get_docker_hostname
Expand Down
4 changes: 4 additions & 0 deletions envoy/tests/legacy/test_bench.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

import pytest

from datadog_checks.envoy import Envoy
Expand Down
4 changes: 4 additions & 0 deletions envoy/tests/legacy/test_metrics.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from datadog_checks.envoy.metrics import METRIC_PREFIX, METRIC_TREE, METRICS
from datadog_checks.envoy.utils import make_metric_tree

Expand Down
4 changes: 4 additions & 0 deletions envoy/tests/legacy/test_parser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

import pytest

from datadog_checks.envoy.errors import UnknownMetric, UnknownTags
Expand Down
4 changes: 4 additions & 0 deletions envoy/tests/legacy/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from datadog_checks.envoy.utils import make_metric_tree


Expand Down
4 changes: 4 additions & 0 deletions envoy/tests/test_check.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

import pytest

from datadog_checks.dev.utils import get_metadata_metrics
Expand Down
4 changes: 4 additions & 0 deletions envoy/tests/test_e2e.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

import pytest

from datadog_checks.envoy import Envoy
Expand Down
3 changes: 3 additions & 0 deletions etcd/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
3 changes: 3 additions & 0 deletions exchange_server/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
3 changes: 3 additions & 0 deletions fluentd/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
4 changes: 4 additions & 0 deletions fluentd/tests/mock/fluentd_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

import sys

if __name__ == "__main__":
Expand Down
4 changes: 4 additions & 0 deletions foundationdb/datadog_checks/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# (C) Datadog, Inc. 2022-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore
Loading

0 comments on commit 4f7bf83

Please sign in to comment.