Commit graph

7 commits

Author SHA1 Message Date
Chris White
65c5db26b8 find-file-doc-comments: report filename on warning
Whenever the program issues a warning, report which filename
was being processed.  This should make it easier to diagnose any future
warnings (e.g., #186, #188).
2020-10-15 21:10:26 -04:00
Chris White
b74017c9df doc comments: support indented #defines
Fixes #188.
2020-10-15 20:56:48 -04:00
Chris White
81e0c296e4 Extract doc with multiple types for an identifier
Fixes #186.

In find-file-doc-comments.pl:
- Index doc comments by line, not identifier, since an identifier
  may be defined differently on different lines.
- Clean up debug printing so that the verbose output is easier to read.
- Use say() instead of print() to save space (say() automatically
  adds the `\n` to the output line).
2020-10-10 17:21:27 -04:00
Chris White
5ba86bde4d Improve doc-comment extraction (#134)
- Extract struct, enum, and macro docs
- Permit more forms of comment header.  Accept some that are technically
  ill-formed per [1] --- I think it's better for end-users if we are a
  bit more forgiving.

[1]  <https://www.kernel.org/doc/html/v5.8/doc-guide/kernel-doc.html>
2020-10-03 22:01:56 -04:00
Chris White
5e7cab18ca Added/updated copyright notices; whitespace fixes
No functional changes
2020-05-23 15:14:21 -04:00
Chris White
a171485c4f doc-comments: support uncommented first function
If the first function in a file does not have a doc comment, do not
run off the beginning of the file.  Fixes #102.

Also:
- Add t/tree/issue102.c that exhibits this bug.
- in find-file-doc-comments.pl and script.sh, exit with a nonzero code
  if this should recur.
2020-04-04 12:21:45 -04:00
Christopher White
8a6031c8a1 Add doc-comment extraction
- find-file-doc-comments.pl: new file
- data.py: Add database to store doc-comment locations
- script.sh: Add parse-docs subcommand
- update.py:
  - Add code to process doc comments
  - Update some variable names in hopes of reducing confusion
- query.py:
  - Add code to report doc comments
  - Update some variable names in hopes of reducing confusion

Also:
- t/TestEnvironment.pm: Add find_doc attribute
- t/interact.pl: Don't die if update.py fails
- t/TestHelpers.pm: Permit checking specific sections of query.py output
- t/300: update regexes per the preceding
- gitignore tags (ctags output) and .cache (api_test.py output)
2020-04-02 13:03:03 -04:00