Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tModCodeAssist rewrite #4099

Open
wants to merge 46 commits into
base: 1.4.4
Choose a base branch
from

Conversation

BasicallyIAmFox
Copy link
Contributor

@BasicallyIAmFox BasicallyIAmFox commented Mar 8, 2024

What is the new feature?

Reworked analyzers for tML.

  • Renamed tModLoader.CodeAssist to tModCodeAssist to fit with the tML branding
  • Moved tModCodeAssist to the tML repository and added it as an for mods analyzer in tModLoader.targets
  • Ported the old analyzer rules

Why should this be part of tModLoader?

Having tModCodeAssist in the tModLoader repository is much better than having it separately and publishing it as a nuget package because we don't have to consider supporting 1.3, 1.4.3, and 1.4.4 at the same time in one codebase. New analyzer rules will also help new modders port vanilla code and can help them simplify their own code.

Are there alternative designs?

  • Leaving the name as tModLoader.CodeAssist (bad)
  • Leaving the analyzer in a separate repository and making tML a submodule of it (bad)
  • Leaving the analyzer as a nuget package (bad)

Sample usage for the new feature

image

ExampleMod updates

N/A

TODO

  • Magic Number rules
  • Port rand simplify rule
  • Fully support the rest of ID classes (ItemID, NPCID, ProjectileID, etch)

@BasicallyIAmFox BasicallyIAmFox marked this pull request as draft March 13, 2024 18:20
@BasicallyIAmFox BasicallyIAmFox marked this pull request as ready for review March 15, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants