Skip to content

Instantly share code, notes, and snippets.

@krokofant
Created May 21, 2019 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krokofant/0572d235a5b9ea9e422f9ac35662b74d to your computer and use it in GitHub Desktop.
Save krokofant/0572d235a5b9ea9e422f9ac35662b74d to your computer and use it in GitHub Desktop.
$files = git ls-files --eol *.less *.cshtml *.html *.txt *.config *.csproj *.sln *.cs *.js *.ts *.json *.bat *.ps1 --full-name;$files | Group-Object { $_.Split('.')[-1] } | Sort Count -Descending | Format-List @{Label="crlf"; Expression={$_.Group | ? { $_ -match "i/crlf" } | % {$i=0} {$i++} {$i} }},@{Label="lf"; Expression={$_.Group | ? { $_ -match "i/lf" } | % {$i=0} {$i++} {$i} }} -GroupBy @{Name="ext";Expression={"." + $_.Name}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment