Skip to content

Commit eb2018d

Browse files
Merge pull request #49 from aligent/fix/report-to-file-path
fix: use command flag rather than stdout
2 parents c07cfa7 + d986886 commit eb2018d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pipe/pipe.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,14 @@ def filter_paths(path):
137137
"-d",
138138
"memory_limit=512M",
139139
"--report=junit",
140+
"--report-file=test-results/phpcs.xml"
140141
f"--standard={self.standards}"
141142
] + changed_files
142143

143144
phpcs = subprocess.run(phpcs_command, stdout=subprocess.PIPE,
144145
stderr=subprocess.PIPE, universal_newlines=True)
145146
self.standards_failure = False if phpcs.returncode == 0 else True
146147

147-
phpcs_output = phpcs.stdout.strip()
148-
149-
if phpcs_output:
150-
with open("test-results/phpcs.xml", 'a') as output_file:
151-
output_file.write(phpcs_output)
152-
153148
def composer_install(self):
154149
composer_install_command = ["composer", "install", "--dev"]
155150
composer_install = subprocess.run(composer_install_command)

0 commit comments

Comments
 (0)