Skip to content

Replace XMLElement by XmlElement and XMLFile by XmlFile #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions cpp/common/src/codingstandards/cpp/deviations/Deviations.qll
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ predicate applyDeviationsAtQueryLevel() {
}

/** A `coding-standards.xml` configuration file (usually generated from an YAML configuration file). */
class CodingStandardsFile extends XMLFile {
class CodingStandardsFile extends XmlFile {
CodingStandardsFile() {
this.getBaseName() = "coding-standards.xml" and
// Must be within the users source code.
Expand All @@ -25,7 +25,7 @@ class CodingStandardsFile extends XMLFile {
}

/** A "Coding Standards" configuration file */
class CodingStandardsConfig extends XMLElement {
class CodingStandardsConfig extends XmlElement {
CodingStandardsConfig() {
any(CodingStandardsFile csf).getARootElement() = this and
this.getName() = "codingstandards"
Expand All @@ -36,31 +36,31 @@ class CodingStandardsConfig extends XMLElement {
}

/** An element which tells the analysis whether to report deviated results. */
class CodingStandardsReportDeviatedAlerts extends XMLElement {
class CodingStandardsReportDeviatedAlerts extends XmlElement {
CodingStandardsReportDeviatedAlerts() {
getParent() instanceof CodingStandardsConfig and
hasName("report-deviated-alerts")
}
}

/** A container of deviation records. */
class DeviationRecords extends XMLElement {
class DeviationRecords extends XmlElement {
DeviationRecords() {
getParent() instanceof CodingStandardsConfig and
hasName("deviations")
}
}

/** A container for the deviation permits records. */
class DeviationPermits extends XMLElement {
class DeviationPermits extends XmlElement {
DeviationPermits() {
getParent() instanceof CodingStandardsConfig and
hasName("deviation-permits")
}
}

/** A deviation permit record, that is specified by a permit identifier */
class DeviationPermit extends XMLElement {
class DeviationPermit extends XmlElement {
DeviationPermit() {
getParent() instanceof DeviationPermits and
hasName("deviation-permits-entry")
Expand Down Expand Up @@ -143,7 +143,7 @@ class DeviationPermit extends XMLElement {
}

/** A deviation record, that is a specified rule or query */
class DeviationRecord extends XMLElement {
class DeviationRecord extends XmlElement {
DeviationRecord() {
getParent() instanceof DeviationRecords and
hasName("deviations-entry")
Expand All @@ -159,13 +159,13 @@ class DeviationRecord extends XMLElement {

private string getRawPermitId() { result = getAChild("permit-id").getTextValue() }

private XMLElement getRawRaisedBy() { result = getAChild("raised-by") }
private XmlElement getRawRaisedBy() { result = getAChild("raised-by") }

private string getRawRaisedByName() { result = getRawRaisedBy().getAChild("name").getTextValue() }

private string getRawRaisedByDate() { result = getRawRaisedBy().getAChild("date").getTextValue() }

private XMLElement getRawApprovedBy() { result = getAChild("approved-by") }
private XmlElement getRawApprovedBy() { result = getAChild("approved-by") }

private string getRawApprovedByName() {
result = getRawApprovedBy().getAChild("name").getTextValue()
Expand Down