jak-project/scripts
Tyler Wilding c162c66118
g/j1: Cleanup all main issues in the formatter and format all of goal_src/jak1 (#3535)
This PR does two main things:
1. Work through the main low-hanging fruit issues in the formatter
keeping it from feeling mature and usable
2. Iterate and prove that point by formatting all of the Jak 1 code
base. **This has removed around 100K lines in total.**
- The decompiler will now format it's results for jak 1 to keep things
from drifting back to where they were. This is controlled by a new
config flag `format_code`.

How am I confident this hasn't broken anything?:
- I compiled the entire project and stored it's `out/jak1/obj` files
separately
- I then recompiled the project after formatting and wrote a script that
md5's each file and compares it (`compare-compilation-outputs.py`
- The results (eventually) were the same:

![Screenshot 2024-05-25
132900](https://github.com/open-goal/jak-project/assets/13153231/015e6f20-8d19-49b7-9951-97fa88ddc6c2)
> This proves that the only difference before and after is non-critical
whitespace for all code/macros that is actually in use.

I'm still aware of improvements that could be made to the formatter, as
well as general optimization of it's performance. But in general these
are for rare or non-critical situations in my opinion and I'll work
through them before doing Jak 2. The vast majority looks great and is
working properly at this point. Those known issues are the following if
you are curious:

![image](https://github.com/open-goal/jak-project/assets/13153231/0edfaba1-6d36-40f5-ab23-0642209867c4)
2024-06-05 22:17:31 -04:00
..
batch [jak3] implement pckernel (#3472) 2024-04-15 19:26:48 +01:00
ci New Crowdin updates (#3547) 2024-06-03 01:01:58 -04:00
cpp formatter: add tree-sitter dependency and commit early draft work on a proper code formatter (#2536) 2023-04-24 23:46:55 -04:00
emacs [goalc] add a build system (#704) 2021-07-15 21:37:15 -04:00
examples REPL related improvements and fixes (#3545) 2024-06-03 00:14:52 -04:00
gsrc g/j1: Cleanup all main issues in the formatter and format all of goal_src/jak1 (#3535) 2024-06-05 22:17:31 -04:00
shell decompiler: some hacks to allow running decompiler on jak 3 v5 code files, improve all-types generation (#2526) 2023-10-07 22:14:12 +02:00
sublime_text [decomp] load boundaries (#922) 2021-10-20 19:49:32 -04:00
tasks formatter: Format deftype correctly (#3391) 2024-02-27 20:12:44 -05:00
analyze_build_time.py Try to speed up the build (#106) 2020-10-29 21:27:52 -04:00
combine_all_imports.py [jak2] use art constants (#2097) 2023-01-07 10:32:03 -05:00
decomp_progress.py decomp3: some engine files (#3319) 2024-01-20 10:42:51 -05:00
gen-dgo-txt.py jak2: add .gd files and level info for some ps3 test levels (#2776) 2023-06-27 23:52:19 +02:00
gen-test-cases.py Improved test namings for multi-operations, added new ones, still a few failures (#190) 2021-01-10 15:46:46 -05:00
memory-dump-p2s.py random fixes + support clang-cl on visual studio (#1129) 2022-02-07 19:15:37 -05:00
setup_art_group_imports.py [decomp] add import statements for art groups (#1372) 2022-05-23 18:53:02 -04:00
subtitle2_gen.py Jak 2 pc subtitle support (#2672) 2023-06-08 01:04:16 +01:00
update_decomp_reference.py [decomp] fix up debug menu rendering, add a few others (#1892) 2022-09-16 20:42:33 -04:00