Make Doxygen Document the doxygen.config File - doxygen

I want to add doxygen tags to the actual doxygen.config file. Why? I want to document why we chose certain settings.
I set the following in the doxygen config file:
EXTENSION_MAPPING = *.config=Python
FILE_PATTERNS = *.c \
*.h \
*.md \
*.cpp \
path/to/config/file/doxygen.config
I added the following to the beginning of the config file:
## #file
#
## #page doxygen settings
# hello
However, I get nothing but doxygen.config in the file list.
Anyone know how to document the config file?

Related

How do I pull compile_commands.json from a subdirectory?

I've got a c++ cmake project. I've created a subdirectory work in the main directory that I'm using for compilation. When I compile the project I cd into work and do cmake .. && make. This way, compiler files do not pollute the main directory. work is also the directory, where compile_commands.json is generated, and I use that for coc syntax highlighting.
As long as it's in the subdirectory, coc can't find it, therefore, I created a softlink in the main directory that leads to the file. This works, and another solution would be adding a command to CMakeLists.txt that would copy the file to the main directory, but I keep wondering if there is a better way to do it. And with a better way, I mean, something like creating .vimrc in the main directory and writing in it commands that coc could use to find the file.
So far, I have found vim command that allows me to move into that direction, set exrc will load local .vimrc files
One thing I've tried is putting
" setting with vim-lsp
if executable('ccls')
au User lsp_setup call lsp#register_server({
\ 'name': 'ccls',
\ 'cmd': {server_info->['ccls']},
\ 'root_uri': {server_info->lsp#utils#path_to_uri(
\ lsp#utils#find_nearest_parent_file_directory(
\ lsp#utils#get_buffer_path(), ['.ccls', 'compile_commands.json', '.git/', 'work/compile_commands.json' ]))},
\ 'initialization_options': {
\ 'highlight': { 'lsRanges' : v:true },
\ 'cache': {'directory': stdpath('cache') . '/ccls' },
\ },
\ 'whitelist': ['c', 'cpp', 'objc', 'objcpp', 'cc'],
\ })
endif
into the local .vimrc file, but that didn't work
What command should I put into the .vimrc located in the main directory to tell coc plugin to look for ./work/compile_commands.json?
Build your project with clang++
Add -MJ to compile command -
clang++ -MJ a.o.json -Wall -std=c++11 -o a.o -c a.cpp
And combine *.o.json to compile_commands.json file using -
find ./work -name '*.o.json' -print0 | xargs -0 sed -e '1s/^/[\n/' -e '$s/,$/\n]/' > ./work/compile_commands.json

downloading using wget for multiple files, with renaming of files

I am aware that you can download from multiple url using:
wget "url1" "url2" "url3"
Renaming the output file can be done via:
wget "url1" -O "new_name1"
But when I tried
wget "url1" "url2" "url3" -O "name1" "name2" "name3"
all the files are using name1.
what is the proper way to do so in a single command?
Yes something like this, You can add a file name next to each URL in the file then do:
while IFS= read -r url fileName;do
wget -O "$fileName" "$url"
done < list
where it is assumed you have added a (unique) file name after each URL in the file (separated by a space).
The -O option allows you to specify the destination file name. But if you're downloading multiple files at once, wget will save all of their content to the file you specify via -O. Note that in either case, the file will be truncated if it already exists. See the man page for more info.
You can exploit this option by telling wget to download the links one-by-one:
while IFS= read -r url;do
fileName="blah" # Add a rule to define a new name for each file here
wget -O "$fileName" "$url"
done < list
hope it useful.

DoxygenLayout.xml parsing not finding explicit link request

I am migrating from doxygen 1.8.4 to 1.8.8. My DoxygenLayout.xml file has an entry like this:
<tab type="user" url="#ref FAQ" visible="yes" title="FAQ" intro=""/>
In my Doxyfile, my INPUT includes "faq.htm" and I see in the Doxy output:
Reading /git/bfg_iOS_sdk/bfg_internal/docs/htmlFramework/faq.htm...
My "faq.htm" file begins like this:
/**
\page FAQ Frequently Asked Questions
\ingroup FAQ
\{
With Doxy 1.8.4, there was no issue. In 1.8.8 I see these warnings:
explicit link request to 'FAQ' in layout file 'DoxygenLayout.xml' could not be resolved
What am I doing wrong?
Update
I am (and have been) using these file patterns:
FILE_PATTERNS = *.m \
*.mm \
*.html \
*.h \
*.htm
I continue to see these warnings with Doxygen 1.8.10, and my doc set fails to build properly.
This error occurs because you are referencing the FAQ group in your DoxygenLayout.xml, but no file is associated with that group.
In this case, the reason is probably because your html file is not being read and parsed by Doxygen. This is because the default DoxygenConfig FILE_PATTERNS parameter does not include html by default.
Try changing your FILE_PATTERNS to include html and all other desired extensions, perhaps like this:
FILE_PATTERNS = *.html *.htm \
*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ \
*.inl *.idl *.ddl *.odl *.h *.hh *.hxx *.hpp *.h++ *.cs \
*.d *.php *.php4 *.php5 *.phtml *.inc *.m *.markdown *.md \
*.mm *.dox *.py *.f90 *.f *.for *.tcl *.vhd *.vhdl *.ucf \
*.qsf *.as *.js
You can also change EXTENSION_MAPPING to determine which parser will be used for your HTML file, since there is not a default HTML parser. The syntax you mentioned worked fine for me.
I am not sure why this changed from version 1.8.4 to 1.8.8. This bug report for version 1.8.10 implies that this is a common mistake, and the developers even added documentation to clarify this behavior.
Note from the OP --
I needed this mapping:
EXTENSION_MAPPING = htm=Objective-C html=Objective-C

Splitting a command over multiple lines in fish-shell

I'm trying to split my list of additional paths on to multiple lines in my fish config:
# Path additions
for i in \
~/Library/Haskell/ghc-7.0.2/lib/gtk2hs-buildtools-0.12.0/bin \
~/Library/Haskell/bin \
/Applications/MacVim.app/Contents/MacOS \
/opt/local/bin \
/usr/local/bin \
/usr/local/git/bin \
/Users/lyndon/.gem/ruby/1.8/bin
if not contains $i $PATH
set -x PATH $i $PATH
end
end
However, this doesn't seem to work unless all the items are on one line.
Is this possible? I can't seem to find any information on doing this.
Alternatively, is there a way to use a list/array literals to do this?
I'm using fish 2.0.0 on OSX 10.8.5 and your example works as I would expect (for paths that exist on my machine).
Running this code
# Path additions
for i in \
~/bin \
~/.config/fish/functions
if not contains $i $PATH
echo $i
end
end
where ~/bin is set on PATH and ~/.config/fish/functions is not, outputs:
~/bin
I appended the above to my fish config and then ran it like this:
. ~/.config/fish/config.fish
Here is a little more info on multiline editing: http://fishshell.com/docs/2.0/index.html#multiline
There are no array literals in fish. You can read more about fish arrays in the docs. http://fishshell.com/docs/2.0/index.html#variables-arrays

Doxygen does not show Namespaces tab in document although show is YES

I am using doxygen for sometime. I previously generated a documentation for my source code with namespaces. It was working OK. But now I created a new project for my new sources and Doxygen does not put Namespaces tab to the documents although SHOW_NAMESPACES is YES and there are lots of namespaces in the source code. The namespace of classes are seen when selected but I dont have the tab.
What could be the problem?
You either need to give the namespaces some documentation or set EXTRACT_ALL to YES.
Example:
$ mkdir test-dir
$ cd test-dir
$ echo 'namespace test {}' > test.hpp
$ doxygen -g # generate default config file
(output)
$ grep -P '^(EXTRACT_ALL|SHOW_NAMESPACES)' Doxyfile # show default settings
EXTRACT_ALL = NO
SHOW_NAMESPACES = YES
$ doxygen # generate docs
(output)
Now open html/index.html, there won't be a namespace tab. This is what you're seeing.
$ sed -i '/^EXTRACT_ALL/s/NO/YES/' Doxyfile # change setting
$ grep -P '^(EXTRACT_ALL|SHOW_NAMESPACES)' Doxyfile # show change
EXTRACT_ALL = YES
SHOW_NAMESPACES = YES
$ doxygen
(output)
Now open html/index.html, there will be a namespace tab.
Tested with doxygen 1.6.3.