SamplePlugin icon indicating copy to clipboard operation
SamplePlugin copied to clipboard

Reformat and update to .editorconfig + Remove Name

Open SayuShira opened this issue 2 years ago • 0 comments

Started by removing the property Name from plugin.cs that is now read from the manifest. (Discord message about this and that it should get a PR.)

Addresses #25.

  • Updated the .editorconfig with changes from goatcorp/Dalamud
  • Further rearranged and grouped properties to find and understand the config more easily
  • Removed now unused naming_rules (dotnet_naming_style.on_upper_camel_case_style.xxx)
  • Removed properties that had no effect due to being already defined (e.g. indent_size = 4 is defined for all files and doesn't need to be defined again for .c, .cs, .json,..)
  • Reformatted applicable files using the updated .editorconfig
    • .cs, .json, .targets, .csproj
    • didn't for now for packages.lock.json as it rebuilds with indent_size = 2

As of 80f0dd426b0e56751c2858a52af9ce872b98bd8c shouldn't include any functional difference other than some resharper_xxx being commented out due to not finding them (see below).

Would need help or an opinion on:

  • Removing [RequiredVersion("1.0")] in Plugin.cs
    • I read it is not necessary anymore and not planned to be reused in the future (got API levels now)
  • private instance fields are PascalCase but should be camelCase going by .editorconfig
    • e.g. private Configuration Configuration; vs. private Configuration configuration
    • Options I see:
      • Reformat to follow .editorconfig
      • Change private instance fields to PascalCase
      • Remove the style rule from .editorconfig if it is a preference
      • Change the style rule from a warning to a suggestion (which doesn't actually show at least in Rider)
  • Commented out all properties of .editorconfig that I couldn't find any documentation of (only some resharper_xxx are affected)
    • Stupid question: Do they exist and do something?
    • Keep them to make sure? Remove them for good?

SayuShira avatar Oct 06 '23 12:10 SayuShira