Questions tagged [inspection]
111 questions
4
votes
2 answers
Suppress inspection for entire file in WebStorm/PhpStorm
We can suppress inspections using special comments like this one: // noinspection JSIgnoredPromiseFromCall, but it only works for a next line of code.
I have a big test suite where I call functions and ignore the returned promises. I don't want to…

Slava Fomin II
- 26,865
- 29
- 124
- 202
4
votes
1 answer
Run codenarc inspection in realtime in intellij
Is there any way to run inspections in real time in intellij, rather than just having to select Analyze > Inspect Code. In particular, I'd like to do real time codenarc analysis (similar to how Eclipse does with checkstyle) so when I save a file it…

Jeff Storey
- 56,312
- 72
- 233
- 406
3
votes
3 answers
How to inspect a method using reflection
public void foo(){
throw new Exception("foo");
}
public void bar(){
foo();
}
Is it possible to inspect the method bar() in order to know that foo() is called without a try catch inside bar()?

JohnJohnGa
- 15,446
- 19
- 62
- 87
3
votes
1 answer
In IntelliJ IDEA, how to set default inspection profile for new projects?
I have a custom, IDE-wide profile for Inspections in IntelliJ IDEA. I'm often creating new projects, and I want to use this profile with them by default.
I tried going to File > Other Settings > Default Settings... and changing Editor > Inspections…

Bennett Lynch
- 554
- 4
- 11
3
votes
1 answer
Heap Inspection A6-Sensitive Data Exposure
I need to fix Heap Inspection vulnerability which is coming after running security scan. Scan generated document is pointing to POJO property "private String password;".
Also it is mentioned "The application does not contain any code that sets…

deepak kasgar
- 31
- 1
- 2
3
votes
1 answer
Scala macro inspect tree for anonymous function
I'm just getting started with macros and feel like I'm missing something really painfully obvious...
I want to inspect the AST for an anonymous lambda function passed to my macro, ultimately I want to do things to it, but I've fallen at the first…

Ryan Worsley
- 655
- 1
- 4
- 17
3
votes
3 answers
IntelliJ IDEA: What is 'Unnecessary local variable' inspection name?
I want to run certain inspection on Java project. I see this inspection working in real-time in edit window. But when I use "Analyze -> Run Inspection By Name" I can't find this inspection. Actually there is one with the same name but it's for…

Aleksandr Kravets
- 5,750
- 7
- 53
- 72
3
votes
1 answer
How can i get inspect.getsource to respond to changes in source code?
I make two files:
#test_func.py
def test():
print('hello')
and
#test_inspect.py
import inspect
import test_func
reload(inspect)
reload(test_func)
reload(inspect)
reload(test_func)
print inspect.getsource(test_func.test)
Running import…

Paul
- 42,322
- 15
- 106
- 123
3
votes
1 answer
Inspecting an Android Activity's own View hierarchy at runtime
Is it possible for an Activity to get to and inspect, ideally even modify, the entire View hierarchy for itself, without knowing IDs of all the views or special access such as instrumentation mode or rooting?
E.g. would it be possible to write some…

Cumbayah
- 4,415
- 1
- 25
- 32
3
votes
2 answers
How to get the property list and values of a control within a third-party Delphi application?
I'd like to get information about a third party application's controls such as a list of its properties and their values: something like RTTI information but for a third-party Delphi application.
I see that this is possible. For example TestComplete…

jonjbar
- 3,896
- 1
- 25
- 46
2
votes
3 answers
Python introspection: Automatic wrapping of methods
object of type A and Is there a way to programatically wrap a class object?
Given
class A(object):
def __init__(self):
## ..
def f0(self, a):
## ...
def f1(self, a, b):
## ..
I want another class that wraps an…

silvermangb
- 355
- 2
- 11
2
votes
1 answer
CDI: How to debug / inspect?
Since I'm new to CDI, I encounter strange behaviors now and then which I can't explain (cyclic injection until OOMError, Interceptor not invoked on some beans, etc).
Is there a (simple) way to print a tree of beans and dependencies?

Ondra Žižka
- 43,948
- 41
- 217
- 277
2
votes
1 answer
Python: Register hooks to existing code to get control when a function is called
I'd like to get control (to execute some pre-emptive tasks) when a function is called in Python without modifying the source program, e.g., when calling test()
def test(i : int, s: str) -> int:
pass
I'd like a function myobserver to be called,…

Mike G
- 21
- 2
2
votes
0 answers
Solve datasource inspection error of EmbeddedId in IntelliJ
I am currently working with IntelliJ as my IDE and the project I am working on has a composite primary key for one of the database tables.
The table is named Measurements and has its fields laid out with one being MeasurementID as @EmbeddedID. Now…

Netsky
- 31
- 2
- 8
2
votes
1 answer
Display source code causing an exception in Python
How to retrieve the line of code (not the line number) that causes an exception?
This is an attempt.
import sys, inspect
try:
1 / 0
except Exception as e:
exc_type, exc_obj, exc_tb = sys.exc_info()
code =…

xagg
- 508
- 5
- 11