From 69210aa6ba879c6e32bcb253853a96654581c354 Mon Sep 17 00:00:00 2001 From: Arin <136636751+asapekia@users.noreply.github.com> Date: Tue, 3 Oct 2023 23:29:13 +0530 Subject: [PATCH 1/3] adding formatting steps in contribution.md --- CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dcc86c50360d..11a550ef44da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,6 +10,9 @@ NOTE: *We DO NOT add leetcode problems. They are just applications of basic prin NOTE: *Please avoid opening issues asking to be "assigned" to a particular algorithm. This merely creates unnecessary noise for maintainers. Instead, please submit your implementation in a pull request and project maintainers will evaluate it.* +**Ensure your code is properly formatted** by using the command **clang-format -i --style=file path/to/your/file.java**. + - If you do not have the correct version of clang-format (i.e. < 16.0), you can remove **InsertNewlineAtEOF: true** from + **java/.clang-format** and manually add a newline at the end of your file before pushing. ### Do you want to contribute to the documentation? From afb2269e3cc3031fef5eb5966e8367bfe8661223 Mon Sep 17 00:00:00 2001 From: Arin <136636751+asapekia@users.noreply.github.com> Date: Sun, 8 Oct 2023 01:09:54 +0530 Subject: [PATCH 2/3] adding format to pull request template --- .github/pull_request_template.md | 3 +++ CONTRIBUTING.md | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index ce1d87a2c62e..023f3e597eca 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -13,3 +13,6 @@ In order to reduce the number of notifications sent to the maintainers, please: - [ ] All filenames are in PascalCase. - [ ] All functions and variable names follow Java naming conventions. - [ ] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations. +- [ ] Ensure your code is properly formatted by using the command ```clang-format -i --style=file path/to/your/file.java``` + If you do not have the correct version of clang-format (i.e. < 16.0), you can remove **InsertNewlineAtEOF: true** from + **java/.clang-format** and manually add a newline at the end of your file before pushing. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 11a550ef44da..f2f8dd9ffdea 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,9 +10,6 @@ NOTE: *We DO NOT add leetcode problems. They are just applications of basic prin NOTE: *Please avoid opening issues asking to be "assigned" to a particular algorithm. This merely creates unnecessary noise for maintainers. Instead, please submit your implementation in a pull request and project maintainers will evaluate it.* -**Ensure your code is properly formatted** by using the command **clang-format -i --style=file path/to/your/file.java**. - - If you do not have the correct version of clang-format (i.e. < 16.0), you can remove **InsertNewlineAtEOF: true** from - **java/.clang-format** and manually add a newline at the end of your file before pushing. ### Do you want to contribute to the documentation? @@ -31,4 +28,4 @@ NOTE: *Please avoid opening issues asking to be "assigned" to a particular algor - Ask any question about how to use the repository in the [TheAlgorithms room in GITTER](https://gitter.im/TheAlgorithms/community?source=orgpage#) or [open a new issue](https://github.com/TheAlgorithms/Java/issues/new) -:+1::tada: That's all you need to know about the process now it's your turn to help us improve the repository, thank you again! :+1::tada: +:+1::tada: That's all you need to know about the process now it's your turn to help us improve the repository, thank you again! :+1::tada: \ No newline at end of file From c29c16e18d3a868f83b160a8a850be6f59b9d7e7 Mon Sep 17 00:00:00 2001 From: Arin <136636751+asapekia@users.noreply.github.com> Date: Sun, 8 Oct 2023 17:30:24 +0530 Subject: [PATCH 3/3] made format instruction shorter --- .github/pull_request_template.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 023f3e597eca..d9cc4c3c35c5 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -13,6 +13,4 @@ In order to reduce the number of notifications sent to the maintainers, please: - [ ] All filenames are in PascalCase. - [ ] All functions and variable names follow Java naming conventions. - [ ] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations. -- [ ] Ensure your code is properly formatted by using the command ```clang-format -i --style=file path/to/your/file.java``` - If you do not have the correct version of clang-format (i.e. < 16.0), you can remove **InsertNewlineAtEOF: true** from - **java/.clang-format** and manually add a newline at the end of your file before pushing. \ No newline at end of file +- [ ] All new code is formatted with `clang-format -i --style=file path/to/your/file.java` \ No newline at end of file