Skip to content

Commit c2b4716

Browse files
committed
Rename CDLDefinition to CDLDefinitions for accuracy
1 parent 489e23c commit c2b4716

File tree

1 file changed

+7
-4
lines changed
  • javascript/frameworks/cap/lib/advanced_security/javascript/frameworks/cap

1 file changed

+7
-4
lines changed

javascript/frameworks/cap/lib/advanced_security/javascript/frameworks/cap/CDL.qll

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,24 @@ private newtype CdlKind =
1515
CdlFunctionKind(string value) { value = "function" }
1616

1717
/**
18-
* Any CDL element, including entities, event, actions, and more.
18+
* A list of CDL definitions, which can include entities, events, actions and more.
1919
*/
20-
class CdlDefinition extends CdlObject {
21-
CdlDefinition() { exists(JsonObject root | this = root.getPropValue("definitions")) }
20+
class CdlDefinitions extends CdlObject {
21+
CdlDefinitions() { exists(JsonObject root | this = root.getPropValue("definitions")) }
2222

2323
JsonObject getElement(string elementName) { result = this.getPropValue(elementName) }
2424

2525
JsonObject getAnElement() { result = this.getElement(_) }
2626
}
2727

28+
/**
29+
* A CDL definition element.
30+
*/
2831
abstract class CdlElement extends CdlObject {
2932
CdlKind kind;
3033
string name;
3134

32-
CdlElement() { exists(CdlDefinition definition | this = definition.getElement(name)) }
35+
CdlElement() { exists(CdlDefinitions definitions | this = definitions.getElement(name)) }
3336

3437
predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) {
3538
// If the cds.json file has a $location property, then use that,

0 commit comments

Comments
 (0)