go to post Herman Slagman · Dec 30, 2024 Hi @Evgeny Shvarov, I, and I think Enrico too, was talking not only of the 16 rules you've selected, but the 100+ rules that are in the product if you buy it. As far as I can see, the 16 rules are mostly about bugs which should easily be found by simple testing. One of the biggest problems I have with OQ is that it doesn't expand macros, which gives a lot of false positives.For instance $$$ReturnError("Illegal argument") isn't regarded as a Return, which is in the macro definition.The same for $$$Yes, $$$True, etc aren't recognized as legal boolean values. Silly rules that state that you should use certain syntax formats, such as parenthesis around conditions, because otherwise it is hard to comprehend for people coming from other programming languages. I don't have the time to go though all rules but I will illustrate with one. Rule ID:objectscriptquality:OS0078 Incompatible argument type in a method The title is wrong, it should be "in a method call" The argument passed must be of the type expected by the method. When no type is defined for a parameter, a %String argument is expected. The first part of the sentence makes sense, the second is not true for Objectscript. If no type is specified the argument can be of any type.If this is something you want is another issue. Sometimes you want an argument to be able to be of different types.For instance if an argument is of type %Stream, you might want to allow a simple string as a value too. In general I would say this is not a rule that would enhance the quality of the code. Then the rule explanation is simply wrong. In following code, method DoWork2 expects to receive %Numeric as argument and DoWork3 expects to receive %DateTime as argument, but in both cases receive Sample.Person and will raise a "PARAMETER error" message on runtime. A "PARAMETER error" only occurs when supplying too many arguments in the call and has got nothing to do with the datatypes of those arguments. Besides; running the example code gives no error at all. Then the example code has several issues, which I won't discuss right now.
go to post Herman Slagman · Dec 28, 2024 I wouldn't know why setting up ECP isn't easy.Super easy by the Management Portal, but it can also be scripted.For 'useful' I'd say: just skim through your globals and copy or merge whatever you need.
go to post Herman Slagman · Dec 28, 2024 Hi @Enrico Parisi,I was going to say "I wasn't aware of that previous discussion", but I saw that I actually contributed to it :-(Indeed, since February nothing has changed.We are all busy and apparently didn't have had the time to make our own attributions.For me, I wouldn't know how to define a CQ rule, SonarCube is Java based AFAIK and I'm not a Java tiger.It would be great if ISC would set up a GitHub repository with rules to which we can contribute.I am not involved in the code base that was obliged to use CQ so it doesn't bother me directly anymore.But SonarCube has some status and if a customer demands that the code base adheres to the rules of such a tool, you're in trouble. Perfectly working code (for years) suddenly has many major and critical 'errors' and you have to explain why that is.I think no tool is better than a bad tool.
go to post Herman Slagman · Dec 27, 2024 If the two systems are at network reach you could use ECP and Remote Database(s). Then the logic could be rather easily scripted with all the power of ObjectScript at hand.
go to post Herman Slagman · Dec 27, 2024 I wasn't to, but now that you mention it.I'd like to suggest it to be an open discussion on DC.
go to post Herman Slagman · Dec 27, 2024 I find ObjectScript Quality very opinionated with peculiar assumptions and sometimes dead wrong.We've been using it a lot in one of our projects because the end-customer demanded it, but we need to trun off a lot of silly rules.It is not a tool I would recommend.
go to post Herman Slagman · Nov 28, 2024 It seems that both classes need to have theparameter XMLUSEEMPTYELEMENT = 1; But I am curious why you want to enforce it. Both forms are perfectly valid XML.
go to post Herman Slagman · Nov 6, 2024 Is there a more structured way of specifying these values, such as a config.file ?
go to post Herman Slagman · Nov 4, 2024 I didn't but it wasn't needed for the import to work.Now I did together with IRISINSTALLDIR.Thanks
go to post Herman Slagman · Nov 4, 2024 Thanks John, the Audit log did it: the Resource %DB_USER needed to be RW enabled.
go to post Herman Slagman · Jun 16, 2024 1: Yes 😉2: See other comment on Quit3: yes 😉You should never 'modernize' for the sake of modernizing (refactoring is something else)ZTrap is not old-fashioned, it's a mechanism other programming languages just don't have.It is out-of-the-way, is doesn't introduce another stack level and it doesn't need extra indentation, it's just some code that you hope will never be executed, it isn't part of the main logic.Try-Catch can be very useful for indeed a 'Try' for something you can't be sure how it will behave, such as{}.%FromJSON(SomeJSON)
go to post Herman Slagman · Apr 16, 2024 The start tag would be right after the XML declaration, i.e. <StartTag (the element name ends when a space is encountered), the end-tag would then be </StartTag. From there find the closing bracket >
go to post Herman Slagman · Apr 14, 2024 Remember FHIR is a very immature 'standard'.If you jump on the bandwagon, you must be prepared to be agile.You talk about R5, but R6 is well on its way and, since they actually are STU4, 5, 6 and so on, there is no FHIR 1.0Some standard bodies opt for stability like Nictiz in the Netherlands, where most of the official specifications are still based on STU3.Opting for implementation of an immature standard ,one must be prepared for (extreme) agility, otherwise we are all ending op with in-operability because of different incompatible implementations.
go to post Herman Slagman · Apr 11, 2024 > I want to remove the object from memory even if it is still referenced in memory That makes no sense and it is not possible, it would invalidate every other variable or object property that references it.But why do you want to do this?
go to post Herman Slagman · Mar 26, 2024 You are right, but this was based on your original question: "if they share a common element/ value return 1" But the code is easily enhanced to return all common values.
go to post Herman Slagman · Mar 22, 2024 Set x="Purple,Black,Yellow,Pink,Yellow,White,White,a,b,c,d,e,f" Set y="Red,Green,Orange,Yellow,z,y,x,w,v" Set Found=0 For i=1:1:$Length(x,",") { For i2=1:1:$Length(y,",") { If $Piece(x,",",i)=$Piece(y,",",i2) { Write $Piece(x,",",i)," = ",$Piece(y,",",i2),! Set Found=i_","_i2 Return Found } } }
go to post Herman Slagman · Mar 22, 2024 What do you expect of such a class (or classes)?I might have something on the shelf as a skunk project.
go to post Herman Slagman · Feb 6, 2024 We were 'forced' to use CQ by one of our customers and I was rather disappointed about it.It looks like the designers of those rules didn't have a lot of COS (or even MUMPS) experience.Maybe we should, as a community, find some kind of consensus what is good (?) (C)OS code.ISC is not a good example, their code (completely open for developers to look at, which you find nowhere in the industry): a lot of different styles (don't mention the 'p" and 't' prefixes ... ;-))I don't have the time to set this up, but am happy to join the discussions.
go to post Herman Slagman · Jan 28, 2024 No, if you build a Git plugin yourself, you will also have to build the Git menu and optional context menu. Class Git.PlugIn Extends %Studio.SourceControl.Base
go to post Herman Slagman · Jan 22, 2024 Yes, I know, but I was talking about the automatic configuration by the IRIS installer. It seems that it only supports IIS on Windows.