Access count since 2002/3/3

Tools for programmers by Ruby

(Japanese | English)

KATTA Hitoshi

I made these tools for Java programmers and C++ programmers, but all tools are written in Ruby. I'm happy if you enjoy these small tools.

Tools for Java programmers

(1)List up unnecessary classes, interfaces and unnecessary members

JavaClassAnalyzerV1.9.3-20020602.lzh
I used this tool to remove unnecessary codes before maintenance of a complex unfamiliar application.

 > ruby memberCheck.rb rootPath targetPath outputPath

rootPath

The absolute path of the root folder of all source codes.

targetPath

The target source file or folder of this source code analysis. The relative path from rootPath.

outputPath

output file.

The results are hints of your further analysis. This tool does not care polymorphism and reflections. And assumes that one file includes only one class definition.

You have to check the results by your self.

(2)Line oriented source code formatter for JDK style

JavaFormatterV2.2-20041107.lzh
This is a simple line oriented source code formatter. It will be easy to customize this program by your self.

 > ruby format.rb [OPTIONS] sourcePath

Format the source file to mach the JDK cording standards.
The formatted file suffix is ".new" and the change information file suffix is ".diff".

sourcePath

The path of a source file or a folder.

-f

Backup the original file and overwrite the original file with the formatted codes. The backup suffix is ".old".

-F

Overwrite the original file with the formatted codes without backup file and diff file.

-r, -R

format the contents of directory recursively

You have to check the results by your self.

Tools for C++ programmers

(1)A testSuite generator for CppUnit

cppunit-autoV1.5-20071123.zip
I changed the testSuite generator for CppUnit-x by SHIBUKAWA Yoshiki to support CppUnit 1.6.2.
I referred the program by FUKUDA (episteme) Fumiki before I wrote this program.

 > ruby makeTestSuite.rb [prefix]

Parse all files which name ends with "Test.h" in the current directory, and list up all methods which matches "void testXXX()". And makes a TestSuite class files and Tester.cpp.
But if the class has a suite() method, the TestSuite class call the suite() method.

prefix

prefix of the TestSuite file.


Home