public CodeSanityValidator(ValidateCodeSanitySettings settings) { isAppveyorBuild = settings.IsAppveyorBuild; rootDirectory = settings.RootDirectory; string ignoreFile = Path.Combine(rootDirectory, ".cfsignore"); if (File.Exists(ignoreFile)) { ignorePaths = ignorePaths.Union(File.ReadAllLines(ignoreFile)).ToArray(); } }
public static void ValidateCodeSanity(this ICakeContext context, ValidateCodeSanitySettings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } var codeSanityValidator = new CodeSanityValidator(settings); codeSanityValidator.Validate(); if (codeSanityValidator.HasErrors) { throw new CakeException("Code sanity validation failed."); } }
public CodeSanityValidator(ValidateCodeSanitySettings settings) { isAppveyorBuild = settings.IsAppveyorBuild; rootDirectory = settings.RootDirectory; }