in atr/tasks/checks/license.py [0:0]
def _headers_check_core_logic_should_check(filepath: str) -> bool:
"""Determine if a file should be checked for license headers."""
ext = _get_file_extension(filepath)
if ext is None:
return False
# First check if we have comment style definitions for this extension
if ext not in COMMENT_STYLES:
return False
# Then check if the file matches any of our included patterns
for pattern in INCLUDED_PATTERNS:
if re.search(pattern, filepath, re.IGNORECASE):
return True
return False