Fork me on GitHub <


Spartanizer is a plugin for Eclipse that automatically applies the principles of Spartan Programming to your Java code. Simply put, it reviews your code, provides suggestions and applies them in order to make your code cleaner, shorter and more comprehensible.

Write efficient, spartan code

Spartanizer analyzes your code as you write it, seeking for inefficient Java syntax patterns. It then offers suggestions on how to correct your code, allowing you to either apply them automatically or manually modify your code.

The same code, only better

Spartanizer only makes syntactic changes to your code, leaving it to do exactly what you've intended in the first place.

Consider the following block of code:

                public boolean foo(String s) {
                    boolean temp = s.isEmpty();

                    if(temp) {
                        return true;
                    } else {
                        return false;

Obviously, this is long and inefficient. After running Spartanizer, the code changes to:

            public boolean foo(String s) {
                return s.isEmpty();

Spartan code is manageable code

Writing short, clean code makes it easier to maintain and extend in the future, while minimizing the need for extensive documentation.
Spartan code is self-documenting code!

Open source

Spartanizer is an open-source project, available under the MIT License. Developers from around the world are welcome to fork the project and send us pull requests on GitHub!