-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds ability to ignore parse exception console messages #65
base: master
Are you sure you want to change the base?
Adds ability to ignore parse exception console messages #65
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution. Instead of a boolean, we could support a list of regular expressions instead, for added granularity. What do you think?
This project has received contributions that we recently merged to the master
branch but have not yet been released. These contributions will likely get rid of many of the parser warnings tnat you encounter. I will try to reach out to the owner of this repository again to make a release.
sphinxcontrib/doxylink/config.py
Outdated
DOXYLINK_KEY = 'doxylink' | ||
|
||
DOXYLINK_IGNORE_PARSE_EXCEPTIONS_KEY = ( | ||
'_'.join([DOXYLINK_KEY,'ignore_parse_exceptions']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'_'.join([DOXYLINK_KEY,'ignore_parse_exceptions']) | |
'_'.join([DOXYLINK_KEY, 'ignore_parse_exceptions']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is my bad. Do we have a default linter/formatter for Python in this repo, to minimize these lint issues?
sphinxcontrib/doxylink/doxylink.py
Outdated
@@ -303,6 +306,10 @@ def join(*args): | |||
|
|||
|
|||
def create_role(app, tag_filename, rootdir, cache_name, pdf=""): | |||
ignore_parse_exceptions = getattr(app.config, config.DOXYLINK_IGNORE_PARSE_EXCEPTIONS_KEY) | |||
if ignore_parse_exceptions: | |||
report_info(app.env,"Ignoring parsing exceptions") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
report_info(app.env,"Ignoring parsing exceptions") | |
report_info(app.env, "Ignoring parsing exceptions") |
FYI We have released version 1.12.4 this evening. I triggered the unit tests in CI and some of them require an update. If you want any help, let me know. 🙂 |
I can test this out to see if it fixes some of the parse exceptions in our code base. |
I would be down to change this behavior. Are you thinking a single regex or multiple regexs? Would the idea be to match specific text inside of the ie.
So we could add a regex that would be something like |
I still see parse exceptions in our code base. I think some are probably due to our usage of |
…gnore_regex_list Refs: sphinx-contrib#55
d7f822b
to
6a1d432
Compare
@JasperCraeghs I updated with the regex approach. Here are my local repo test results: Default for
With the following
|
Allows a user to specify the
doxyfile_ignore_parse_exceptions=True
configuration value in theSphinx
conf.py file to preventdoxylink
tag parsing from printing messages to console.I.e.
These parsing messages can overwhelm the console and mask users from seeing valuable error or warning messages provided by
Sphinx