Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Contributors
* Thomas Waldmann -- apidoc module fixes
* Till Hoffmann -- doctest option to exit after first failed test
* Tim Hoffmann -- theme improvements
* Valentin Heinisch -- warning types improvement
* Victor Wheeler -- documentation improvements
* Vince Salvino -- JavaScript search improvements
* Will Maier -- directory HTML builder
Expand Down
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ Features added
Patch by Adam Turner.
* #13805: LaTeX: add support for ``fontawesome7`` package.
Patch by Jean-François B.
* #13894: Add ``source_parser`` type to :confval:`suppress_warnings` for grouping
issues related to the ``c`` and ``cpp`` source parsers.
Patch by Valentin H.

Bugs fixed
----------
Expand Down
5 changes: 4 additions & 1 deletion sphinx/util/cfamily.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,10 @@ def fail(self, msg: str) -> NoReturn:
raise self._make_multi_error(errors, '')

def warn(self, msg: str) -> None:
logger.warning(msg, location=self.location)
subtype = 'c' if self.language == 'C' else 'cpp'
logger.warning(
msg, location=self.location, type='source_parser', subtype=subtype
)

def match(self, regex: re.Pattern[str]) -> bool:
match = regex.match(self.definition, self.pos)
Expand Down
Loading