mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Ruby: fix spelling errors
This commit is contained in:
@@ -109,7 +109,7 @@ class NamedParameter extends Parameter, TNamedParameter {
|
||||
final VariableAccess getDefiningAccess() {
|
||||
result = this.getVariable().getDefiningAccess()
|
||||
or
|
||||
result = this.(SimpleParameterSynthImpl).getDefininingAccess()
|
||||
result = this.(SimpleParameterSynthImpl).getDefiningAccess()
|
||||
}
|
||||
|
||||
override AstNode getAChild(string pred) {
|
||||
|
||||
@@ -116,7 +116,7 @@ class VariableAccess extends Expr instanceof VariableAccessImpl {
|
||||
predicate isImplicitWrite() {
|
||||
implicitWriteAccess(toGenerated(this))
|
||||
or
|
||||
this = any(SimpleParameterSynthImpl p).getDefininingAccess()
|
||||
this = any(SimpleParameterSynthImpl p).getDefiningAccess()
|
||||
or
|
||||
this = any(HashPattern p).getValue(_)
|
||||
or
|
||||
|
||||
@@ -38,7 +38,7 @@ class SimpleParameterRealImpl extends SimpleParameterImpl, TSimpleParameterReal
|
||||
class SimpleParameterSynthImpl extends SimpleParameterImpl, TSimpleParameterSynth {
|
||||
SimpleParameterSynthImpl() { this = TSimpleParameterSynth(_, _) }
|
||||
|
||||
LocalVariableAccessSynth getDefininingAccess() { synthChild(this, 0, result) }
|
||||
LocalVariableAccessSynth getDefiningAccess() { synthChild(this, 0, result) }
|
||||
|
||||
override LocalVariable getVariableImpl() { result = TLocalVariableSynth(this, _) }
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ replace further instances of the string that result from earlier replacements.
|
||||
</p>
|
||||
<p>
|
||||
For example, consider the code snippet <code>s.gsub /\/\.\.\//, ""</code>, which attempts to strip
|
||||
out all occurences of <code>/../</code> from <code>s</code>. This will not work as expected: for the
|
||||
out all occurrences of <code>/../</code> from <code>s</code>. This will not work as expected: for the
|
||||
string <code>/./.././</code>, for example, it will remove the single occurrence of <code>/../</code>
|
||||
in the middle, but the remainder of the string then becomes <code>/../</code>, which is another
|
||||
instance of the substring we were trying to remove.
|
||||
|
||||
@@ -116,7 +116,7 @@ predicate allBackslashesEscaped(DataFlow::Node node) {
|
||||
* Holds if `sub` looks like a string substitution call that deliberately
|
||||
* removes the first occurrence of `str`.
|
||||
*/
|
||||
predicate removesFirstOccurence(StringSubstitutionCall sub, string str) {
|
||||
predicate removesFirstOccurrence(StringSubstitutionCall sub, string str) {
|
||||
not sub.isGlobal() and sub.replaces(str, "")
|
||||
}
|
||||
|
||||
@@ -158,8 +158,8 @@ predicate isDelimiterUnwrapper(StringSubstitutionCall leftUnwrap, StringSubstitu
|
||||
or
|
||||
left = "'" and right = "'"
|
||||
|
|
||||
removesFirstOccurence(leftUnwrap, left) and
|
||||
removesFirstOccurence(rightUnwrap, right) and
|
||||
removesFirstOccurrence(leftUnwrap, left) and
|
||||
removesFirstOccurrence(rightUnwrap, right) and
|
||||
rightUnwrap = getAMethodCall(leftUnwrap)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user