You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Condition comparing incompatible types in "numpy.distutils.system_info.libpaths" #17489
The condition of this if statement will always be False because it compares a tuple and a string with the operator ==. The documentation of platform.architecture() explicitly says:
Returns a tuple (bits, linkage) which contain information about the bit architecture and the linkage format used for the executable. Both values are returned as strings.
I guess the developer intended to write instead:
if platform.architecture()[0] == '32bit':
In case you have any question, suggestion or if you see a False Positive on SonarCloud you can reach out on SonarSource community forum.
A few notes in case you want to use SonarCloud:
I am currently testing the python analyzer so the numpy project I created on SonarCloud will only show python issues, but SonarCloud can also analyze C/C++ code and other languages.
SonarCloud can easily import pylint and flake8 issues in case you want to use a rule SonarCloud does not already provide. Note however that pylint/flake8 rules and SonarCloud rules are implemented differently. You might see new issues with SonarCloud, or less issues in some cases (we try to avoid False Positives as much as possible).
@eric-wieser The detection is automatic on SonarCloud. I wrote the Github issues manually. At SonarSource we validate our static code analyzers by testing them on popular open source projects, such as numpy, to make sure that we find valuable issues and raise no False Positives. This is how I saw these bugs.
I will report one more issue and stop there for now as I have to to take a look at other open source projects. If you want to see all the bugs we detected you can look at this list here.
As mentioned above, if you see any False Positives or if you have a question or feedback don't hesitate to share it on the community forum.
This was introduced in ea083bd by @xoviat, which interestingly seems to have no PR associated with it. So at any rate, this was never a regression - it was just a feature that didn't work for 32-bit platforms, likely because few windows users have one.
I wasn't banned from GitHub, I deleted my account because these projects were consuming all of my time. I've been back for some time now, but have been working on other projects for now. I may come back to this, but have no immediate plans. I apologize if my account deletion affected PRs.
Activity
eric-wieser commentedon Oct 7, 2020
I'm curious - are you writing these issues manually, or is this automated?
nicolas-harraudeau-sonarsource commentedon Oct 7, 2020
@eric-wieser The detection is automatic on SonarCloud. I wrote the Github issues manually. At SonarSource we validate our static code analyzers by testing them on popular open source projects, such as numpy, to make sure that we find valuable issues and raise no False Positives. This is how I saw these bugs.
I will report one more issue and stop there for now as I have to to take a look at other open source projects. If you want to see all the bugs we detected you can look at this list here.
As mentioned above, if you see any False Positives or if you have a question or feedback don't hesitate to share it on the community forum.
eric-wieser commentedon Oct 19, 2020
This was introduced in ea083bd by @xoviat, which interestingly seems to have no PR associated with it. So at any rate, this was never a regression - it was just a feature that didn't work for 32-bit platforms, likely because few windows users have one.
charris commentedon Oct 19, 2020
xoviat
was banned byleft GitHub and his PRs disappeared. I don't recall if that also included merged PRs.Edit: changed misleading text
eric-wieser commentedon Oct 19, 2020
Email archive to the rescue - it was #9854
xoviat commentedon Oct 20, 2020
I wasn't banned from GitHub, I deleted my account because these projects were consuming all of my time. I've been back for some time now, but have been working on other projects for now. I may come back to this, but have no immediate plans. I apologize if my account deletion affected PRs.
eric-wieser commentedon Oct 21, 2020
No need to apologise for a UI bug in github @xoviat - glad to here you were able to reallocate your time in a way that worked better for you.