Functions | |
def | sep_re (field, separator) |
Variables | |
string | fileclass = r"[\w-]" |
string | filename = rf"{fileclass}+" |
string | filepath = rf"{sep_re(filename, '/')}\.(?:\w+)" |
string | main_match = rf"(?P<path>/{filepath}|\[generated\]):(?P<linenumber>\d+): warning:" |
string | type_name = rf"(?:const )?(?:unsigned (?:long )?|struct |enum )?(?:\w+)(?: \*?const)? \*{{0,3}}" |
string | var_def = rf"{type_name}\w+(?:\[(?:\(\d+/\d+\))?\])?" |
string | func_params = rf"\({sep_re(var_def, ', ')}(?:,\.\.\.)?\)" |
string | simple_name = r"\w+" |
string | func_name = simple_name |
string | verbose_name = rf"{sep_re(simple_name, ' ')}" |
string | command_re = "(?:</[^>]+>|\\\w+)" |
string | macro_params = rf"\({sep_re(simple_name, ', ')}(?:,\.\.\.)?\)" |
dictionary | matches |
parser_choices | |
parser = ap.ArgumentParser() | |
action | |
choices | |
dest | |
args = parser.parse_args() | |
dictionary | sorted_lines = {k:[] for k in matches.keys()} |
list | unsorted_lines = [] |
dictionary | processed_lines |
dictionary | counts = {k: len(v) for k, v in processed_lines.items()} |
Filters and processes warnings generated by Doxygen, which are annoyingly inconsistent and verbose, for greater readability. (Neo)vim commands to go to the file and linenumber listed on a line, in the reports this program generates: :exe "let linenumber =" split(getline("."))[1] :exe "edit" fnameescape(split(getline("."))[0]) "|" linenumber It's easy to put a workflow together to clear up redundant doc comments (which generate "multiple @param docs" warnings), using simple vim commands to move the cursor and close buffers, Neovim's support for the Language Server Protocol or related tooling, and the command shown above. A useful sequence, for rapidly deleting a doc comment from its last line, is, in normal mode, `$v%ddd`. For setting up LSP integration in Neovim, refer to the lsp_config plugin. You may additionally need to generate compile_commands.json in the repository root, to allow the language server to find everything. This can be done using Bear (found at https://github.com/rizsotto/Bear). @author: willow <willow@howhill.com>
def warningfilter.sep_re | ( | field, | |
separator | |||
) |
Definition at line 35 of file warningfilter.py.
string warningfilter.fileclass = r"[\w-]" |
Definition at line 40 of file warningfilter.py.
string warningfilter.filename = rf"{fileclass}+" |
Definition at line 41 of file warningfilter.py.
string warningfilter.filepath = rf"{sep_re(filename, '/')}\.(?:\w+)" |
Definition at line 43 of file warningfilter.py.
string warningfilter.main_match = rf"(?P<path>/{filepath}|\[generated\]):(?P<linenumber>\d+): warning:" |
Definition at line 44 of file warningfilter.py.
string warningfilter.type_name = rf"(?:const )?(?:unsigned (?:long )?|struct |enum )?(?:\w+)(?: \*?const)? \*{{0,3}}" |
Definition at line 47 of file warningfilter.py.
Definition at line 48 of file warningfilter.py.
string warningfilter.func_params = rf"\({sep_re(var_def, ', ')}(?:,\.\.\.)?\)" |
Definition at line 49 of file warningfilter.py.
string warningfilter.simple_name = r"\w+" |
Definition at line 50 of file warningfilter.py.
string warningfilter.func_name = simple_name |
Definition at line 51 of file warningfilter.py.
string warningfilter.verbose_name = rf"{sep_re(simple_name, ' ')}" |
Definition at line 52 of file warningfilter.py.
string warningfilter.command_re = "(?:</[^>]+>|\\\w+)" |
Definition at line 53 of file warningfilter.py.
string warningfilter.macro_params = rf"\({sep_re(simple_name, ', ')}(?:,\.\.\.)?\)" |
Definition at line 54 of file warningfilter.py.
dictionary warningfilter.matches |
Definition at line 57 of file warningfilter.py.
Referenced by abd_string_to_value().
warningfilter.parser_choices |
Definition at line 83 of file warningfilter.py.
warningfilter.parser = ap.ArgumentParser() |
Definition at line 87 of file warningfilter.py.
warningfilter.action |
Definition at line 89 of file warningfilter.py.
warningfilter.choices |
Definition at line 90 of file warningfilter.py.
Referenced by GNUNET_CONFIGURATION_get_value_choice(), pick_random_dv_hops(), and start_process().
warningfilter.dest |
Definition at line 90 of file warningfilter.py.
Referenced by GNUNET_ABD_delegates_serialize(), GNUNET_ABD_delegation_chain_serialize(), GNUNET_ABD_delegation_set_serialize(), GNUNET_GNSRECORD_records_deserialize(), GNUNET_GNSRECORD_records_serialize(), GSC_bind(), print_channel_destination(), and rand_cb().
warningfilter.args = parser.parse_args() |
Definition at line 91 of file warningfilter.py.
dictionary warningfilter.sorted_lines = {k:[] for k in matches.keys()} |
Definition at line 93 of file warningfilter.py.
list warningfilter.unsorted_lines = [] |
Definition at line 94 of file warningfilter.py.
dictionary warningfilter.processed_lines |
Definition at line 106 of file warningfilter.py.
dictionary warningfilter.counts = {k: len(v) for k, v in processed_lines.items()} |
Definition at line 122 of file warningfilter.py.