Inspectopedia
 
2024.3

Result of object allocation ignored

Warning
New
Last modified: 03 December 2024

Reports object allocation where the result of the allocated object is ignored, for example, new Error(); as a statement, without any assignment. Such allocation expressions may indicate an odd object initialization strategy.