public override AstVisitAction VisitFunctionDefinition(FunctionDefinitionAst funcAst) { if ((!useFunctionWhitelist || functionWhitelist.Contains(funcAst.Name)) && funcAst.GetHelpContent() == null) { functionDefinitionAsts.Add(funcAst); } return(AstVisitAction.Continue); }
/// <summary> /// Visit function and checks that it has comment help /// </summary> /// <param name="funcAst"></param> /// <returns></returns> public override AstVisitAction VisitFunctionDefinition(FunctionDefinitionAst funcAst) { if (funcAst == null) { return(AstVisitAction.SkipChildren); } if (exportedFunctions.Contains(funcAst.Name)) { if (funcAst.GetHelpContent() == null) { DiagnosticRecords.Add( new DiagnosticRecord( string.Format(CultureInfo.CurrentCulture, Strings.ProvideCommentHelpError, funcAst.Name), funcAst.Extent, GetName(), DiagnosticSeverity.Information, fileName)); } } return(AstVisitAction.Continue); }