Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Code Readability with clang-format and Refactoring #188

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

atsushifx
Copy link

This pull request includes a series of changes made primarily through the application of clang-format to enhance code formatting and readability. It is recommended to review these changes with the -w and -b options in diff to ignore whitespace changes, providing a clearer view of the substantive modifications. The specific improvements are as follows:

  1. Application of clang-format: Utilized clang-format to standardize and clean up the codebase, aligning it with best practices for formatting and style.

  2. Removal of unnecessary blank lines: Eliminated superfluous blank lines found among some global variable declarations and function declarations, making the code more compact and easy to navigate.

  3. Breaking long comments into multiple lines: Refactored lengthy comments to span multiple lines, thereby improving the readability and maintainability of the code.

  4. Standardization of variable declaration formatting: Reorganized multi-line variable declarations to adhere to a uniform format, enhancing the visual coherence of the code.

  5. Adjustment of indentation: Fine-tuned the indentation within conditional statements and function calls to better illustrate the logical structure of the code.

  6. Code refactoring: Simplified complex conditional statements, making them more understandable and maintainable.

The primary goal of these changes is to improve the overall quality and maintainability of the code, facilitating easier understanding and modification by other developers in the future. This pull request focuses on non-functional enhancements, maintaining the existing behavior of the application while significantly improving its underlying code structure.

@atsushifx
Copy link
Author

atsushifx commented Mar 18, 2024

if you check diff on github, please check with w=1 option.
(i.e. https://github.com/hanslub42/rlwrap/pull/188/files?w=1 )
This option ignore only change spaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant