JsonApiDotNetCore icon indicating copy to clipboard operation
JsonApiDotNetCore copied to clipboard

Enable running code cleanup locally only on files changed since the specified branch

Open bkoelman opened this issue 2 years ago • 1 comments

This PR adds an optional parameter to cleanupcode.ps1, which allows formatting only changed files since a git branch or commit hash. And it now includes staged and unstaged files.

Example usage:

C:\Source\Repos\JsonApiDotNetCore [cleanupcode-diff ≡]> ./cleanupcode.ps1 master

Fixes #1112 (well, the first bullet of https://github.com/json-api-dotnet/JsonApiDotNetCore/issues/1112#issuecomment-975354625; the second one can be addressed by importing the severities layer locally).

QUALITY CHECKLIST

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

bkoelman avatar Jul 31 '22 09:07 bkoelman

Codecov Report

Merging #1173 (770b848) into master (0185311) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1173   +/-   ##
=======================================
  Coverage   92.58%   92.58%           
=======================================
  Files         241      241           
  Lines        7700     7700           
=======================================
  Hits         7129     7129           
  Misses        571      571           

Help us with your feedback. Take ten seconds to tell us how you rate us.

codecov[bot] avatar Jul 31 '22 10:07 codecov[bot]

THANK you for this one. Long overdue!

maurei avatar Sep 06 '22 14:09 maurei