mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-26 22:40:33 +00:00
Revert "Add duplicate match info to function report" (#1688)
Reverts Xeeynamo/sotn-decomp#1685
This commit is contained in:
parent
b31367b227
commit
0ac2fa8bf7
12
.github/workflows/validate-and-report.yml
vendored
12
.github/workflows/validate-and-report.yml
vendored
@ -191,12 +191,6 @@ jobs:
|
||||
make force_extract
|
||||
.venv/bin/python3 tools/analyze_calls.py
|
||||
git clean -fdx asm/
|
||||
- name: Generate duplicates report
|
||||
run: |
|
||||
make force_symbols
|
||||
make force_extract
|
||||
cd tools/dups
|
||||
cargo run --release -- --threshold .90 --output-file ../../gh-duplicates/duplicates.txt
|
||||
- name: Generate function report
|
||||
run: |
|
||||
git checkout config/
|
||||
@ -207,6 +201,12 @@ jobs:
|
||||
rm -rf gh-duplicates/function_calls/ || true
|
||||
mv function_calls gh-duplicates/
|
||||
mv function_graphs.md gh-duplicates
|
||||
- name: Generate duplicates report
|
||||
run: |
|
||||
make force_symbols
|
||||
make force_extract
|
||||
cd tools/dups
|
||||
cargo run --release -- --threshold .90 --output-file ../../gh-duplicates/duplicates.txt
|
||||
- name: Commit all reports
|
||||
run: |
|
||||
git config --global user.name 'GitHub Action'
|
||||
|
@ -141,7 +141,6 @@ if __name__ == "__main__":
|
||||
|
||||
wip = ""
|
||||
wip_percentage = ""
|
||||
dup = ""
|
||||
output.append(
|
||||
[
|
||||
ovl_name,
|
||||
@ -149,7 +148,6 @@ if __name__ == "__main__":
|
||||
length,
|
||||
branches,
|
||||
jump_table,
|
||||
dup,
|
||||
wip,
|
||||
wip_percentage,
|
||||
f["text"] # local asm
|
||||
@ -166,31 +164,13 @@ if __name__ == "__main__":
|
||||
for i, o in enumerate(output):
|
||||
# keep the in-source results as definitive
|
||||
if results[i] != None:
|
||||
o[6] = results[i]["link"]
|
||||
o[7] = results[i]["percent"]
|
||||
|
||||
base_url = (
|
||||
"https://raw.githubusercontent.com/Xeeynamo/sotn-decomp/gh-duplicates"
|
||||
)
|
||||
|
||||
if os.path.isfile("gh-duplicates/duplicates.txt"):
|
||||
with open("gh-duplicates/duplicates.txt", "r") as f:
|
||||
dups_text = f.read()
|
||||
else:
|
||||
print("'warning: gh-duplicates/duplicates.txt' file not found, skipping duplicate check", file=sys.stderr)
|
||||
dups_text = None
|
||||
|
||||
if dups_text is not None:
|
||||
for i, o in enumerate(output):
|
||||
full_match = rf'1.00.+{o[1]}.+{o[0]}';
|
||||
partial_match = rf'0.\d\d.+{o[1]}.+{o[0]}';
|
||||
|
||||
if re.search(full_match, dups_text) is not None:
|
||||
o[5] = f"[Full]({base_url}/duplicates.txt#:~:text={o[1]})"
|
||||
elif re.search(partial_match, dups_text) is not None:
|
||||
o[5] = f"[Part]({base_url}/duplicates.txt#:~:text={o[1]})"
|
||||
o[5] = results[i]["link"]
|
||||
o[6] = results[i]["percent"]
|
||||
|
||||
if args.use_call_trees:
|
||||
base_url = (
|
||||
"https://raw.githubusercontent.com/Xeeynamo/sotn-decomp/gh-duplicates"
|
||||
)
|
||||
for i, o in enumerate(output):
|
||||
unique_name = ".".join([o[0], o[1]])
|
||||
|
||||
@ -200,8 +180,8 @@ if __name__ == "__main__":
|
||||
|
||||
# delete asm text
|
||||
for o in output:
|
||||
del o[8:]
|
||||
del o[7:]
|
||||
|
||||
headers = ["Ovl", "Function", "Length", "Branches", "Jtbl", f"[Duplicate]({base_url}/duplicates.txt)", "WIP", "%"]
|
||||
headers = ["Ovl", "Function", "Length", "Branches", "Jtbl", "WIP", "%"]
|
||||
print(tabulate(output, headers=headers, tablefmt="github"))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user