DoxygenLayout.xml parsing not finding explicit link request - doxygen

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

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

sed: -e expression #1, char 62: unknown command: `\'

I am trying to add
-
paths:
- /var/log/consumer.log
document_type: consumer
input_type: log
after prospectors: in my file. I am using command:
sed -i '/prospectors:/a\ \ \ \ \-
\ \ \ \ \ \ paths:\
\ \ \ \ \ \ \- \/var\/log\/consumer.log
\ \ \ \ \ \ document_type: consumer
\ \ \ \ \ \ input_type: log' new.txt
But the above command gives following error:
sed: -e expression #1, char 62: unknown command: `\'
How can I achieve the desired?
In classic (POSIX) sed, each line of data appended needs to be on its own line after the a command, and all lines except the last need a backslash at the end to indicate that the data continues. GNU sed allows some information on the same line as the a command, but otherwise follows the rules.
There's an additional wrinkle: sed removes leading blanks from the data. To get the leading blanks, you can use backslash-blank at the start.
Hence, you can end up with:
sed -i '/prospectors:/a \
\ -\
\ paths:\
\ - /var/log/consumer.log\
\ document_type: consumer\
\ input_type: log' new.txt
The leading blanks are ignored; the backslash is deleted; the following blanks are copied to the output. Thus given an input containing just a line containing prospectors:, the output is:
prospectors:
-
paths:
- /var/log/consumer.log
document_type: consumer
input_type: log
Obviously, you can adjust the spacing to suit yourself.
I note that BSD sed requires a suffix after the -i option; it can be -i '' to get an 'empty string' suffix. To be portable between GNU and BSD sed, use -i.bak (no space; GNU sed doesn't like the space; BSD sed accepts the attached suffix, but you can't attach an empty suffix). And the -i option is not mandated by POSIX, so it isn't available on all Unix-like systems. If you're only using GNU sed, you don't have to worry about this trivia.

Get rid of absolute paths from coverage.xml report generated by coverage.py

Is there a way to get relative paths to resulted coverage.xml (or strip off prefix) using coverage.py?
I could only manage to sed the console output. The bash code below will expand "../myrootmodule" and remove it from the coverage output. It will also adjust the spaces to preserve the columns alignment. You must adjust the myrootmodule path (first line only).
prefix="$$(readlink -e $$(dirname $$(pwd)))/myrootmodule/"; \
coverage report \
| sed "s|$$prefix||" \
| sed "s/^-\{$${#prefix}\}//" \
| sed "s/^Name \{$${#prefix}\}/Name/" \
| sed "s/^TOTAL \{$${#prefix}\}/TOTAL/"
As it is big, I include it in tests/Makefile.

Make Doxygen Document the doxygen.config File

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?

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