mirror of
https://github.com/TheAlgorithms/C
synced 2024-12-13 07:07:10 +03:00
Documentation for 52d3b3ee4d
This commit is contained in:
parent
b1aa9143a4
commit
90fa24d8d9
@ -102,7 +102,7 @@ $(document).ready(function(){initNavTree('d6/dcd/md__c_o_n_t_r_i_b_u_t_i_n_g.htm
|
||||
<div class="contents">
|
||||
<div class="textblock"><h1><a class="anchor" id="autotoc_md18"></a>
|
||||
Before contributing</h1>
|
||||
<p >Welcome to <a href="https://github.com/TheAlgorithms/C" target="_blank">TheAlgorithms/C</a>! Before submitting pull requests, please make sure that you have <b>read the whole guidelines</b>. If you have any doubts about this contribution guide, please open <a href="https://github.com/TheAlgorithms/C/issues/new/choose" target="_blank">an issue</a> or ask in our <a href="https://discord.gg/c7MnfGFGa6" target="_blank">Discord server</a>, and clearly state your concerns.</p>
|
||||
<p >Welcome to <a href="https://github.com/TheAlgorithms/C" target="_blank">TheAlgorithms/C</a>! Before submitting pull requests, please make sure that you have <b>read the whole guidelines</b>. If you have any doubts about this contribution guide, please open <a href="https://github.com/TheAlgorithms/C/issues/new/choose" target="_blank">an issue</a> or ask on our <a href="https://discord.gg/c7MnfGFGa6" target="_blank">Discord server</a>, and clearly state your concerns.</p>
|
||||
<h1><a class="anchor" id="autotoc_md19"></a>
|
||||
Contributing</h1>
|
||||
<h2><a class="anchor" id="autotoc_md20"></a>
|
||||
@ -113,14 +113,14 @@ Contributor</h2>
|
||||
<p >Being a contributor at The Algorithms, we request you to follow the points mentioned below:</p>
|
||||
<ul>
|
||||
<li>You did your own work.<ul>
|
||||
<li>No plagiarism allowed. Any plagiarized work will not be merged.</li>
|
||||
<li>No plagiarism is allowed. Any plagiarized work will not be merged.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Your work will be distributed under the <a href="https://github.com/TheAlgorithms/C/blob/master/LICENSE" target="_blank">GNU General Public License v3.0</a> once your pull request has been merged.</li>
|
||||
<li>Please follow the repository guidelines and standards mentioned below.</li>
|
||||
</ul>
|
||||
<p ><b>New implementation</b> New implementations are welcome!</p>
|
||||
<p >You can add new algorithms or data structures which are <b>not present in the repository</b> or that can <b>improve</b> the old implementations (<b>documentation</b>, <b>improving test cases</b>, removing bugs or in any other resonable sense)</p>
|
||||
<p >You can add new algorithms or data structures that are <b>not present in the repository</b> or that can <b>improve</b> the old implementations (<b>documentation</b>, <b>improving test cases</b>, removing bugs, or in any other reasonable sense)</p>
|
||||
<p ><b>Issues</b> 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 it will be evaluated by project maintainers.
|
||||
|
||||
@subsection autotoc_md22 Making Changes
|
||||
@ -135,7 +135,7 @@ Contributor</h2>
|
||||
- Strictly use snake_case (underscore_separated) in filenames.
|
||||
- If you have added or modified code, please make sure the code compiles before submitting.
|
||||
- Our automated testing runs <a href="<a href="https://cmake.org/">https://cmake.org/</a>" target="_blank" ><strong>CMake</strong></a> on all the pull requests, so please be sure that your code passes before submitting.
|
||||
- Please conform to <a href="<a href="https://www.doxygen.nl/manual/docblocks.html">https://www.doxygen.nl/manual/docblocks.html</a>" target="_blank" >Doxygen</a> standard and document the code as much as possible. This not only facilitates the readers but also generates the correct info on website.
|
||||
- Please conform to <a href="<a href="https://www.doxygen.nl/manual/docblocks.html">https://www.doxygen.nl/manual/docblocks.html</a>" target="_blank" >Doxygen</a> standards and document the code as much as possible. This not only facilitates the readers but also generates the correct info on the website.
|
||||
- <strong>Be consistent in the use of these guidelines.</strong>
|
||||
|
||||
@subsubsection autotoc_md24 Documentation
|
||||
@ -157,7 +157,8 @@ Contributor</h2>
|
||||
@icode{c}
|
||||
/**
|
||||
* @file
|
||||
* @brief Add one line description here
|
||||
* @brief Add one line description here. Should contain a Wikipedia
|
||||
* link or another source explaining the algorithm/implementation.
|
||||
* @details
|
||||
* This is a multi-line
|
||||
* description containing links, references,
|
||||
@ -227,7 +228,7 @@ my_new_c_struct.c is correct format
|
||||
|
||||
- It will be used to dynamically create a directory of files and implementation.
|
||||
- File name validation will run on Docker to ensure validity.
|
||||
- If an implementation of the algorithm already exists and your version is different from that implemented, please use incremental numeric digit as a suffix. For example: if <tt>median_search.c</tt> already exists in the <tt>search</tt> folder, and you are contributing a new implementation, the filename should be <tt>median_search2.c</tt> and for a third implementation, <tt>median_search3.c</tt>.
|
||||
- If an implementation of the algorithm already exists and your version is different from that implemented, please use an incremental numeric digit as a suffix. For example: if <tt>median_search.c</tt> already exists in the <tt>search</tt> folder, and you are contributing a new implementation, the filename should be <tt>median_search2.c</tt>. For a third implementation, <tt>median_search3.c</tt>, and so on.
|
||||
|
||||
@subsubsection autotoc_md28 Directory guidelines
|
||||
|
||||
@ -259,6 +260,7 @@ fix: xyz algorithm bug
|
||||
feat: add xyx algorithm, struct xyz
|
||||
test: add test for xyz algorithm
|
||||
docs: add comments and explanation to xyz algorithm
|
||||
chore: update Gitpod badge
|
||||
@endicode
|
||||
|
||||
Common prefixes:
|
||||
@ -267,6 +269,7 @@ Common prefixes:
|
||||
- feat: A new feature
|
||||
- docs: Documentation changes
|
||||
- test: Correct existing tests or add new ones
|
||||
- chore: Miscellaneous changes that do not match any of the above.
|
||||
|
||||
@subsection autotoc_md30 Pull Requests
|
||||
|
||||
@ -282,7 +285,7 @@ cmake -B build -S .
|
||||
|
||||
@subsubsection autotoc_md32 Static Code Analyzer
|
||||
|
||||
We use <a href="<a href="https://clang.llvm.org/extra/clang-tidy/">https://clang.llvm.org/extra/clang-tidy/</a>" target="_blank" >clang-tidy</a> as a static code analyzer with a configuration in <a href=".clang-tidy" target="_blank" >.clang-tidy</a>.
|
||||
We use <a href="<a href="https://clang.llvm.org/extra/clang-tidy/">https://clang.llvm.org/extra/clang-tidy/</a>" target="_blank" ><tt>clang-tidy</tt></a> as a static code analyzer with a configuration in <a href=".clang-tidy" target="_blank" ><tt>.clang-tidy</tt></a>.
|
||||
|
||||
@icode{bash}
|
||||
clang-tidy --fix --quiet -p build subfolder/file_to_check.c --
|
||||
@ -290,7 +293,7 @@ clang-tidy --fix --quiet -p build subfolder/file_to_check.c --
|
||||
|
||||
@subsubsection autotoc_md33 Code Formatter
|
||||
|
||||
<a href="<a href="https://clang.llvm.org/docs/ClangFormat.html">https://clang.llvm.org/docs/ClangFormat.html</a>" target="_blank" ><strong>clang-format</strong></a> is used for code forrmating.
|
||||
<a href="<a href="https://clang.llvm.org/docs/ClangFormat.html">https://clang.llvm.org/docs/ClangFormat.html</a>" target="_blank" >**<tt>clang-format</tt>**</a> is used for code formatting.
|
||||
|
||||
- Installation (only needs to be installed once.)
|
||||
- Mac (using home-brew): <tt>brew install clang-format</tt>
|
||||
@ -302,7 +305,7 @@ clang-tidy --fix --quiet -p build subfolder/file_to_check.c --
|
||||
@subsubsection autotoc_md34 GitHub Actions
|
||||
|
||||
- Enable GitHub Actions on your fork of the repository.
|
||||
After enabling, it will execute <tt>clang-tidy</tt> and <tt>clang-format</tt> after every a push (not a commit).
|
||||
After enabling, it will execute <tt>clang-tidy</tt> and <tt>clang-format</tt> after every push (not a commit).
|
||||
- Click on the tab "Actions", then click on the big green button to enable it.
|
||||
|
||||
<img src="<a href="https://user-images.githubusercontent.com/51391473/94609466-6e925100-0264-11eb-9d6f-3706190eab2b.png">https://user-images.githubusercontent.com/51391473/94609466-6e925100-0264-11eb-9d6f-3706190eab2b.png</a>" alt="GitHub Actions"/></p>
|
||||
|
Loading…
Reference in New Issue
Block a user