diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 94c6a2f3..6bc52fb8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,6 +12,8 @@ A good description helps us to review and understand your proposed changes. For * testing you performed, known limitations, open ends you possibly could not solve. * any areas where you like to get help from an experienced maintainer (yes WLEDMM has become big 😉) +## Your Pull Request (PR) + ### Target branch for pull requests Please make all PRs against the `mdev` branch. @@ -30,7 +32,7 @@ Github will pick up the changes so your PR stays up-to-date. You can find a collection of very useful tips and tricks here: https://github.com/wled-dev/WLED/wiki/How-to-properly-submit-a-PR -### Source Code from an AI agent or bot +## Source Code from an AI agent or bot > [!IMPORTANT] > Its OK if you took help from an AI for writing your source code. > @@ -40,7 +42,7 @@ You can find a collection of very useful tips and tricks here: https://github.co * Remember that AI are still "Often-Wrong" ;-) * If you don't feel very confident using English, you can use AI for translating code comments and descriptions into English. AI bots are very good at understanding language. However, always check if the results is correct. The translation might still have wrong technical terms, or errors in some details. -#### best practice with AI: +### best practice with AI: * As the person who contributes source code to WLED, make sure you understand exactly what the AI generated code does * best practice: add a comment like ``'// below section of my code was generated by an AI``, when larger parts of your source code were not written by you personally. * always review translations and code comments for correctness @@ -53,12 +55,12 @@ You can find a collection of very useful tips and tricks here: https://github.co When in doubt, it is easiest to replicate the code style you find in the files you want to edit :) Below are the guidelines we use in the WLED repository. -#### Indentation +### Indentation We use tabs for Indentation in Web files (.html/.css/.js) and spaces (2 per indentation level) for all other files. You are all set if you have enabled `Editor: Detect Indentation` in VS Code. -#### Blocks +### Blocks Whether the opening bracket of e.g. an `if` block is in the same line as the condition or in a separate line is up to your discretion. If there is only one statement, leaving out block braces is acceptable. @@ -103,7 +105,7 @@ if( a==b ){ } ``` -#### Comments +### Comments Comments should have a space between the delimiting characters (e.g. `//`) and the comment text. Note: This is a recent change, the majority of the codebase still has comments without spaces.