Inspections.md

November 6, 2025 ยท View on GitHub

Suppression IDNameDescription
GDXAbbrClassUse short class nameNotes when a short class name can be used for a standard scene2d.ui class instead of the full class name (libGDX >= 1.9.9).
GDXDuplicatePropertyDuplicate properties in Skin filesLooks for duplicate properties in Skin files.
GDXDuplicateResourceDuplicate resource names in Skin filesLooks for duplicate resource name in Skin files.
GDXGradlePropertiesTestIdTest IDs or dummy IDs in gradle.propertiesLooks for the use of some known test IDs and dummy IDs.
GDXInvalidEscapeInvalid escape sequenceMarks invalid escape sequences in libGDX style JSON files.
GDXJavaAssetsFileError@GDXAssets problemChecks for problems related to @GDXAssets annotations
GDXJavaFlushInsideLoopFlushing a batch inside a loopLooks for the possibility of a flush of a batch or renderer occurring inside a loop, either directly or indirectly.
For performance reasons care should be taken to not cause unnecessary flushes, and to limit the number of flushes per frame as much as possible.
Note that calling SpriteBatch.draw(..) with a different texture also causes a flush, which is not detected by this inspection. Use a Texture Atlas instead of many different textures.
GDXJavaInvalidPropertyKeyProperty key does not existLooks for the use of property keys which do not exist.
GDXJavaLogLevelOverly verbose log levelLooks for calls to Gdx.app.setLogLevel() setting the log level to LOG_INFO or LOG_VERBOSE, which while useful for debugging should probably not be used in production builds.
GDXJavaMissingFlushMissing flush on PreferencesCall Preferences.flush() to make sure changes to preferences are persisted.
GDXJavaNonExistingAssetResource doesn't existLooks in Java and Kotlin code for usages of resources which don't exist. @GDXAssets annotated elements only.
GDXJavaProfilingCodeProfiling codeLooks for profiling code, which should be disabled before release.
GDXJavaStaticResourceStatic resourceDon't make resources static, unless you take care to properly manage them. Static resources can cause problems on Android, because the life-cycle of a static variable is not necessarily the same as the life-cycle of your application.
GDXJavaTestIdTest IDs or dummy IDsLooks for the use of some known test IDs and dummy IDs.
GDXJavaUnsafeIteratorUse of non-reentrant iterator methodIf Collections::allocateIteratorsIterator is false, methods on libGDX collections return the same iterator instance each time the method is called. For nested or multithreaded iteration create a new iterator using the appropriate constructor.
GDXJavaUnusedTagUnused class tagLooks for unused class tags in GDXTag annotations.
GDXJsonDuplicatePropertyDuplicate propertyLooks for properties which are defined multiple times in the same object.
GDXKotlinAssetsFileError@GDXAssets problemChecks for problems related to @GDXAssets annotations
GDXKotlinFlushInsideLoopFlushing a batch inside a loopLooks for the possibility of a flush of a batch or renderer occurring inside a loop, either directly or indirectly.
For performance reasons care should be taken to not cause unnecessary flushes, and to limit the number of flushes per frame as much as possible.
Note that calling SpriteBatch.draw(..) with a different texture also causes a flush, which is not detected by this inspection. Use a Texture Atlas instead of many different textures.
GDXKotlinInvalidPropertyKeyProperty key does not existLooks for the use of property keys which do not exist.
GDXKotlinLogLevelOverly verbose log levelLooks for calls to Gdx.app.setLogLevel() setting the log level to LOG_INFO or LOG_VERBOSE, which while useful for debugging should probably not be used in production builds.
GDXKotlinMissingFlushMissing flush on PreferencesCall Preferences.flush() to make sure changes to preferences are persisted.
GDXKotlinNonExistingAssetResource doesn't existLooks in Java and Kotlin code for usages of resources which don't exist. @GDXAssets annotated elements only.
GDXKotlinProfilingCodeProfiling codeLooks for profiling code, which should be disabled before release.
GDXKotlinStaticResourceStatic resourceDon't make resources static, unless you take care to properly manage them. Static resources can cause problems on Android, because the life-cycle of a static variable is not necessarily the same as the life-cycle of your application.

Note that Kotlin top-level properties and properties of object literals and companion objects are compiled to static properties.
GDXKotlinTestIdTest IDs or dummy IDsLooks for the use of some known test IDs and dummy IDs.
GDXKotlinUnsafeIteratorUse of non-reentrant iterator methodIf Collections::allocateIteratorsIterator is false, methods on libGDX collections return the same iterator instance each time the method is called. For nested or multithreaded iteration create a new iterator using the appropriate constructor.
GDXKotlinUnusedTagUnused class tagLooks for unused class tags in GDXTag annotations.
GDXMalformedColorStringMalformed color stringLooks in Skin files for malformed color strings.
GDXMissingFilesPermissionMissing permissions for using external filesIf you want to use external storage on Android you have to declare the appropriate permissions in AndroidManifest.xml.
GDXMissingPropertyMissing properties in Skin filesLooks for missing mandatory properties in Skin files.
GDXNonExistingClassNon-existing classes in Skin filesLooks in Skin files for classes that don't exist and the use of non-static inner classes.
GDXNonExistingFieldNon-existing fields in Skin filesLooks in Skin files for fields/properties that don't exist.
GDXNonExistingFileNon-existing font files in Skin filesLooks for non-existing font files in Skin files.
GDXNonExistingResourceInAliasNon-existing resources in Skin filesLooks in Skin files for resource aliases for resources which do not exist.
GDXOpenGLVersionMissing OpenGL ES directiveIf your application requires OpenGL ES 2 or 3 to function, add the appropriate declaration to the manifest: <uses-feature android:glEsVersion="0x00020000" android:required="true" /> or <uses-feature android:glEsVersion="0x00030000" android:required="true" />.
GDXSkinDeprecatedUsage of deprecated class/fieldLooks for the use of deprecated classes and fields in Skin files.
GDXSkinTypeType errors in Skin filesLooks for type errors in Skin files.
GDXToplevelInvalid top level valueThe top level value of a JSON file should be an object.
GDXXmlTestIdTest IDs or dummy IDsLooks for the use of some known test IDs and dummy IDs.