Skip to content

Commit

Permalink
- B fix issue in Cyber-dojo
Browse files Browse the repository at this point in the history
issue is that in cyber dojo it is doing a shallow compare and
the Shallow compare ERRONEOUSLY shows that files match

Co-Authored-By: Nitsan Avni <nitsanav@gmail.com>
Co-Authored-By: 4dsherwood <4dsherwood@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 28, 2024
1 parent 2bdb007 commit bcba3ba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ Rotate on green was designed for git handoff, each commit is green
Ping-Pong Pairing
Try to make the smallest change possible, then rotate

Support inline on CyberDojo
IF it is in CyberDojo AND inline approvals,
THEN we need to do a deep compare

how could we fix this?
option 1: we can use the automatic approver
not there is a bug in the automatic approver
option 2: Llewellyns idea

POssible FEATURE
Create an API to add a REPORTER.
now we have a combined reporter and then ?? only the last one works?

Inline Approvals Bugs
1. [ ] rename all of the reporters to start with the word report
Expand All @@ -38,7 +50,8 @@ Inline Approvals Bugs
6. [ ] some relationship between the output formatter and the parser
7. [X ] Move explainations to ApprovalTests.Documentation
Please note: we found this broken link [Capture .received. files from CI]
8. * [ ] this link: [Capture .received. files from CI](https://github.com/approvals/ApprovalTests.Java/blob/master/approvaltests/docs/explanations/how_to/CaptureFilesFromCI.md)
8. * [ ] this link:
* [Capture .received. files from CI](https://github.com/approvals/ApprovalTests.Java/blob/master/approvaltests/docs/explanations/how_to/CaptureFilesFromCI.md)



Expand Down
2 changes: 1 addition & 1 deletion approvaltests/file_approver.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class FileComparator(Comparator):
def compare(self, received_path: str, approved_path: str) -> bool:
if not exists(approved_path) or not exists(received_path):
return False
if filecmp.cmp(approved_path, received_path):
if filecmp.cmp(approved_path, received_path, shallow=False):
return True
try:
approved_raw = pathlib.Path(approved_path).read_text()
Expand Down

0 comments on commit bcba3ba

Please sign in to comment.