ActionScript inspections

Are (at least some of) the inspections valid for ActionScript code?     
I'm trying to rum "Unused Imports" inspection for a ActionScriptfile and it does not find anything, although I obviously have unused imports.

Btw the IDE displays the import font with lighter font (e.g recognizes it as unused) but inspections do not recognize it .

Thanks
Ivaylo

4 comments
Comment actions Permalink

Inspection that you run is for Java.
ActionScript inspections are under JavaScript node in the corresponding page in settings (that's not obvious, but a lot of JavaScript inspections are valid for ActionScript).
There's no such inspection as 'Unused import' for ActionScript but unused imports are highlighted when you open file in editor. Also imports are optimized when you run Optimize Imports or Reformat Code action. Both actions can be run on a folder, so you can optimize imports in the whole project in one keystroke.

0
Comment actions Permalink

>> Inspection that you run is for Java.
This is what I was afraid of.

>> ActionScript inspections are under JavaScript node in the corresponding  page in settings (that's not obvious, but a lot of JavaScript  inspections are valid for ActionScript).
That's fine enough, thanks

>> Also imports are optimized when you run Optimize Imports
If I don't check "Reformat code, will "Optimize Import" remove unused imports only, or will do additional operations like flatten com.test.a, com.swing.b to com.test.* etc? I'm asking specifically for ActionScript.

0
Comment actions Permalink

If I don't check "Reformat code, will "Optimize Import" remove unused imports only, or will do additional operations like flatten com.test.a, com.swing.b to com.test.* etc? I'm asking specifically for ActionScript.

'Optimize imports' dialog (Ctrl+Alt+O) doesn't have an option to reformat code. It has an option to rearrange - that's a different thing, keep it disabled. AFAIR this action doesn't introduce wildcard imports in ActionScript, it only removes unused ones and alpha-sorts remaining.

0
Comment actions Permalink

'Optimize imports' dialog (Ctrl+Alt+O) doesn't have an option to reformat code. It has an option to rearrange - that's a different thing, keep it disabled. AFAIR this action doesn't introduce wildcard imports in ActionScript, it only removes unused ones and alpha-sorts remaining.

Yup - this is typo - I meant "Rearange entries".
OKay, that's good enough. Thanks!

0

Please sign in to leave a comment.