Lint tool for actionscript?

你离开我真会死。 提交于 2019-12-01 02:30:41

If you're dealing with Flex, take a look at FlexPMD.

FlexPMD should actually be named As3PMD. I mean you can run FlexPMD against a pure AS3 project, not necessarly a Flex project.

That said there are around 10 rules which are Flex-specific.

Xavier

It's not Lint, but I've found the free FlashDevelop to make me write better code, as it complains about many possible problems, such as undeclared variables.

http://www.flashdevelop.org

You could check it out.

Then there's also flex builder that you can use to write AS.

Not quite Lint, though Adobe's Flex mxmlc compiler gives plenty of helpful strict warnings about messy ActionScript, such as undeclared variables, missing function return types, and extra commas in an object/hash.

mxmlc resources:

Some related code analysis tools are Yasca (analysis tool for JavaScript, Java, PHP, etc.) and asDox (AS3 parser written in Python), which might be decent starts for writing your own.

I have used jslint in the past for jscript. As is written in JavaScript and the full source code is available, so you should be able to get it working with actionscript. I have not used any of the other tools mentions in the answers, so I don't know how they compare.

(jslint takes a very strong view about what is good jscript, you may or may not agree with it.)

Actionscript 2.0 and 3.0 are ECMA compliant scripting languages. Since ECMA script is essentially Javascript, you can typically use something like JSure (appears to be Linux only) or Javascript Lint.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!