-
Notifications
You must be signed in to change notification settings - Fork 1.9k
JS: Modeling of underscore.string package
#19049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… sources points.
…e it return simple string.
b299373 to
3a069f9
Compare
Co-authored-by: Asgerf <asgerf@github.com>
3a069f9 to
922a07d
Compare
| extensible: summaryModel | ||
| data: | ||
| - ["'underscore.string'", "Member[slugify,capitalize,decapitalize,clean,cleanDiacritics,swapCase,escapeHTML,unescapeHTML,wrap,dedent,reverse,pred,succ,titleize,camelize,classify,underscored,dasherize,humanize,trim,ltrim,rtrim,truncate,sprintf,strRight,strRightBack,strLeft,strLeftBack,stripTags,unquote,map]", "Argument[0]", "ReturnValue", "taint"] | ||
| - ["'underscore.string'", "Member[chop,chars,words,lines]", "Argument[0]", "ReturnValue", "taint"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - ["'underscore.string'", "Member[chop,chars,words,lines]", "Argument[0]", "ReturnValue", "taint"] | |
| - ["'underscore.string'", "Member[chop,chars,words,lines]", "Argument[0]", "ReturnValue.ArrayElement", "taint"] |
This is a bit more precise.
If the whole return value is tainted, the analysis thinks all its properties are tainted too, including .length. You could try adding the test:
sink(s.chop(source("s1"), 3).length);There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there is still something off with ArrayElement f4ca2dc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the tests have a typo, they should access the [0] on the returned array, not on the source string:
sink(s.chars(source("s2")[0])) -> sink(s.chars(source("s2"))[0])I know why the last test is failing but it's complicated. Would you mind leaving it as MISSING: for now?
This pull request adds package modeling for
underscore.string.