michaelfeathers / scythe

A tool for detecting barely used code in production
220 stars 14 forks source link

.NET version? #3

Open KevinT opened 7 years ago

KevinT commented 7 years ago

I'd be keen to put a C# version of this out. Would you prefer I did it as a completely separate implementation, or part of this scythe repo?

michaelfeathers commented 7 years ago

Would be great to have it in the repo. Have you considered just adding a C# probe and running the Ruby version? Too weird?

KevinT commented 7 years ago

Would probably be good for a simplest first pass, but might not be the lightest-weight approach, if that's what is being optimized for?

-- Touched, not typed.

On Sun, Dec 4, 2016 at 1:12 AM +0200, "Michael Feathers" notifications@github.com wrote:

Would be great to have it in the repo. Have you considered just adding a C# probe and running the Ruby version? Too weird?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

michaelfeathers commented 7 years ago

Light-weight in what sense?

KevinT commented 7 years ago

Assuming this is your overarching optimising goal:

Scythe is a light-weight tool for detecting dead and infrequently used code in production.

I'm thinking some people might have an issue putting Ruby into prod on a .NET architecture - or at least having to jump through some hoops to make it happen. Which would fail the 'light-weight' heuristic. Am I overthinking it?

antondelsink commented 7 years ago

What @KevinT said re Ruby into prod is true for my use case, so I'll just add the C# class I created into an existing library (see #5), then use the command line to manually check probes.

antondelsink commented 7 years ago

instead of installing Ruby, PowerShell to the rescue: Get-ChildItem | select Name, @{Name="Multiple Uses";Expression={$_.CreationTime -ne $_.LastWriteTime}} | ft

kritulrathod commented 6 years ago

@KevinT Not sure if you still need it - Here is my attempt to adapt the Scythe concept in C# - https://github.com/kritulrathod/Scythe

Hope that helps.