0
votes

We are documenting SAS code using doxygen (using EXTENSION_MAPPING = sas=Java) and our doxyfile is here.

The issue is that a bunch of tags are appearing under each file - as per the highlighted section below.

enter image description here

How can we remove these entries? For info, our generated docs are hosted here.

My doxygen version is 1.8.14

1
Please specify doxygen version and create a small example (just 1 file with one function will probably do) and type with a default Doxyfile with minimal changes and note the changes in the question.albert
ok, fair - will need a bit of time for this though as have had to make quite a few changes to the doxyfile to make the tool work with SAS files.Allan Bowe
I did some small experiments with a C header file but I didn't find a solution. I think that it will be hard at the moment I think a tweak of navtree.js (in the html output directory) around line 221 (newNode routine) might do the trick but it is very tricky and there are possibly side effects. My first idea was with the layout file, but I didn't see a possibility there.albert
Looks like it is generating those entries for words that starts with % in the source code. Why does it not generate one for %macro? Perhaps you can find the solution by figuring that out?Tom
You should have a look at the HTML output, due to changes between the version 1.8.14 you used and the version 1.8.17 some things in the html header and footer are not right anymore. Regarding your original problem I think it might be possible to solve it by means of filters in a FILTER_PATTERN where you filer out unknown constructs from sas in java and make the resulting code looking more like java (won't be easy though).albert

1 Answers

1
votes

Assuming that you are just using doxygen for the headers of the SAS macros that you have written, you can avoid that doxygen looks at (parts of) the code by enclosing those pieces in \cond and \endcond commands.

I have used doxygen on some SAS projects and the macros would be structured as follows:

/**
   \file       sasmacro.sas
   ...  <more doxygen commands>   
*/ /** \cond */ 

%macro sasmacro(); 
    ... 
%mend; 

/** \endcond */

Update: to check whether this would also work in your case, I forked the Macro Core repository on GitHub and ran doxygen (version 1.8.20) using the configuration file in the repository (I had to change some directories). The resulting doxygen documentation looked like this. As you can see in the image, I got way more tags than you did. I am not sure why this is the case.

After that I changed some of the macros (mf_abort, mf_existds and mf_getengine). Essentially, I wrapped them in the @cond and @endcond command as illustrated above. By the way, both @ and \ should work. I reran doxygen using the same settings and in my case all the tags are gone.

As an example the new version of mf_existds that I used:

/**
  @file mf_existds.sas
  @brief Checks whether a dataset OR a view exists.
  @details Can be used in open code, eg as follows:

      %if %mf_existds(libds=work.someview) %then %put  yes it does!;

  NOTE - some databases have case sensitive tables, for instance POSTGRES
    with the preserve_tab_names=yes libname setting.  This may impact
    expected results (depending on whether you 'expect' the result to be
    case insensitive in this context!)

  @param libds library.dataset
  @return output returns 1 or 0
  @warning Untested on tables registered in metadata but not physically present
  @version 9.2
  @author Allan Bowe
**/ /** @cond */

%macro mf_existds(libds
)/*/STORE SOURCE*/;

  %if %sysfunc(exist(&libds)) ne 1 & %sysfunc(exist(&libds,VIEW)) ne 1 %then 0;
  %else 1;

%mend;

/** @endcond */