Skip to content

Latest commit

 

History

History
56 lines (48 loc) · 1.72 KB

README.md

File metadata and controls

56 lines (48 loc) · 1.72 KB

CI

VersioningUtils

List version controlled file paths. Git and SVN are supported.

Unit tests are the main target of this project.

Usage

  1. Add NuGet package
dotnet add package Versioning.Utils
  1. Get file paths
string[] paths = await VersioningUtils.GetVersionedFiles();
Console.WriteLine(String.Join("\n", paths));
/*
C:/projects/VersioningUtils/.editorconfig
C:/projects/VersioningUtils/.github/workflows/ci.yml
C:/projects/VersioningUtils/.gitignore
C:/projects/VersioningUtils/LICENSE.txt
...
*/

Requirements

  • .NET Core 3.0 or later (.NET Standard 2.1)
    • Tested environment
      • Windows 10 + Visual Studio 2019
      • Windows 10 + VS Code
      • GitHub actions (Ubuntu-latest)
  • Supported version control sysytem environment
  • Limitation
    • With svn
      • This package ignores files where the path has non ASCII letters.
      • This package ignores missing files in your local workspace.

Other Utilities

  • VersioningUtils.FindTrojanLetters(...)

    // Sample unit test code:
    var exts = new string[]{".cs"};
    var list = await VersioningUtils.FindTrojanLetters(exts);
    Assert.True(0 == list.Count(), $"Trojan source(s) detected.\n{String.Join("\n----\n", list)}");