From 1d7e34683183130d680055753308978d029af427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Van=20Canneyt?= Date: Mon, 5 Jun 2023 11:43:01 +0200 Subject: [PATCH] * Disable result, explicit list cmmand-line argument --- utils/fpdoc/unitdiff.pp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/utils/fpdoc/unitdiff.pp b/utils/fpdoc/unitdiff.pp index ee5f1f5d0a..c39ef5f89e 100644 --- a/utils/fpdoc/unitdiff.pp +++ b/utils/fpdoc/unitdiff.pp @@ -85,6 +85,9 @@ function TSkelEngine.CreateElement(AClass: TPTreeElement; const AName: String; begin Result:=Assigned(AParent) and (Length(AName) > 0) and + (not aPasElement.InheritsFrom(TPasUnresolvedTypeRef)) and + (not aPasElement.InheritsFrom(TPasUnresolvedUnitRef)) and + (not aPasElement.InheritsFrom(TPasUsesUnit)) and (not DisableArguments or ((APasElement.ClassType <> TPasArgument) and (not (aParent is TPasArgument)))) and (not DisableFunctionResults or (APasElement.ClassType <> TPasResultElement)) and (not DisablePrivate or (AVisibility<>visPrivate)) and @@ -109,6 +112,7 @@ begin Writeln(' --disable-arguments Do not check function arguments.'); Writeln(' --disable-private Do not check class private fields.'); Writeln(' --disable-protected Do not check class protected fields.'); + Writeln(' --disable-result Do not check Function results.'); Writeln(' --input=cmdline Input file to create skeleton for. Specify twice, once for each file.'); Writeln(' Use options as for compiler.'); Writeln(' --lang=language Use selected language.'); @@ -139,10 +143,14 @@ begin CmdLineAction := actionHelp else if s = '--disable-arguments' then DisableArguments := True + else if s = '--disable-result' then + DisableFunctionResults:=True else if s = '--disable-private' then DisablePrivate := True else if s = '--sparse' then SparseList := True + else if s = '--list' then + cmdLineAction := ActionList else if s = '--disable-protected' then begin DisableProtected := True; @@ -240,8 +248,8 @@ begin For I:=0 to List.Count-1 do begin If Not SparseList then - Write(GetTypeDescription(TPasElement(List.Objects[i])),' : '); - Writeln(List[i]); + Write(F,GetTypeDescription(TPasElement(List.Objects[i])),' : '); + Writeln(F,List[i]); end; end;