Questions tagged [code-inspection]

261 questions
0
votes
1 answer

PhpStorm HTML inspection issue

I can't figure out why PhpStorm IDE is treating src HTML attribute as a JavaScript code (or a kind of regular expression). After code inspection this error is assigned to "JavaScript validity issues". Have someone resolved this error before? Can I…
pfcode
  • 35
  • 7
0
votes
0 answers

Author tag checkstyle warning when using Intellij Inspect Code

When I use IntelliJ's Inspect Code, the IDE shows the following warning message: Name       Test.java Location package test.exercisefile Test.java Problem synopsis Checkstyle: @author=John.Doe (at line 32) My actual source comment…
0
votes
1 answer

WebStorm keeps treating JSX as XML

My WebStorm keeps treating any JSX code as XML which then results in dozens of unwanted inspection errors, see screenshots. Also it keeps saying "Unresolved variable or function" for most of the object keys in files, for example for props keys in…
Foxhoundn
  • 1,766
  • 2
  • 13
  • 19
0
votes
0 answers

How to disable code inspections for piece of code?

In PhpStorm I can use tags @codeCoverageIgnoreStart @codeCoverageIgnoreStop to disable coverage checking for piece of code. Is there something similar for disabling code inspections for piece of code?
Hajle
  • 31
  • 1
0
votes
2 answers

PyCharm warns some correct imports

I am new to Python and can't judge if it is error of PyCharm or not, but inside working program I found the following code Apparently, reference is ok, since program is executing without any error. UPDATE As I can judge, interpeter is set…
Dims
  • 47,675
  • 117
  • 331
  • 600
0
votes
1 answer

How to exclude code block in Intellij IDEA Structural Replace

I'm creating own inspections based on Structural Replace. For example I want to make inspection of transforming code like: if (!$Map$.containsKey($key$)){ $Map$.put($key$, $value$); } and if ($Map$.get($key$) == null){ $Map$.put($key$,…
0
votes
0 answers

Inspection to separate one java package from the rest of the project

I have a java package foo.bar. It contains few classes, that are frequently modified, improved etc in this time of project. I don't want any developer to use classes from the other packages in this one. I want this package to be separated in its…
igr
  • 10,199
  • 13
  • 65
  • 111
0
votes
1 answer

How to find top level not annotated classes in IntelliJ IDEA

Motivation: Every class/interface/annotation/enum has to be annotated by @SomeAnnotation. However we want this annotation to be only at the top level classes and not at the inner ones. The goal is to create a structural inspection which warns…
0
votes
0 answers

Clear a div after console is open

I have found a code that clear certain div after a interval a time var currentInnerHtml; var element = new Image(); var elementWithHiddenContent = document.querySelector("#testDiv"); var innerHtml =…
Jurgen Kruja
  • 57
  • 1
  • 11
0
votes
1 answer

Updating internal interface-to-type resolution

While working with a PHP project and updating an interface while the implementing class is open in a different tab, I often encounter that the implementation is invalidated due to changes in the signature of the method (e.g parameter type is…
0
votes
3 answers

Android Studio error message I18n

I got an error message that says: [I18N] Hardcoded string "Today - Sunny - 78/67", should use @string resource. How can this error be resolved? The line of code is: android:text="Today - Sunny - 78/67"
0
votes
1 answer

Set changing scala project dependency in Intellij IDEA 14 (for code completion and inspection)

I'm currently developing a multi-project Scala application in IntelliJ IDEA 14 with SBT. Projects have dependencies (dependency projects) between them and I need IntelliJ IDEA to inspect code from all projects, at least, from the projects I use from…
vicaba
  • 2,836
  • 1
  • 27
  • 45
0
votes
0 answers

Static code analysis on mandatory variable evaluation

I have this C# solution in which we use a certain pattern. A function returns true/false whether it succeed, and some value. If the function returned false, the value may not be used. Thus in the scope where such a function (with this particular…
0
votes
1 answer

Disable code inspection in SharpDevelop

How can I disable the code inspection in SharpDevelop 5.1? It annoys me as hell and slows down typing speed due to constant code checks. There is a checkbox in Tools - Options - Coding - C# - Code inspection, but it is read-only.
IS4
  • 11,945
  • 2
  • 47
  • 86
0
votes
1 answer

Multiple methods in replace pattern

When I'm trying to write a custom rule in Resharper to split method, I can't save a rule when there are multiple methods in replace pattern screen (It says that method1 is unexpected token, although when I remove method2 everything is OK) Is there…
Mateusz Dryzek
  • 651
  • 4
  • 18