Ah, now I understand the flag's meaning! cool!
- Log in to post comments
Ah, now I understand the flag's meaning! cool!
Ok, I upgraded errors, so they verbose on demand. now:
USER>s sc=##class(shvarov.objectscript.errors).DIVIDE()
USER>zw sc
sc="0 "_$lb($lb(5002,"<DIVIDE>DIVIDE+3^shvarov.objectscript.errors.1",,,,,,,,$lb(,"USER",$lb("^DIVIDE+3^shvarov.objectscript.errors.1^1","e^^^0"))))/* ERROR #5002: ObjectScript error: <DIVIDE>DIVIDE+3^shvarov.objectscript.errors.1 */
USER>s status.sc=##class(shvarov.objectscript.errors).DIVIDE()
ERROR #5002: ObjectScript error: <DIVIDE>DIVIDE+3^shvarov.objectscript.errors.1
USER>So, every time I need to printout an error I do:
USER>set status.sc=##class(bla.bla).method()
and it prints out an error if it is an error. and if not it is silent?
I like it!
Well done, @David Hockenbroch !
USER>zpm "install watchedstatus" [USER|watchedstatus] Reload START (/usr/irissys/mgr/.modules/USER/watchedstatus/1.0.3/) [USER|watchedstatus] Reload SUCCESS [watchedstatus] Module object refreshed. [USER|watchedstatus] Validate START [USER|watchedstatus] Validate SUCCESS [USER|watchedstatus] Compile START [USER|watchedstatus] Compile SUCCESS [USER|watchedstatus] Activate START [USER|watchedstatus] Configure START [USER|watchedstatus] Configure SUCCESS [USER|watchedstatus] Activate SUCCESS
Installed perfectly!
Not sure about functionality though. I was wondering of a class that gives me an error, and remember another ipm module - objectcript-errors.
Installed:
USER>zpm "install objectscript-errors" [USER|objectscript-errors] Reload START (/usr/irissys/mgr/.modules/USER/objectscript-errors/1.0.2/) [USER|objectscript-errors] Reload SUCCESS [objectscript-errors] Module object refreshed. [USER|objectscript-errors] Validate START [USER|objectscript-errors] Validate SUCCESS [USER|objectscript-errors] Compile START [USER|objectscript-errors] Compile SUCCESS [USER|objectscript-errors] Activate START [USER|objectscript-errors] Configure START [USER|objectscript-errors] Configure SUCCESS [USER|objectscript-errors] Activate SUCCESS
it can generate errors in simple objectscript calls, e.g. null division etc:
USER>s sc=##class(shvarov.objectscript.errors).DIVIDE()
ERROR #5002: ObjectScript error: <DIVIDE>DIVIDE+3^shvarov.objectscript.errors.1
USER>zw sc
sc="0 "_$lb($lb(5002,"<DIVIDE>DIVIDE+3^shvarov.objectscript.errors.1",,,,,,,,$lb(,"USER",$lb("^DIVIDE+3^shvarov.objectscript.errors.1^1","e^^^0"))))/* ERROR #5002: ObjectScript error: <DIVIDE>DIVIDE+3^shvarov.objectscript.errors.1 */So this is what I did:
USER>set status=##class(DH.WatchedStatus).New("RW")
USER>set status.sc=##class(shvarov.objectscript.errors).DIVIDE()
ERROR #5002: ObjectScript error: <DIVIDE>DIVIDE+3^shvarov.objectscript.errors.1ERROR #5002: ObjectScript error: <DIVIDE>DIVIDE+3^shvarov.objectscript.errors.1if I do w status.sc:
USER>w status.sc 1
If I do everything right?
Very cool, @David Hockenbroch! Do you want to pack it into an IPM module and share with the community?
Thanks for sharing, @Edward Clark !
Great work! I'm all for lower case for the packages names.
Great you find it helpful!
Thanks @Enrico Parisi @Oliver Thompson @Robert Cemper @Chris Stewart @David Hockenbroch for sharing your experience!
Ideally it should be an "out-of-the-box" feature as unit-testing is quite a helpful thing for every production solution.
I'll give it a try!
thank you, @Jinyao ! Do you want to add the github repo to https://openexchange.intersystems.com ? to increase the audience?
Works like a charm! Thank you @Hannah Sullivan !
Thank you, @Stephen Canzano !
@Daniel Kutac - you asked for that
It looks like maintenance is completed, right?
Isn't it more safe to have a clear namesepace/database for the code base with every CI/CD phase?
What about the data (globals) left related to deleted classes? SHould it be deleted as well?
How to deal with globals that contain $lb and $bit data?
But it is the extension that creates a file with such a name, no?

Tried to use it but:
.png)
Why discuss 100+ rules?
I don't care honestly which rules ObjectScript Quality's clients would like to enforce in their organisation.
By providing a free-of-charge scanning with this tool (which is not InterSystems one), we use only 11 rules that we think are useful for the developer community. And we are more than happy to expand these 11 to more or improve current.
For 100 + other rules we don't care.
Why are we discussing too many properties and too many methods rules?
For InterSystems Developer Community we use only 11 rules.
Is "variable not found" a bad rule?

I faced this issue many times, even in my code, and found it very helpful. What is bad that public ObjectScript repositories will be scanned for free for such an error?
Could we discuss these 11 rules that are being used?
Which else rules could be useful and potentially could be added?
Hi @Herman Slagman ! What changes do you want to see?
Yes, new ObjectScript rules for SonarQube should be coded in Java.
Still don't understand why the tool is bad? If the rules do not fit your requests why not suggest at least one here?
Hi @Enrico Parisi !
Only these 12 rules are being used in ObjectScript quality for open source ObjectScript.
Which of them is not useful/silly?
Which rules for ObjectScript are in demand and not there?
I wish ECP setup could be as useful as it sounds
Indeed, thank you @Scott Roth!
Thanks for the feedback, @Muhammad Waseem!
I encourage developers to share what else they fill make their developer life better in day-to-day routine development so it can be helpful for others too.
Yes, I agree!
Let’s discuss and introduce rules that are really helpful. For the record: 16 rules we use now is the selection out of 100+.
Thank you, @Robert Cemper! Indeed - Docker is one of the really helpful innovations in software development process.
It’s difficult to introduce rules that will satisfy everyone.
@Herman Slagman
what prevents you from introducing your own rules?
Renamed post to IRIS as the content is relevant to IRIS as well.
Great stuff, @Claudio Devecchi ! Do you want to add an OEX app with IPM module for the mongo adapter? BTW, IPM can install necessary Python modules: pymongo etc.