-
Notifications
You must be signed in to change notification settings - Fork 4
7. Code Style Guidelines
Maintaining a consistent code style is crucial for project readability and maintainability. This section provides guidelines on how to use the Code Style files located in the CodeStyleFiles directory of our repository.
The code style files are readily available in the CodeStyleFiles directory of our repository. To access these files, navigate to:
https://github.com/grc-iit/ChronoLog/tree/master/CodeStyleFiles
Here, you will find style configuration files that can be used with various IDEs and code editors to maintain consistent formatting.
First, download the appropriate style file for your IDE from the CodeStyleFiles directory.
- For Visual Studio: Import the .vssettings file via Tools > Import and Export Settings.
- For IntelliJ IDEA: Go to File > Settings > Editor > Code Style, click on the gear icon, and choose Import Scheme.
- For Eclipse: Under Window > Preferences > Java > Code Style, import the .xml file.
- For other editors: Refer to your editor's documentation for instructions on importing or using a code style configuration file.
- Automated Checks: Implement automated style checks using tools like ESLint for JavaScript or Flake8 for Python. Configure these tools to run as part of the continuous integration process, ensuring that every commit adheres to the defined style guidelines.
- Manual Reviews: During code reviews, reviewers should check that the submitted code complies with the established code style guidelines, in addition to functional correctness and design appropriateness.
As our project evolves, so might our coding standards. Proposed changes to the code style files should be discussed and approved through the standard pull request and review process. This ensures that any modifications are agreed upon by the project maintainers and are well documented.
Always ensure that your local development environment is configured to use these style files, as this will greatly reduce the chance of style discrepancies. If you encounter any issues with the style files, or if you have suggestions for improvement, please open an issue in the GitHub repository under the Code Style tag.
By following these guidelines, all contributors can ensure that their code meets the project’s standards, helping to maintain the quality and consistency of the codebase.