sonar-openedge
sonar-openedge copied to clipboard
@Deprecated annotation
Ability to annotate classes, interfaces and methods in OOABL code. Any use of a deprecated object would have to be reported, whether in procedural or OO code.
Like it!
Any idea how we could extend that for classes where we have no source code available? .NET classes and 3rd party ABL classes? We'd need to be able to provide a different source for the list of deprecated classes, interfaces, methods, properties and events.
Further - any chance to extent this for procedures as well? running depecated .p files? Internal procedures? Internal procedures of persistent/super-procedures?
For external ABL classes without source code, the best would be to have annotations kept in rcode. So the AVM team should be bribed. I don't know enough of .Net, but is this information available somewhere ? Using the same kind of annotation or a different mechanism ?
It will be extended, but I'd like to keep it focused at the beginning. In the future, I'd like to have:
- deprecated include files
- deprecated procedures (.p)
.Net classes can come from compiled dlls so there is no way to add annotations. Like i said in #173, this should work like the "Matching keyword in sourcecode" rule and it should be possible to suppress the issue with an annotation. So we could setup the rule with the full namespace + class name.
Yes, a mechanism has to be available to mark classes from rcode or external DLL as deprecated (as annotations are not kept in rcode). Question: is there a Deprecated annotation in .Net ? Which could be re-used in ABL ?
http://stackoverflow.com/questions/1759352/how-do-i-mark-a-method-as-obsolete-deprecated
The class member attribute Obsolete should do.
Could we use the ABLDuck documentation syntax to mark a method as obsolete ?
https://github.com/Riverside-Software/pct/wiki/ABLDuck#deprecated
/**
* @deprecated
*/
I'd stick with @Deprecated
annotation, as documentation is not processed in proparse.
And yes, it would be better to log a case in PCT in order to support @Deprecated
annotations in ABLDuck.