Skip to content

Update to latest Resharper version (and related formatting improvements) #1191

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

Merged
merged 9 commits into from
Oct 3, 2022

Conversation

bkoelman
Copy link
Member

@bkoelman bkoelman commented Sep 23, 2022

This PR updates to the latest Resharper version. However, the InspectCode/CleanupCode steps are being skipped in cibuild on Linux due to this bug.

Part of this PR is improved formatting support:

  • Fixes an inconsistency in casing rules between Resharper and vanilla Visual Studio
  • Rider users can now run a full solution format, which properly formats .csproj files
  • There's no more need to tweak system-level settings in Rider, such as disabling .editorconfig support

Additionally, this PR simplifies argument null checks in code.

As usual, see the individual commits for details.

QUALITY CHECKLIST

  • N/A: Changes implemented in code
  • Complies with our contributing guidelines
  • N/A: Adapted tests
  • N/A: Documentation updated

@bkoelman bkoelman force-pushed the update-resharper-skip-linux branch from 4173c78 to 9b96a42 Compare September 23, 2022 22:51
@codecov
Copy link

codecov bot commented Sep 24, 2022

Codecov Report

Merging #1191 (292fb45) into master (79d918a) will increase coverage by 0.02%.
The diff coverage is 98.98%.

@@            Coverage Diff             @@
##           master    #1191      +/-   ##
==========================================
+ Coverage   92.59%   92.61%   +0.02%     
==========================================
  Files         242      242              
  Lines        7706     7701       -5     
==========================================
- Hits         7135     7132       -3     
+ Misses        571      569       -2     
Impacted Files Coverage Δ
...piDotNetCore/Diagnostics/AspNetCodeTimerSession.cs 15.38% <50.00%> (ø)
src/JsonApiDotNetCore.Annotations/ArgumentGuard.cs 80.00% <60.00%> (+6.66%) ⬆️
...c/JsonApiDotNetCore/Configuration/ResourceGraph.cs 72.88% <66.66%> (ø)
...onApiDotNetCore.Annotations/CollectionConverter.cs 90.90% <100.00%> (ø)
...tNetCore.Annotations/Configuration/ResourceType.cs 96.77% <100.00%> (ø)
...ons/Resources/Annotations/RelationshipAttribute.cs 100.00% <100.00%> (ø)
...ns/Resources/Annotations/ResourceFieldAttribute.cs 65.00% <100.00%> (ø)
...tations/Resources/Internal/RuntimeTypeConverter.cs 89.18% <100.00%> (ø)
...rc/JsonApiDotNetCore.Annotations/TypeExtensions.cs 91.66% <100.00%> (ø)
...AtomicOperations/EntityFrameworkCoreTransaction.cs 100.00% <100.00%> (ø)
... and 138 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@bkoelman bkoelman force-pushed the update-resharper-skip-linux branch from 68c4aa3 to edd7cef Compare September 24, 2022 02:59
@bkoelman bkoelman changed the title Update to latest Resharper version (skip on Linux) Update to latest Resharper version (and related formatting improvements) Sep 24, 2022
@bkoelman bkoelman force-pushed the update-resharper-skip-linux branch from 4cea396 to e9dbea8 Compare September 24, 2022 14:30
@bkoelman
Copy link
Member Author

@maurei Can you verify if the reformat works properly in Rider for macOS?

  1. Rider > Search everywhere: type "restore" > tab Actions > Restore default settings...
  2. Checkout branch for this PR
  3. Run git clean -xdf on repo root
  4. Open JsonApiDotNetCore.sln in Rider, rebuild
  5. Restart Rider and rebuild (this makes the squiggles go away, because the first time, source generators weren't yet compiled)
  6. Rider > Search everywhere: type "cleanup" > tab Actions > Reformat and Cleanup... > select "Whole Solution" with "JADNC Full Cleanup" profile > Run
  7. Rider > File > Save All
  8. Run git status and verify it prints "nothing to commit, working tree clean"

@bkoelman bkoelman marked this pull request as ready for review September 24, 2022 14:46
@bkoelman bkoelman requested a review from maurei September 24, 2022 14:46
@bkoelman bkoelman force-pushed the update-resharper-skip-linux branch 2 times, most recently from 7aa39c3 to befa644 Compare September 28, 2022 02:21
@bkoelman bkoelman force-pushed the update-resharper-skip-linux branch from befa644 to 292fb45 Compare October 2, 2022 15:48
@maurei
Copy link
Member

maurei commented Oct 3, 2022

Confirmed: it works as desired.

@maurei maurei merged commit 2e2c123 into master Oct 3, 2022
@maurei maurei deleted the update-resharper-skip-linux branch October 3, 2022 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants