-
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
Add note regarding writable PVs and msg_apply_changes #57
Conversation
Regarding the format fix, the ToC was generated by a tool that says it has GitHub markdown profile support. Not sure what the lint action is using as markdown reference, it has to be clarified and maybe tuned to accept some variants, otherwise it is useless to rely on markdown helper tools if afterwards everything has to be edited manually. The link to ToC inside ToC is not really necessary, being more or less at the same line. The note is not clear in my opinion, there are many variables that are writable and not affecting msg_apply_changes(), I guess you meant the variables related to From/To header attributes, maybe they should be listed there, with the reference also to uac_replace_to()/uac_replace_from(), which are actually recommended to be used instead. |
Using pre-commit was introduced 6 months ago maybe without applying it to all files and the tool that generated ToC is not up to date or following the supposed conventions? Whatever the case, I could just not push the format fix, since I only fixed it because I was referencing it in the note. The note was in general to be honest, since it was not only for From/To attributes but also applied for some others like the issue I referenced to (kamailio/kamailio#1719) and I thought it's more of a general case. Regarding the |
The current markdown format of the wiki content is mostly what was generated by the dokuwiki-to-markdown conversion tool. The conversion was not perfect, I did a lot of manual updates afterwards, but I couldn't cover everything, it is a lot to do to sanitize everything. The tool seems ok, because GitHub markdown says that But the lint action might not support it or needs to be configured accordingly for the GitHub flavour. Regarding the variable, $ru, $rU, .. and others are changing the sip message, but they use a different approach. The issue you references is about functions that change the SIP message, not variables. In general, besides the R-URI related variables, only functions should change the SIP message. At some point, for simple/basic needs, a few variables related to To/From headers were made writable, but the uac functions should be recommended for updating values there, instead of these variables. I do not recall any other variables that change headers or message body. The note should be clear enough not to introduce more confusion. |
Regarding format fix: Here are all the rules that are being checked. The current disabled checks are Regarding the notes: Updated the respected pseudo-variables and recommended uac functions instead. |
I added two comments, afterwards it can be merged. Reading more about the markdown lint tool that is used in the pre-commit action, it enforces only a subset of markdown, because it considers to be more consistent. Even markdown allows Maybe my dev environment was not set properly, specific nodejs seems to be required by the markdown linting action. And for everyone that does not know, if you want to commit and the pre-commit checks forbids it, but you are ok with what is done (e.g., because the check is too strict and can be omitted), one can skip the check with
|
I modified the Comments are also resolved. |
I am ok to merge it, thanks! The lint tool seems to be opinionated, only one option possible, although the markdown allows combination, that's fine after all. |
Add a note about unintended side-effects when applying multiple changes all once and suggest applying them each one.