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

Compiler Warnings Clean up #168

Merged
merged 15 commits into from
Nov 4, 2021
Merged

Compiler Warnings Clean up #168

merged 15 commits into from
Nov 4, 2021

Conversation

HenryMigo
Copy link
Contributor

Have done some clean-up within the code to remove compiler warnings.

I have implemented constructors where I can and ignore warnings as a last resort. In some cases we need to make sure where we don't allow NULL we have only constructors for that model, otherwise more NULL checking needs to happen within the code.

Outstanding Warnings:

  • 3692 relate to XML out of the 3708
  • 16 are other warnings

Relates to issue: #163

@HenryMigo
Copy link
Contributor Author

It ended up getting quite big so I drew the line here.

Copy link
Collaborator

@Craftplacer Craftplacer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @HenryMigo, congrats on your first pull request.

I've reviewed it and found several issues, I'd like you to take a look at them and resolve them with us.

Due to the size of the pull request I'm going to request reviews from some of our team members.

Obsidian.API/Plugins/PluginAttribute.cs Outdated Show resolved Hide resolved
Obsidian.API/Plugins/PluginBase.cs Outdated Show resolved Hide resolved
Obsidian.API/Plugins/Services/IDiagnoser.cs Outdated Show resolved Hide resolved
Obsidian.API/Plugins/Services/ILogger.cs Outdated Show resolved Hide resolved
Obsidian.API/_Attributes/RequirePermissionAttribute.cs Outdated Show resolved Hide resolved
Obsidian.API/_Types/Inventory/ItemMetaBuilder.cs Outdated Show resolved Hide resolved
Obsidian/Utilities/RentedArray.cs Outdated Show resolved Hide resolved
Obsidian/WorldData/BlockUpdates.cs Outdated Show resolved Hide resolved
Obsidian/WorldData/RegionFile.cs Outdated Show resolved Hide resolved
Obsidian/WorldData/World.cs Outdated Show resolved Hide resolved
@Craftplacer
Copy link
Collaborator

Craftplacer commented Oct 31, 2021

  • 3692 relate to XML out of the 3708

Tracked in #79

@HenryMigo
Copy link
Contributor Author

I have made the changes as per suggestions, let me know what you think

Copy link
Member

@Naamloos Naamloos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some small changes I'd like to see. I added some comments. I'll approve the PR because hacktober is ending soon but consider this a "request changes".

Obsidian.API/Plugins/PluginBase.cs Outdated Show resolved Hide resolved
Obsidian.Tests/Noise.cs Outdated Show resolved Hide resolved
Obsidian/Utilities/RentedArray.cs Outdated Show resolved Hide resolved
Obsidian/WorldData/RegionFile.cs Show resolved Hide resolved
SamplePlugin/SamplePlugin.cs Show resolved Hide resolved
SamplePlugin/SamplePlugin.cs Show resolved Hide resolved
Obsidian/WorldData/World.cs Outdated Show resolved Hide resolved
@HenryMigo
Copy link
Contributor Author

I will address the comments on this PR this evening if that's alright with everyone?

@Naamloos
Copy link
Member

Naamloos commented Nov 1, 2021

I will address the comments on this PR this evening if that's alright with everyone?

sure, no pressure

@HenryMigo HenryMigo requested a review from Naamloos November 1, 2021 13:11
Obsidian.API/Crafting/SmithingRecipe.cs Outdated Show resolved Hide resolved
Obsidian.API/Plugins/PluginWrapper.cs Outdated Show resolved Hide resolved
Obsidian.API/Plugins/Services/IFileWriter.cs Outdated Show resolved Hide resolved
Obsidian.API/Plugins/Services/IFileWriter.cs Outdated Show resolved Hide resolved
Obsidian.API/_Interfaces/ILiving.cs Outdated Show resolved Hide resolved
Obsidian.API/_Types/ChatMessage.cs Outdated Show resolved Hide resolved
Obsidian/WorldData/World.cs Outdated Show resolved Hide resolved
Obsidian/WorldData/BlockUpdates.cs Outdated Show resolved Hide resolved
Obsidian.API/Plugins/PluginAttribute.cs Outdated Show resolved Hide resolved
@HenryMigo HenryMigo requested a review from Seb-stian November 2, 2021 13:22
Copy link
Member

@Seb-stian Seb-stian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Job well done.

@HenryMigo
Copy link
Contributor Author

Just wanted to check that someone is able to complete this PR?

@HenryMigo
Copy link
Contributor Author

@Craftplacer how do I get this PR completed?

Copy link
Collaborator

@Craftplacer Craftplacer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm almost satisfied with the changes, the only issue I still see is that the constructor still requires all values to be set (related to Naam's review).

I'd suggest making that the only constructor only requires and sets Name, as to the other values can be set using [Plugin(name, Version = "1.0.0")] etc.

@HenryMigo
Copy link
Contributor Author

I'm almost satisfied with the changes, the only issue I still see is that the constructor still requires all values to be set (related to Naam's review).

I'd suggest making that the only constructor only requires and sets Name, as to the other values can be set using [Plugin(name, Version = "1.0.0")] etc.

I can make that change but this will bring back the compiler warning asking us to change the props to nullable if they are not in the constructor.

@HenryMigo HenryMigo requested a review from Craftplacer November 4, 2021 19:00
@Craftplacer
Copy link
Collaborator

I'm almost satisfied with the changes, the only issue I still see is that the constructor still requires all values to be set (related to Naam's review).

I'd suggest making that the only constructor only requires and sets Name, as to the other values can be set using [Plugin(name, Version = "1.0.0")] etc.

I can make that change but this will bring back the compiler warning asking us to change the props to nullable if they are not in the constructor.

You should make the properties that aren't required nullable, let me know about any issues you encounter doing that.

@HenryMigo
Copy link
Contributor Author

I'm almost satisfied with the changes, the only issue I still see is that the constructor still requires all values to be set (related to Naam's review).
I'd suggest making that the only constructor only requires and sets Name, as to the other values can be set using [Plugin(name, Version = "1.0.0")] etc.

I can make that change but this will bring back the compiler warning asking us to change the props to nullable if they are not in the constructor.

You should make the properties that aren't required nullable, let me know about any issues you encounter doing that.

Changes made :)

Copy link
Collaborator

@Craftplacer Craftplacer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aight

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.

5 participants