mirror of
https://github.com/github/codeql.git
synced 2026-01-04 02:00:18 +01:00
factor semver to separate function
This commit is contained in:
@@ -6,6 +6,11 @@ class UnversionedImmutableAction extends UsesStep {
|
||||
UnversionedImmutableAction() {
|
||||
immutableActionsDataModel(immutable_action) and
|
||||
this.getCallee() = immutable_action and
|
||||
not this.getVersion().regexpMatch("^(v)?[0-9]+(\\.[0-9]+)*(\\.[xX])?$")
|
||||
isNotSemVer(this.getVersion())
|
||||
}
|
||||
}
|
||||
|
||||
bindingset[version]
|
||||
predicate isNotSemVer(string version) {
|
||||
not version.regexpMatch("^(v)?[0-9]+(\\.[0-9]+)*(\\.[xX])?$")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user