We have a file, 'documentation.cs', that we don't want shown in our Doxygen file list. What should I add to our config or the file to hide it from the file list?
2 Answers
You can also simply change the filename do a .dox
, .doc
or .txt
extension. Refer to this answer:
There are 3 possible extensions which doxygen treats as additional documentation files: .dox, .txt, and .doc.
Files [with] such extension are hidden from the file index. Inside the file you need to put one or more C/C++ style comment blocks.
So rename 'documentation.cs' to 'documentation.dox', but leave the C-style comments inside. (assuming that's what you use - not sure why you decided to add the .cs extension, it doesn't seem like it's actually a C# source file)
Make sure you leave the file in the current directory (if INPUT is left empty) or add it to a directory included in the INPUT
setting.
EDIT: According to this webpage you may have to add FILE_PATTERNS += *.dox
to your Doxyfile. I don't know if the file extensions are automatically supported nowadays or not but they weren't when the blog was written.
The Doxygen documentation for EXCLUDE states:
The EXCLUDE tag can be used to specify files and/or directories that should be excluded from the INPUT source files. This way you can easily exclude a subdirectory from a directory tree whose root is specified with the INPUT tag. Note that relative paths are relative to the directory from which doxygen is run.
So you can add this line to your doxygen configuration file to remove documentation.cs
:
EXCLUDE_PATTERNS = documentation.cs
# EXCLUDE_PATTERNS = */documentation.cs
And then if you wanted to hide more files...
EXCLUDE_PATTERNS += another_file.cs
This also works for entire directories.
EXCLUDE_PATTERNS += */directory/*
-
This also works fine but your other solution is easier. Thanks for being #SOreadytohelp `:-)` – Nov 21 '16 at 16:43