mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Ruby: remove unused predicate
This commit is contained in:
@@ -795,20 +795,6 @@ module ActionDispatch {
|
||||
bindingset[input]
|
||||
private string extractAction(string input) { result = input.regexpCapture("[^#]+#(.+)", 1) }
|
||||
|
||||
/**
|
||||
* A basic pluralizer for English strings.
|
||||
* photo => photos
|
||||
* story => stories
|
||||
* TODO: remove?
|
||||
*/
|
||||
bindingset[input]
|
||||
private string pluralize(string input) {
|
||||
exists(string prefix | prefix = input.regexpCapture("(.*)y", 1) | result = prefix + "ies")
|
||||
or
|
||||
not input.regexpMatch(".*y") and
|
||||
result = input + "s"
|
||||
}
|
||||
|
||||
/**
|
||||
* The inverse of `pluralize`
|
||||
* photos => photo
|
||||
|
||||
Reference in New Issue
Block a user