Our system is a C code formatter which will recommend changes to a given .c file based on a series of pre-set guidelines; it will not directly change any files, only provide the user with recommendations to change parts of their code. Our system is an application that can format C code to specific guidelines that allows programmers to focus less on formatting and more on coding, prioritizing the quality of a program over the adherence to formatting guidelines. The C code formatter makes organization for programs easier.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Github
- IDE to edit files
- Test file to be formatted
- Terminal to work with the system
- Fork the repository, then clone to your local machine.
- Run the system using the command line on your local machine.
In order to run the tests, make sure you have Node.js installed. To execute testing, cd
into the program directory and run npm test
.
Each test runs a specific GUR testing function, and determines if it returns the proper suggestions for different use cases. The tests run strings through the functions, determining if the results are correct for the given parameter. One of the tests focuses on the checkSingleLetterVariables function. Here are some example test cases that it runs through:
In this test case, the checkSingleLetterVariables function is called with a code string that contains two single-letter variables (x and y): const codeString = 'int x = 5; char y = "a";';. The function returns a suggestion string that contains suggestions for both of these variables: "Consider using a more descriptive name for variable 'x'. Consider using a more descriptive name for variable 'y'. ". This means that the function correctly suggests more descriptive names for single-letter variables.
In this test case, the checkSingleLetterVariables function is called with a code string that contains two multi-letter variables (num and letter): const codeString = 'int num = 5; char letter = "a";';. The function returns an empty suggestion string: ''. This means that the function correctly does not suggest more descriptive names for multi-letter variables.
- Node.js
- Jest
- VSCode Live Server
- Chrome Dev Tools
- Hostwinds
- Infinity Free Web Hosting
- FileZilla
- ZeroSSL
Please read CONTRIBUTING.md for details on how to get involved.
We use SemVer for versioning.
- Kane Davidson - Initial work - kcd1001
- Nick Wiltshire - Initial work - nwwiltshire
- Ian Tuohy - Initial work - ipt6
- Ethan Ikhifa - Initial work - eji24
- Ryley Fernandez - Initial work - rnf45
- Brandon Udall - Initial work - bcu8
This project is licensed under the MIT License - see the LICENSE.md file for details
- Professor Leverington, provided the GUR and multiple C utility files used early in development.
- Professor Chaves, assigned this team project.