Closed batisteo closed 4 years ago
This pull request introduces 15 alerts and fixes 20 when merging 6f535bca49c5d62e06db3dd42e90dd0011d0fd81 into 0096d10b8e9d1f9f5beb1325276c05edd540a467 - view on LGTM.com
new alerts:
fixed alerts:
This pull request introduces 15 alerts and fixes 20 when merging bfa39775c2bbf5c218d03df890d98f207e080d6b into 0096d10b8e9d1f9f5beb1325276c05edd540a467 - view on LGTM.com
new alerts:
fixed alerts:
Description | Example fixes |
---|---|
Unsanitized input flows from the request URL and is used to render an HTML page returned to the user in send. This may result in a Cross-Site Scripting attack (XSS). Occurrences: | :wrench: Example fixes |
The function defined here takes 1 parameter(s), but is called here with 3 argument(s). The extra arguments will be ignored. Occurrences: | :wrench: Example fixes |
The property highlight was previously set at highlight. Occurrences: | :wrench: Example fixes |
β Merging this PR will increase code quality in the affected files by 4.11%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 0.96 β | 0.55 β | -0.41 π |
Method Length | 50.30 β | 52.34 β | 2.04 π |
Working memory | 7.02 π | 5.50 β | -1.52 π |
Quality | 84.57% β | 88.68% β | 4.11% π |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 2581 | 681 | -1900 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
zoo/api/query.py | 75.76% β | 85.25% β | 9.49% π |
zoo/api/types.py | 91.50% β | 91.84% β | 0.34% π |
zoo/auditing/admin.py | 98.33% β | 98.83% β | 0.50% π |
zoo/base/settings.py | 30.98% π | 30.83% π | -0.15% π |
zoo/base/urls.py | 44.88% π | 63.21% π | 18.33% π |
zoo/base/management/commands/fake.py | 90.58% β | 89.56% β | -1.02% π |
zoo/datacenters/models.py | 90.52% β | 88.83% β | -1.69% π |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
zoo/api/types.py | Dependency.resolve_all_dependency_usages | 1 β | 92 π | 10 π | 69.12% π | Extract out complex expressions |
zoo/api/types.py | Service.from_db | 0 | 40 β | 11 π | 76.21% β | Extract out complex expressions |
zoo/api/types.py | ActiveIncident.from_object | 1 β | 36 β | 10 π | 77.76% β | Extract out complex expressions |
The emojis denote the absolute quality of the code:
The π and π indicate whether the quality has improved or gotten worse with this pull request.
Please see our documentation here for details on how these metrics are calculated.
We are actively working on this report - lots more documentation and extra metrics to come!
Let us know what you think of it by mentioning @sourcery-ai in a comment.
This pull request introduces 9 alerts and fixes 20 when merging 3629dec649dd8c714634e2b7b2b420c546b16b34 into 748cb9adc52082ec9bacd9c8554bdffe9199e2fc - view on LGTM.com
new alerts:
fixed alerts:
This pull request introduces 15 alerts and fixes 20 when merging 1ac1458990d8243712698bced8223aa4d9f16d42 into 0096d10b8e9d1f9f5beb1325276c05edd540a467 - view on LGTM.com
new alerts:
fixed alerts: