当前位置: 动力学知识库 > 问答 > 编程问答 >

Findbugs for Ant XML files

问题描述:

We have a pretty big project and ant xmls grow fast as hell. We already have different static code analysis tools integrated, and I am looking for something like checkstyle+findbugs, but for ANT XMLs, to validate the correctness of the file, maybe to find unused properties, etc.

Do anybody know anything like this?

网友答案:

Both IntelliJ IDEA and Eclipse provide excellent Ant support.

IntelliJ Ant Support

Coding Assistance

When editing Ant build files in IntelliJ IDEA, you can enjoy the following advanced editing features:

  • Syntax highlighting.
  • Code completion. In particular, code completion is provided for the properties of the File type.
  • Navigating to declaration Ctrl+B.
  • Using Structure view.
  • Rename refactoring.
  • Code folding.
  • Reformatting.
  • Validation.
  • Viewing parameter information Ctrl+P.
  • Viewing quick info GuiDesigner.QuickJavadoc. In particular, if classpath is defined as a path-like structures, the View Quick Info command for the fileset or dirset directives displays the actual files and directories on the disk, to which these directives are resolved.

Path-Like Structures

IntelliJ IDEA enables using path-like structures in the task definitions. If a classpath is defined as a path-like structure, the paths in the fileset and dirset directives are resolved into the actual files and directories on the disk. All JARs, required for performing the task, should be placed to the same place that contains the JAR with task definitions.

Eclipse Ant Editor

  • Syntax highlighting
  • Content/code assist (including Ant specific templates)
  • Annotations
分享给朋友:
您可能感兴趣的文章:
随机阅读: