Merge pull request #307 from esben-semmle/js/unused-import

JS: make js/unused-local-variable flag import statements
This commit is contained in:
Max Schaefer
2018-10-22 13:13:02 +01:00
committed by GitHub
10 changed files with 115 additions and 27 deletions

View File

@@ -11,3 +11,16 @@ bindingset[s]
string capitalize(string s) {
result = s.charAt(0).toUpperCase() + s.suffix(1)
}
/**
* Gets the pluralization for `n` occurrences of `noun`.
*
* For example, the pluralization of `"function"` for `n = 2` is `"functions"`.
*/
bindingset[noun, n]
string pluralize(string noun, int n) {
if n = 1 then
result = noun
else
result = noun + "s"
}