StyleCop / StyleCop.ReSharper

Official ReSharper extension for StyleCop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Version 2023.3 not in JetBrains Marketplace

JanHergenhan opened this issue · comments

In your change log, there was an update to version 2023.3.0 of the plugin. However, it does not seem to exist in the JetBrains Marketplace: https://plugins.jetbrains.com/plugin/11619-stylecop-by-jetbrains

I assume this is the reason why I cannot update to 2023.3 and make the plugin compatible with ReSharper.
image

And yes, I'm aware that the plugin is deprecated and only compatibility is maintained.

I'd like to ask a couple of questions: What features of the plugin are essential for you? Are you still on C# 6? Have you read about the built-in support for StyleCop config files (1, 2)?

A bit of background information: I'm the only team member using ReSharper, and we don't have a specific code style in place, but we're not too far off of another. Additionally, we're not explicitly on C# 6, which means that StyleCop flags newer C# features as errors (resulting in me resorting to more verbose code at times). Introducing StyleCop NuGet packages to our code base would be challenging and time-consuming. Therefore, I primarily rely on the ReSharper plugin for its convenience, particularly for tasks such as:

  • Auto-generating XML tags with Alt+Enter. Some times I change the generated text, often I leave it as is.
  • Formatting lines (especially when it comes to having all method parameters in one line or each parameter on a separate line)
  • Highlighting additional or missing new lines

Considering these factors, I could manage without the plugin. But I'd use it as long as it's available.

I'm aware of the config files, the severity settings are part of the editorconfig file.

I am using this extenstion as well. how hard is it to make it compatible with the new version of Resharper?

I'd like to ask a couple of questions: What features of the plugin are essential for you? Are you still on C# 6? Have you read about the built-in support for StyleCop config files (1, 2)?

@matkoch - Since the plugin is no longer in the store, all things have gone out-of-order. Somehow things aren't working right and well together without this plugin.

And the most notable part is that I have migrated to StyleCop.Analyzers in all projects long ago. Even though there was some text in the UI, (incorrectly) claiming that the presence of StyleCop.Analyzers would disable the plugin, it never worked rifght without this plugin.
It rather seems that without this plugin, the presence of StyleCop.Analyzers totally disables ReSharpers StyleCop support.

Examples:

  • With this plugin, I was getting code fixes offered by both, R# and StyleCop.Analyzers
    Now I'm getting those from StyleCop.Analyzers only
  • With this plugin, the scrollbar annotations and the icon on top, it was all in-sync with Stylecop errors. It only turned to green (checkmark) after the last StyleCop issue was addressed. Now it doesn't care about StyleCop issues anymore
  • When I suppress a StyleCop error, R# still shows a warning about it (according to its own logic)
    so I often need to add a StyleCop suppression PLUS a R# suppresion
  • Code Cleanup doesn't apply any StyleCop fixes without this plugin.

I don't think this is a special case - like misconfiguration or so - because I've seen this behavior regularly during the past years, which was always then, when a new R# version came out but the StyleCop plugin hadn't been updated yet.
Also it's not solution-specific, I have countless solutions and it's the same behavior with all of them.

Can you please publish the plugin until there's a really working solution for this?

Hi everyone,

First of all, thanks for your patience. I've just uploaded version 2023.3 of the extension. We discussed this extension and its future internally, and we plan to reimplement some features based on our own model. I don't have any ETA here, though.

Thanks!

LOL, three days ago I compiled it myself and added it to R# via local folder:
But anyway, thanks for publishing the new version.

Things are back to normal (usual) again now, besides one thing. I had hoped hoped that it would be fixed by the extension as well, but it didn't. It's abouit trailing whitespace warnings like here:

image

It happens when pressing enter in the editor and causes warnings about "Trailing whitespace" from both, R# and StyleCop.Analyzers (SA1208). This didn't happen earlier (previous R# version with previous StyleCop extension).

It's probably not about the warnings but about that the whitespace sequences are actually added to the file content whereas previous it seems that even through the cursor was positioned in the same way, the whitespaces wasn't actually added to the file.

Any idea where this might come from? Or should I rather open a support case about it?

Thanks