Revert "generate_notice.py: don't check for strings we don't use any more."
This reverts commit adb8af2668
.
Reason for revert: DroidMonitor: Potential culprit for Bug 315240955 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
BUG: 315240955
BUG: 315240463
Change-Id: I9f7297c6ca48728a91f7f4640ac19f901effb3cc
This commit is contained in:
parent
adb8af2668
commit
ef867550ac
1 changed files with 12 additions and 0 deletions
|
@ -45,6 +45,14 @@ def is_interesting(path_str: str) -> bool:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def is_auto_generated(content):
|
||||||
|
if "Generated by gensyscalls.py" in content or "generated by genserv.py" in content:
|
||||||
|
return True
|
||||||
|
if "This header was automatically generated from a Linux kernel header" in content:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def is_copyright_end(line: str, first_line_was_hash: bool) -> bool:
|
def is_copyright_end(line: str, first_line_was_hash: bool) -> bool:
|
||||||
endings = [
|
endings = [
|
||||||
" $FreeBSD: ",
|
" $FreeBSD: ",
|
||||||
|
@ -145,6 +153,10 @@ def do_file(path: str) -> None:
|
||||||
warn_verbose("ignoring short file %s" % path)
|
warn_verbose("ignoring short file %s" % path)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if is_auto_generated(content):
|
||||||
|
warn_verbose("ignoring auto-generated file %s" % path)
|
||||||
|
return
|
||||||
|
|
||||||
if not "Copyright" in content:
|
if not "Copyright" in content:
|
||||||
if "public domain" in content.lower():
|
if "public domain" in content.lower():
|
||||||
warn_verbose("ignoring public domain file %s" % path)
|
warn_verbose("ignoring public domain file %s" % path)
|
||||||
|
|
Loading…
Reference in a new issue