b29d65416481efe627ee832e9f7e6646edcd81a6,tests/python/pants_test/test_utf8_header.py,Utf8HeaderTest,test_file_have_coding_utf8,#Utf8HeaderTest#,16
Before Change
buildroot = get_buildroot();
nonconforming_files = []
for root, dirs, files in os.walk(buildroot):
// build-support contains a lot of external files.
if root.find(os.sep + "build-support") >= 0:
continue
for filename in files:
if filename.endswith(".py"):
path = root + os.sep + filename;
with open(path, "r") as pyFile:
firstLine = pyFile.readline()
if not firstLine.rstrip() == "// coding=utf-8":
nonconforming_files.append(path)
if len(nonconforming_files) > 0:
self.fail("Expected these files to contain first line "// coding=utf8": "
+ str(nonconforming_files))
After Change
return (not tgt.is_synthetic) and tgt.is_original and tgt.has_sources(".py")
nonconforming_files = []
for target in build_file_parser.scan().targets(has_hand_coded_python_files) :
for src in target.sources_relative_to_buildroot():
with open(os.path.join(get_buildroot(), src), "r") as python_file:
first_line = python_file.readline()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: pantsbuild/pants
Commit Name: b29d65416481efe627ee832e9f7e6646edcd81a6
Time: 2014-06-16
Author: john.sirois@gmail.com
File Name: tests/python/pants_test/test_utf8_header.py
Class Name: Utf8HeaderTest
Method Name: test_file_have_coding_utf8
Project Name: pantsbuild/pants
Commit Name: b29d65416481efe627ee832e9f7e6646edcd81a6
Time: 2014-06-16
Author: john.sirois@gmail.com
File Name: src/python/pants/backend/jvm/tasks/check_published_deps.py
Class Name: CheckPublishedDeps
Method Name: __init__
Project Name: pantsbuild/pants
Commit Name: b29d65416481efe627ee832e9f7e6646edcd81a6
Time: 2014-06-16
Author: john.sirois@gmail.com
File Name: src/python/pants/backend/core/tasks/filemap.py
Class Name: Filemap
Method Name: _find_targets