0

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?

Alex Luberg
  • 247
  • 3
  • 10
  • *"and ant xmls grow fast as hell"* ... I wouldn't need a static code analysis tool for that. SCNR ;-) – Arne Jul 15 '12 at 20:20
  • I suggest using Sonar to run your source code analysis. The Sonar ANT task will run checkstyle, PMD and Findbugs for you automatically. It's worth taking some time to learn how it works. – Mark O'Connor Jul 16 '12 at 16:25
  • Actually I am looking for this too FOR sonar, because sonar is just a storage for metrics. Almost all codebase is covered with some metrics already, pmd, jmi, findbugs, and only ANT XML files are not. – Alex Luberg Jul 19 '12 at 07:56

1 Answers1

0

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
Christopher Peisert
  • 21,862
  • 3
  • 86
  • 117