Skip to content
#

static-code-analysis

Here are 429 public repositories matching this topic...

dvandersluis
dvandersluis commented Sep 16, 2021
~/code/rubocop$ grep -iro "autocorrect" . | wc -l
    1971
~/code/rubocop$ grep -iro "auto-correct" . | wc -l
    1551

Both autocorrect and auto-correct are used frequently in RuboCop. Should we be consistent? If so, which one?

Any change should only affect comments and other string content, not method names.

datree
amustaque97
amustaque97 commented Mar 20, 2022

When we build our project on macbook intel devices. It shows the following error:

go build -tags staging -ldflags="-X github.com/datreeio/datree/cmd.CliVersion=0.0.1"
# github.com/shirou/gopsutil/host
smc_darwin.c:75:41: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/Sys
reviewdog
MiguelGuthridge
MiguelGuthridge commented Mar 19, 2022

Current problem

It is almost always considered a bad practice to manually invoke a __magic__ method on a class.

# Bad
my_str = my_object.__str__()
# Good
my_str = str(my_object)

A warning for this type of issue could be nice and instructive for people who are new to Python.

Desired solution

A warning is given when Pylint is run on code that invokes __magic__ methods

Fernal73
Fernal73 commented Sep 1, 2019

Affects PMD Version:
6.17

Rule:
All rulesets.

Description:
PMD output does not inform the user as to the number of rules contravened while running the tool. The user has to look at the output file.

Code Sample demonstrating the issue:

Sep 01, 2019 9:42:45 AM net.sourceforge.pmd.cache.FileAnalysisCache loadFromFile
INFO: Analysis cache loaded
Sep 01, 2019 9:
msridhar
msridhar commented Jan 22, 2022

This would allow for more localized suppressions. Say we have a method foo(Object o) in an annotated third-party library where o has no type annotation, but o really should be @Nullable, as foo() can handle being passed null as a parameter. In code checked by NullAway, say you write:

void bigMethod() {
  ...
  foo(null); // NullAway reports an error
  ...
}

I beli

Fernal73
Fernal73 commented Nov 2, 2021
[spotbugs] Running SpotBugs...     
    [spotbugs] Unexpected problem occured during version sanity check         
    [spotbugs] Reported exception:         
[spotbugs] java.lang.AbstractMethodError: Receiver class org.slf4j.nop.NOPServiceProvider does not define or inherit an implementation of the resolved method 'abstract java.lang.String getRequesteApiVersion()' of interface org.slf4j.
FullValueRider
FullValueRider commented Dec 10, 2021

Rubberduck version information
The info below can be copy-paste-completed from the first lines of Rubberduck's log or the About box:

Rubberduck version [Version 2.5.2.6030
OS: Microsoft Windows NT 10.0.22000.0, x64
Host Product: Microsoft Office x64
Host Version: 16.0.14701.20226
Host Executable: WINWORD.EXE

Description
Language inspection for assignment of LCase suggests usi

Improve this page

Add a description, image, and links to the static-code-analysis topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the static-code-analysis topic, visit your repo's landing page and select "manage topics."

Learn more