jayvdb
(John Vandenberg)
July 6, 2021, 7:47am
1
We have four Blocker bugs in https://sonarcloud.io/project/issues?id=swift-nav_libsbp_auto&resolved=false&types=BUG regarding invoking functions within Jinja that appear to be false positives.
For reference, the jinja filters being invoked are at
def do_indent(
s: str, width: t.Union[int, str] = 4, first: bool = False, blank: bool = False
) -> str:
and
def do_wordwrap(
environment: "Environment",
s: str,
width: int = 79,
break_long_words: bool = True,
wrapstring: t.Optional[str] = None,
break_on_hyphens: bool = True,
) -> str:
https://sonarcloud.io/project/issues?id=swift-nav_libsbp_auto&issues=AXowdKheNjEQWpR9j4ZO&open=AXowdKheNjEQWpR9j4ZO is complaining “Remove this unexpected named argument ‘break_on_hyphens’.” , but that is an argument of the do_wordwrap
function listed above.
Likewise first
is an argument of do_indent
.
Hi @jayvdb ,
Thank you for reporting those FPs, I created a ticket to keep track of them: https://jira.sonarsource.com/browse/SONARPY-872
For information, our python analyzer uses Typeshed to get jinja2
type annotations and definitions. Indeed, it looks like do_wordwrap
and do_indent
jinja2 filters functions have not been updated.
system
(system)
Closed
July 13, 2021, 8:22am
3
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.