Skip to content

Commit f90f2c8

Browse files
committed
Add missing QLDocs
1 parent fe7c337 commit f90f2c8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

go/ql/lib/semmle/go/security/StringBreakCustomizations.qll

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,24 @@ module StringBreak {
106106
override Quote getQuote() { result = quote }
107107
}
108108

109+
/**
110+
* A call to `strings.NewReplacer`.
111+
*/
109112
class StringsNewReplacerCall extends DataFlow::CallNode {
110113
StringsNewReplacerCall() { this.getTarget().hasQualifiedName("strings", "NewReplacer") }
111114

115+
/**
116+
* Gets an argument to this call corresponding to a string that will be
117+
* replaced.
118+
*/
112119
DataFlow::Node getAReplacedArgument() { exists(int n | n % 2 = 0 and result = getArgument(n)) }
113120
}
114121

122+
/**
123+
* A configuration for tracking flow from a call to `strings.NewReplacer` to
124+
* the receiver of a call to `strings.Replacer.Replace` or
125+
* `strings.Replacer.WriteString`.
126+
*/
115127
class StringsNewReplacerConfiguration extends DataFlow2::Configuration {
116128
StringsNewReplacerConfiguration() { this = "StringsNewReplacerConfiguration" }
117129

0 commit comments

Comments
 (0)