from __future__ import division, print_function, absolute_import
from binaryornot.check import is_binary
-import anteater.utils.anteater_logger as antlog
+import logging
import hashlib
import six.moves.configparser
import sys
from . import get_lists
-logger = antlog.Logger(__name__).getLogger()
+logger = logging.getLogger(__name__)
config = six.moves.configparser.RawConfigParser()
config.read('anteater.conf')
reports_dir = config.get('config', 'reports_dir')
# Note: Hardcoded use of 'copyright' & 'spdx' is the result
# of a decision made at 2017 plugfest to limit searches to
# just these two strings.
- if re.search("copyright", content, re.IGNORECASE):
- logger.info('Contains needed Licence string: %s', patch_file)
- elif re.search("spdx", content, re.IGNORECASE):
+ patterns = ['copyright', 'spdx',
+ 'http://creativecommons.org/licenses/by/4.0']
+ if any(i in content.lower() for i in patterns):
logger.info('Contains needed Licence string: %s', patch_file)
else:
logger.error('Licence header missing in file: %s', patch_file)