mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-10 00:47:58 -06:00
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request * Fixes location of `style.md` file * Deletes duplicated `localization.md` file * Adds documentation about the bot commands. * Adds links to aka.ms link docs and the new document <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Dev docs:** Added/updated
1.8 KiB
1.8 KiB
Coding Style
Philosophy
- If it's inserting something into the existing classes/functions, try to follow the existing style as closely as possible.
- If it's brand new code or refactoring a complete class or area of the code, please follow as Modern C++ of a style as you can and reference the C++ Core Guidelines as much as you possibly can.
Formatting
- We use XamlStyler to format XAML files. You can use the Visual Studio Extension or apply formatting executing
.\.pipelines\applyXamlStyling.ps1 -Main. - We use
.clang-formatstyle file to enable automatic code formatting. You can easily format source files from Visual Studio. For example,CTRL+K CTRL+Dformats the current document. - If you prefer another text editor or have ClangFormat disabled in Visual Studio, you could invoke
format_sourcespowershell script from command line. It gets a list of all currently modified files fromgitand invokes clang-format on them. Please note that you should also haveclang-format.exein%PATH%for it to work. The script can infer the path ofclang-format.exeversion which is shipped with Visual Studio at%VCINSTALLDIR%\Tools\Llvm\bin\, if you launch it from the Native Tools Command Prompt for VS. - CI doesn't enforce code formatting yet, since we're gradually applying code formatting to the codebase, but please adhere to our formatting style for any new code.