Skip to content

Commit 501b031

Browse files
committed
Ruby: Mention newtype constructors in API graph label classes
1 parent 3d109a4 commit 501b031

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

ruby/ql/lib/codeql/ruby/ApiGraphs.qll

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ module API {
659659
private import Impl
660660

661661
/** A label for a member, for example a constant. */
662-
class LabelMember extends ApiLabel {
662+
class LabelMember extends ApiLabel, MkLabelMember {
663663
private string member;
664664

665665
LabelMember() { this = MkLabelMember(member) }
@@ -671,14 +671,12 @@ module API {
671671
}
672672

673673
/** A label for a member with an unknown name. */
674-
class LabelUnknownMember extends ApiLabel {
675-
LabelUnknownMember() { this = MkLabelUnknownMember() }
676-
674+
class LabelUnknownMember extends ApiLabel, MkLabelUnknownMember {
677675
override string toString() { result = "getUnknownMember()" }
678676
}
679677

680678
/** A label for a method. */
681-
class LabelMethod extends ApiLabel {
679+
class LabelMethod extends ApiLabel, MkLabelMethod {
682680
private string method;
683681

684682
LabelMethod() { this = MkLabelMethod(method) }
@@ -690,21 +688,17 @@ module API {
690688
}
691689

692690
/** A label for the return value of a method. */
693-
class LabelReturn extends ApiLabel {
694-
LabelReturn() { this = MkLabelReturn() }
695-
691+
class LabelReturn extends ApiLabel, MkLabelReturn {
696692
override string toString() { result = "getReturn()" }
697693
}
698694

699695
/** A label for the subclass relationship. */
700-
class LabelSubclass extends ApiLabel {
701-
LabelSubclass() { this = MkLabelSubclass() }
702-
696+
class LabelSubclass extends ApiLabel, MkLabelSubclass {
703697
override string toString() { result = "getASubclass()" }
704698
}
705699

706700
/** A label for a keyword parameter. */
707-
class LabelKeywordParameter extends ApiLabel {
701+
class LabelKeywordParameter extends ApiLabel, MkLabelKeywordParameter {
708702
private string name;
709703

710704
LabelKeywordParameter() { this = MkLabelKeywordParameter(name) }
@@ -716,7 +710,7 @@ module API {
716710
}
717711

718712
/** A label for a parameter. */
719-
class LabelParameter extends ApiLabel {
713+
class LabelParameter extends ApiLabel, MkLabelParameter {
720714
private int n;
721715

722716
LabelParameter() { this = MkLabelParameter(n) }
@@ -728,14 +722,12 @@ module API {
728722
}
729723

730724
/** A label for a block parameter. */
731-
class LabelBlockParameter extends ApiLabel {
732-
LabelBlockParameter() { this = MkLabelBlockParameter() }
733-
725+
class LabelBlockParameter extends ApiLabel, MkLabelBlockParameter {
734726
override string toString() { result = "getBlock()" }
735727
}
736728

737729
/** A label from the root node to a custom entry point. */
738-
class LabelEntryPoint extends ApiLabel {
730+
class LabelEntryPoint extends ApiLabel, MkLabelEntryPoint {
739731
private API::EntryPoint name;
740732

741733
LabelEntryPoint() { this = MkLabelEntryPoint(name) }

0 commit comments

Comments
 (0)