Skip to content

SonarPython 4.22.0.16914

Compare
Choose a tag to compare
@joke1196 joke1196 released this 24 Sep 13:16
· 111 commits to master since this release
9e24dce

Release notes - SonarPython - 4.22

Bug

SONARPY-2087 Formatted raw strings with double backslashes should be parsed correctly

SONARPY-2136 Remove microsoft_stub test

SONARPY-2147 Fix Message of Rule S6973

Documentation

SONARPY-2077 S2068: Update documentation to not recommend the customization

SONARPY-2078 S6418: Create RSPEC S6418 for Python (this rule already exists for Java)

False Negative

SONARPY-2151 S6982: Fix fn when import torch is used instead of the full import name torch.nn

SONARPY-2152 Lower entropy for S6418

New Feature

SONARPY-1513 Rule S6795: Generic type statement should not use TypeVars

SONARPY-1898 Rule S6978 : Subclasses of "torch.nn.Module" should call the initializer

SONARPY-1902 Rule S6979: "torch.tensor" should be used instead of "torch.autograd.Variable"

SONARPY-1907 Rule S6983 : The nb_workers parameter should be specified for torch.utils.data.DataLoader

SONARPY-1909 Rule S6984: Einops pattern should be valid

Sub-task

SONARPY-2150 Fix FP on S6982 when method is used on optimizers

Task

SONARPY-1337 Use sonar-plugin-api to fetch input file hashes

SONARPY-1588 Deprecate rule S4792

SONARPY-1899 Add relevant projects to Peach

SONARPY-2080 S6418: Move ShannonEntropy to analyzer commons

SONARPY-2083 Fix parsing error when encountering `#@title` in a notebook cell

SONARPY-2140 Add containsSpreadOperator to Expresions utils class

SONARPY-2148 Add pytorch and torchvision custom stubs

Improvement

SONARPY-1900 Rule S6973: Implement PyTorch Hyperparameter detection

SONARPY-1910 Rule S6982: module mode should be set after load_state_dict

SONARPY-1914 Rule S6985: Usage of "torch.load" can lead to untrusted code execution

SONARPY-1915 Expand S6929: add Pytorch and quickfix

SONARPY-2079 S6418: Implementation for Python

SONARPY-2143 S6985: Check if spreaded arguments are present in the "torch.load" call