Skip to content

Conversation

@marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Jul 20, 2021

No description provided.

marc-hb added 3 commits July 20, 2021 07:19
Remove all the duplicate \file platform/lib/cpu.h. The \file parameter
is optional, the duplicates made these entire comments no-ops and spit a
lot of warnings.

Doxygen knows where the files are.

Removed the \file argument in other places as well which fixes a ton of
warnings like:

sof/src/audio/volume/volume_hifi3.c:7: warning: the name
'audio/volume_hifi3.c' supplied as the argument in the \file statement
is not an input file

Or:

sof/src/lib/pm_runtime.c:7: warning: the name 'lib/pm_runtime.c'
supplied as the argument in the \file statement matches the following
input files:
   sof/src/lib/pm_runtime.c
   sof/src/platform/intel/cavs/lib/pm_runtime.c
   sof/src/platform/library/lib/pm_runtime.c
Please use a more specific name by including a (larger) part of the path!

Note these warnings are not seen in the default doxygen configuration
which ignores a lot of comments.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
At first I assumed some refactorings forgot to update the comments to
match. Then I saw some of these could never had made sense ever.

This does not fix _all_ doxygen warnings, it only makes the remaining
warnings easy to grep -v. This is just good enough for me to test other
doxygen changes without being drown into warning noise.

C files are not parsed by the default doxygen configuration - "if it's
not tested then it does not work".

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Stop ignoring most comments in the trace.h file.

Confusingly, only comments in trace.c were considered because unlike
trace.h, trace.c is not turned off by the preprocessor but by CMake
instead.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Copy link
Contributor

@cujomalainey cujomalainey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for crossover, any chance we can have these kind of issues error out in CI?

@marc-hb
Copy link
Collaborator Author

marc-hb commented Jul 20, 2021

LGTM for crossover, any chance we can have these kind of issues error out in CI?

That would require:

  1. Automating a second doxygen configuration similar to the one I'm using to extract everything (doxygen is a very good code indexer, call graphs especially rock). Not rocket science, just a matter of finding some time to do it.
  2. Much more problematically, that would require fixing or reliably excluding all the other errors left. As I mentioned in one of the commit message, right now I'm using some ugly and unreliable grep -v that loses the exit status and barely does the job, leaving a (reasonable) number of errors make it through. WARN_IF_INCOMPLETE_DOC would go a long way but it won't be available before doxygen 1.10.

tl;dr: it should be possible but a significant amount of work.

Just for the record here's a raw dump of my current config:

+GENERATE_XML    = NO
+
+# CASE_SENSE_NAMES = NO
+INPUT            = @top_srcdir@/src/
 EXCLUDE                 = @top_srcdir@/src/include/sof/audio/MaxxEffect
 RECURSIVE       = YES
 FILE_PATTERNS    = *.c *.h
@@ -18,13 +14,21 @@ EXAMPLE_PATH     = @top_srcdir@/test
 IMAGE_PATH      =
 QUIET            = YES
 
+DOT_IMAGE_FORMAT = svg
+INTERACTIVE_SVG = YES
+
 EXTRACT_ALL     = YES
 EXTRACT_STATIC  = YES
+
 WARN_IF_UNDOCUMENTED = NO
-SHOW_INCLUDE_FILES = NO
+# Needs doxygen 1.10
+WARN_IF_INCOMPLETE_DOC = NO
+WARN_NO_PARAMDOC = NO
+
+SHOW_INCLUDE_FILES = YES
 JAVADOC_AUTOBRIEF = YES
 INHERIT_DOCS    = YES
-ENABLED_SECTIONS = ""
+# ENABLED_SECTIONS = ""
 MACRO_EXPANSION  = YES
 EXPAND_ONLY_PREDEF = YES
 PREDEFINED      = "__attribute__(x)= " \
@@ -32,10 +36,18 @@ PREDEFINED   = "__attribute__(x)= " \
                   "CONFIG_FORMAT_S32LE=1" \
                   "CONFIG_TRACE=1"
 
+SOURCE_BROWSER = YES
+STRIP_CODE_COMMENTS = NO
+
+HAVE_DOT = YES
+
+CALL_GRAPH = YES
+CALLER_GRAPH = YES
+
 OPTIMIZE_OUTPUT_FOR_C = YES
 TYPEDEF_HIDES_STRUCT = YES
 
 #INPUT_FILTER   = inputfilter
 #FILTER_SOURCE_FILES = YES
 
-HTML_TIMESTAMP = NO
+# HTML_TIMESTAMP = NO

@lgirdwood lgirdwood merged commit 3f4da1f into thesofproject:main Jul 21, 2021
@marc-hb marc-hb deleted the doxy-fixes branch July 26, 2021 17:39
@marc-hb marc-hb mentioned this pull request Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants