|
|
TopCoder is in the process of developing a set of components that will perform code formatting for multiple programming languages. We would like the TopCoder members to assist defining the scope of this application.
Once completed, the components will be used in the arena to clean up code (when viewed during the challenge phase, for example) and may also be used to guarantee standardized code formatting across all components. (for example, code in development submissions might automatically be formatted)
Below are the current goals of this project. These goals may be refined as the project matures. Please look over these goals and let us know if you have any ideas or comments regarding this project.
We will also be looking to outsource a lot of the work involved in this project (similar to the UML Tool) so if anyone is interested in helping out, let me know.
Goals:
The Code Formatter is made up of several components and will be developed following the entire TopCoder application development process: specification, architecture, component development, assembly, testing and deployment.
The Code Formatter formats code written in multiple languages. The following languages are supported: Java, C#, VB.NET and C++.
The Code Formatter uses a parser-based approach to formatting for maximum flexibility. (versus a simple finite-state machine approach) It generates a syntax tree based on the input and generates its output while visiting the nodes in the tree.
The Code Formatter supports a wide variety of configuration options to manipulate the style of the code that it outputs.
The Code Formatter gracefully handles invalid input (input that does not compile in the target language).
The Code Formatter properly handles comments, strings and macros. (comments are carried over to the output and may or may not receive formatting, such as maximum line length enforcement; the formatter does not get confused by keywords in strings; the formatter can handle macros in languages that support them)
The Code Formatter will never alter the code in such a way that it will behave differently than the original version when compiled and executed. |