Skip to content
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

Provide means to disable a specific log message #927

Open
opoudjis opened this issue Sep 19, 2024 · 2 comments
Open

Provide means to disable a specific log message #927

opoudjis opened this issue Sep 19, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@opoudjis
Copy link
Contributor

opoudjis commented Sep 19, 2024

Would like to disable logged errors in Metanorma source, as known issues to ignore; requirement raised by @TRThurman and @stuartgalt

How this happens is not obvious, but we likely want to mark up a span of text in Metanorma, and prevent it from raising log errors. The only way I can see of doing this is with an annotation of type ignore-log, and bookmarks for the span of text involved. So:

[[shall]]
NOTE: this error [[shall1]] SHALL [[shall2]] be ignored.

[from=shall1,to=shall2,type=ignore-log]
****
****

[from=shall,type=ignore-log,author=NN,date=20240919]
****
This is why I disabled the markup
****

It's cumbersome (and I'm not sure that the inline bookmarks will even work in disabling warnings), but if you're going to disable log messages as coming from particular parts of the marked up text, you have to have a mechanism telling it where the disabling needs to happen. And if you're going to disable error logging for a passage, you really should be saying why and when.

@opoudjis opoudjis added the enhancement New feature or request label Sep 19, 2024
@opoudjis opoudjis self-assigned this Sep 19, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Sep 19, 2024
@opoudjis opoudjis moved this from 🆕 New to 🏕 Med priority in Metanorma Sep 19, 2024
@metanorma metanorma deleted a comment Sep 19, 2024
@stuartgalt
Copy link

@opoudjis thanks for the comment. It looks like marking up the source is not as neat and clean as initially hoped. It also leads to having things in the source that will need to be managed is we suddenly decide that an a particular error (or multiple of that error) are not a false positive and need to be changed.

I noticed that there are things that look like uuids associated with an error. Would those be consistent from run to run or are does it include a component of a time stamp rather than being based purely on the content? If they are consistent it should be possible to keep a list of the false positives or ones we want to ignore and prune them from the log and then decided if the build/document is "good" or not.

@opoudjis
Copy link
Contributor Author

The UUIDs are a hash of content, no timestamp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🏕 Med priority
Development

No branches or pull requests

2 participants