protected override bool ShouldScanFileCore(CandidateFileContext context) { // https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows if (context.FileName.EndsWith(".yml", StringComparison.Ordinal) || context.FileName.EndsWith(".yaml", StringComparison.Ordinal)) { var directoryName = Path.GetFileName(context.Directory); if (directoryName.Equals("workflows", StringComparison.Ordinal)) { directoryName = Path.GetFileName(Path.GetDirectoryName(context.Directory)); if (directoryName.Equals(".github", StringComparison.Ordinal)) { return(true); } } } return(false); }
protected override bool ShouldScanFileCore(CandidateFileContext context) { // The behavior should be handled by the base class with the FilePatterns property return(false); }
public override bool ShouldScanFile(CandidateFileContext file) => false;
protected override bool ShouldScanFileCore(CandidateFileContext context) { return(context.FileName.Equals("global.json", StringComparison.Ordinal)); }
protected override bool ShouldScanFileCore(CandidateFileContext file) => throw new InvalidOperationException();
protected override bool ShouldScanFileCore(CandidateFileContext file) => true;