diff --git a/README.md b/README.md index bb5c5a1..967780b 100644 --- a/README.md +++ b/README.md @@ -2,29 +2,49 @@ ## Introduction -:wave: Welcome to GoatStyles, a repository for professional code style guides, where we strive to +:wave: Welcome to GoatStyles, a repository for professional code style guides, where we strive to uphold the highest standards of software engineering. -In the realm of code style guides, we understand that opinions vary, and decisions often balance -between necessity and subjectivity. However, amidst this diversity of perspectives, one principle -remains paramount: __consistency__. By adhering to a consistent style, developers can enhance +In the realm of code style guides, we understand that opinions vary, and decisions often balance +between necessity and subjectivity. However, amidst this diversity of perspectives, one principle +remains paramount: __consistency__. By adhering to a consistent style, developers can enhance readability, maintainability, and collaboration within their codebases. ## Styles Click on the programming language logo to view the style guide for that language. -| ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ | -|:-----------------------------------------------:|:------------------------------------------------------------------:|:----------------------------------------------:|:--------------------------------------:|:------------------------------------------:|:--------------------------------------------------------------:| -| [![C++][CPP_Logo]][CPP]
**C**++ | [![C#][CSharp_Logo]][CSharp]
**C**# | [![Dart][Dart_Logo]][Dart]
**Dart** | [![Go][Go_Logo]][Go]
**Go** | [![Java][Java_Logo]][Java]
**Java** | [![JavaScript][JavaScript_Logo]][JavaScript]
**JavaScript** | -| [![Kotlin][Kotlin_Logo]][Kotlin]
**Kotlin** | [![Objective-C][Objective-C_Logo]][Objective-C]
**Objective-C** | [![Python][Python_Logo]][Python]
**Python** | [![Rust][Rust_Logo]][Rust]
**Rust** | [![Swift][Swift_Logo]][Swift]
**Swift** | [![TypeScript][TypeScript_Logo]][TypeScript]
**TypeScript** | +| ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ | +|:----------------------------------------------:|:------------------------------------------------------------------:|:----------------------------------------------:|:--------------------------------------:|:------------------------------------------:|:--------------------------------------------------------------:| +| [![C++][CPP_Logo]][CPP]
**C**++ | [![C#][CSharp_Logo]][CSharp]
**C**# | [![Dart][Dart_Logo]][Dart]
**Dart** | [![Go][Go_Logo]][Go]
**Go** | [![Java][Java_Logo]][Java]
**Java** | [![JavaScript][JavaScript_Logo]][JavaScript]
**JavaScript** | +| [![Kotlin][Kotlin_Logo]][Kotlin]
**Kotlin** | [![Objective-C][Objective-C_Logo]][Objective-C]
**Objective-C** | [![Python][Python_Logo]][Python]
**Python** | [![Rust][Rust_Logo]][Rust]
**Rust** | [![Swift][Swift_Logo]][Swift]
**Swift** | [![TypeScript][TypeScript_Logo]][TypeScript]
**TypeScript** | + +## Badges + +Enhance your project's documentation by adding our style guide badges, signaling to fellow +developers the coding standards and conventions your project adheres to. Each badge links directly +to a comprehensive style guide for its respective programming language. + +[![Style Guide-C++](https://img.shields.io/badge/Style%20Guide-C++-00599C.svg?style=flat&labelColor=black&color=00599C&logo=cplusplus)](https://styles.goatbytes.io/lang/cpp) +[![Style Guide-C#](https://img.shields.io/badge/Style%20Guide-C%23-178600.svg?style=flat&labelColor=black&color=178600&logo=csharp)](https://styles.goatbytes.io/lang/csharp) +[![Style Guide-Dart](https://img.shields.io/badge/Style%20Guide-Dart-00B4AB.svg?style=flat&labelColor=black&color=00B4AB&logo=dart)](https://styles.goatbytes.io/lang/dart) +[![Style Guide-Go](https://img.shields.io/badge/Style%20Guide-Go-00ADD8.svg?style=flat&labelColor=black&color=00ADD8&logo=go)](https://styles.goatbytes.io/lang/go) +[![Style Guide-Java](https://img.shields.io/badge/Style%20Guide-Java-ED8B00.svg?style=flat&labelColor=black&color=ED8B00&logo=java)](https://styles.goatbytes.io/lang/java) +[![Style Guide-JavaScript](https://img.shields.io/badge/Style%20Guide-JavaScript-F0DB4F.svg?style=flat&labelColor=black&color=F0DB4F&logo=javascript)](https://styles.goatbytes.io/lang/javascript) +[![Style Guide-Kotlin](https://img.shields.io/badge/Style%20Guide-Kotlin-7F52FF.svg?style=flat&labelColor=black&color=7F52FF&logo=kotlin)](https://styles.goatbytes.io/lang/kotlin) +[![Style Guide-Objective-C](https://img.shields.io/badge/Style%20Guide-Objective--C-438EFF.svg?style=flat&labelColor=black&color=438EFF)](https://styles.goatbytes.io/lang/objective-c) +[![Style Guide-Python](https://img.shields.io/badge/Style%20Guide-Python-3776AB.svg?style=flat&labelColor=black&color=3776AB&logo=python)](https://styles.goatbytes.io/lang/python) +[![Style Guide-Rust](https://img.shields.io/badge/Style%20Guide-Rust-DEA584.svg?style=flat&labelColor=black&color=DEA584&logo=rust)](https://styles.goatbytes.io/lang/rust) +[![Style Guide-Shell](https://img.shields.io/badge/Style%20Guide-Shell-4EAA25.svg?style=flat&labelColor=black&color=4EAA25&logo=gnu-bash)](https://styles.goatbytes.io/lang/shell) +[![Style Guide-Swift](https://img.shields.io/badge/Style%20Guide-Swift-FA7343.svg?style=flat&labelColor=black&color=FA7343&logo=swift)](https://styles.goatbytes.io/lang/swift) +[![Style Guide-TypeScript](https://img.shields.io/badge/Style%20Guide-TypeScript-3178C6.svg?style=flat&labelColor=black&color=3178C6&logo=typescript)](https://styles.goatbytes.io/lang/typescript) ## Project Overview ### Programming Languages -GoatStyles provides comprehensive style guides for C++, C#, Dart, Go, Java, JavaScript, Kotlin, -Objective-C, Python, Rust, Shell, Swift, and TypeScript. Our aim is to support a wide range of +GoatStyles provides comprehensive style guides for C++, C#, Dart, Go, Java, JavaScript, Kotlin, +Objective-C, Python, Rust, Shell, Swift, and TypeScript. Our aim is to support a wide range of development environments, catering to the diverse needs of the software development community. ### Technology Stack and Tools @@ -35,17 +55,17 @@ development environments, catering to the diverse needs of the software developm ### Repository Structure -The GoatStyles style guides are meticulously documented in Markdown and located within the -[`docs/styles`](docs/lang) directory of the repository. +The GoatStyles style guides are meticulously documented in Markdown and located within the +[`docs/lang`](docs/lang) directory of the repository. ## How to Contribute -We encourage contributions to GoatStyles! Before making a contribution, please review our -[contributing](docs/contributing.md) guidelines. All contributors must complete our +We encourage contributions to GoatStyles! Before making a contribution, please review our +[contributing](docs/contributing.md) guidelines. All contributors must complete our [Individual Contributor License Agreement (CLA)][CLA] before their code can be accepted. -Forking the repository and proposing changes through pull requests are great ways to contribute. -Though not all suggestions may be accepted, your contributions are highly appreciated and crucial +Forking the repository and proposing changes through pull requests are great ways to contribute. +Though not all suggestions may be accepted, your contributions are highly appreciated and crucial to the project's growth and diversity. ## Build Instructions @@ -54,8 +74,8 @@ To build and serve the GoatStyles site locally, follow these instructions: ### Prerequisites -- **Python 3.x**: Ensure you have Python 3.x installed on your machine. You can check your -Python version by running `python --version` in your terminal. +- **Python 3.x**: Ensure you have Python 3.x installed on your machine. You can check your + Python version by running `python --version` in your terminal. - **Git**: Make sure Git is installed for cloning the repository. ### Steps @@ -68,7 +88,7 @@ Python version by running `python --version` in your terminal. ``` 2. **Set Up Python Environment (Optional)** - - It's recommended to create a virtual environment to keep dependencies required by the project + - It's recommended to create a virtual environment to keep dependencies required by the project separate from your global Python environment: ```shell python -m venv venv @@ -93,11 +113,11 @@ Python version by running `python --version` in your terminal. ```shell mkdocs serve ``` - - This command starts a local web server that serves the GoatStyles site. You can view the site + - This command starts a local web server that serves the GoatStyles site. You can view the site by navigating to `http://127.0.0.1:8000` in your web browser. 6. **Making Changes** - - You can now make changes to the Markdown files. The site will automatically rebuild and + - You can now make changes to the Markdown files. The site will automatically rebuild and refresh the browser page when you save changes. ## License @@ -106,6 +126,8 @@ Python version by running `python --version` in your terminal. # `};` +[//]: # (@formatter:off) + [GS]: https://styles.goatbytes.io [GB]: https://goatbytes.io [GH]: https://github.com/goatbytes/GoatStyles @@ -127,15 +149,15 @@ Python version by running `python --version` in your terminal. [TypeScript_Logo]: ./docs/assets/img/typescript.svg -[CPP]: https://goatbytes.github.io/GoatStyles/styles/cpp/ -[CSharp]: https://goatbytes.github.io/GoatStyles/styles/csharp/ -[Dart]: https://goatbytes.github.io/GoatStyles/styles/dart/ -[Go]: https://goatbytes.github.io/GoatStyles/styles/go/ -[Java]: https://goatbytes.github.io/GoatStyles/styles/java/ -[JavaScript]: https://goatbytes.github.io/GoatStyles/styles/javascript/ -[Kotlin]: https://goatbytes.github.io/GoatStyles/styles/kotlin/ -[Objective-C]: https://goatbytes.github.io/GoatStyles/styles/objc/ -[Python]: https://goatbytes.github.io/GoatStyles/styles/python/ -[Rust]: https://goatbytes.github.io/GoatStyles/styles/rust/ -[Swift]: https://goatbytes.github.io/GoatStyles/styles/swift/ -[TypeScript]: https://goatbytes.github.io/GoatStyles/styles/typescript/ +[CPP]: https://styles.goatbytes.io/lang/cpp/ +[CSharp]: https://styles.goatbytes.io/lang/csharp/ +[Dart]: https://styles.goatbytes.io/lang/dart/ +[Go]: https://styles.goatbytes.io/lang/go/ +[Java]: https://styles.goatbytes.io/lang/java/ +[JavaScript]: https://styles.goatbytes.io/lang/javascript/ +[Kotlin]: https://styles.goatbytes.io/lang/kotlin/ +[Objective-C]: https://styles.goatbytes.io/lang/objc/ +[Python]: https://styles.goatbytes.io/lang/python/ +[Rust]: https://styles.goatbytes.io/lang/rust/ +[Swift]: https://styles.goatbytes.io/lang/swift/ +[TypeScript]: https://styles.goatbytes.io/lang/typescript/ diff --git a/docs/index.md b/docs/index.md index 3935376..5c8c1d4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,3 +20,86 @@ address common pitfalls specific to the respective programming languages. By fol guidelines, developers can write code that is not only consistent but also optimized for readability and maintainability. /// + +## Badges + +Enhance your project's documentation by adding our style guide badges, signaling to fellow +developers the coding standards and conventions your project adheres to. Each badge links directly +to a comprehensive style guide for its respective programming language. + +**Copy Markdown Snippets for Badges** + +/// tab | [![Style Guide-C++](https://img.shields.io/badge/Style%20Guide-C++-00599C.svg?style=flat&labelColor=black&color=00599C&logo=cplusplus)](https://styles.goatbytes.io/lang/cpp) +```{.markdown .copy} +[![Style Guide-C++](https://img.shields.io/badge/Style%20Guide-C++-00599C.svg?style=flat&labelColor=black&color=00599C&logo=cplusplus)](https://styles.goatbytes.io/lang/cpp) +``` +/// +/// tab | [![Style Guide-C#](https://img.shields.io/badge/Style%20Guide-C%23-178600.svg?style=flat&labelColor=black&color=178600&logo=csharp)](https://styles.goatbytes.io/lang/csharp) +```{.markdown .copy} +[![Style Guide-C#](https://img.shields.io/badge/Style%20Guide-C%23-178600.svg?style=flat&labelColor=black&color=178600&logo=csharp)](https://styles.goatbytes.io/lang/csharp) +``` +/// +/// tab | [![Style Guide-Dart](https://img.shields.io/badge/Style%20Guide-Dart-00B4AB.svg?style=flat&labelColor=black&color=00B4AB&logo=dart)](https://styles.goatbytes.io/lang/dart) +```{.markdown .copy} +[![Style Guide-Dart](https://img.shields.io/badge/Style%20Guide-Dart-00B4AB.svg?style=flat&labelColor=black&color=00B4AB&logo=dart)](https://styles.goatbytes.io/lang/dart) +``` +/// +/// tab | [![Style Guide-Go](https://img.shields.io/badge/Style%20Guide-Go-00ADD8.svg?style=flat&labelColor=black&color=00ADD8&logo=go)](https://styles.goatbytes.io/lang/go) +```{.markdown .copy} +[![Style Guide-Go](https://img.shields.io/badge/Style%20Guide-Go-00ADD8.svg?style=flat&labelColor=black&color=00ADD8&logo=go)](https://styles.goatbytes.io/lang/go) +``` +/// +/// tab | [![Style Guide-Java](https://img.shields.io/badge/Style%20Guide-Java-ED8B00.svg?style=flat&labelColor=black&color=ED8B00&logo=java)](https://styles.goatbytes.io/lang/java) +```{.markdown .copy} +[![Style Guide-Java](https://img.shields.io/badge/Style%20Guide-Java-ED8B00.svg?style=flat&labelColor=black&color=ED8B00&logo=java)](https://styles.goatbytes.io/lang/java) +``` +/// +/// tab | [![Style Guide-JavaScript](https://img.shields.io/badge/Style%20Guide-JavaScript-F0DB4F.svg?style=flat&labelColor=black&color=F0DB4F&logo=javascript)](https://styles.goatbytes.io/lang/javascript) +```{.markdown .copy} +[![Style Guide-JavaScript](https://img.shields.io/badge/Style%20Guide-JavaScript-F0DB4F.svg?style=flat&labelColor=black&color=F0DB4F&logo=javascript)](https://styles.goatbytes.io/lang/javascript) +``` +/// +/// tab | [![Style Guide-Kotlin](https://img.shields.io/badge/Style%20Guide-Kotlin-7F52FF.svg?style=flat&labelColor=black&color=7F52FF&logo=kotlin)](https://styles.goatbytes.io/lang/kotlin) +```{.markdown .copy} +[![Style Guide-Kotlin](https://img.shields.io/badge/Style%20Guide-Kotlin-7F52FF.svg?style=flat&labelColor=black&color=7F52FF&logo=kotlin)](https://styles.goatbytes.io/lang/kotlin) +``` +/// +/// tab | [![Style Guide-Objective-C](https://img.shields.io/badge/Style%20Guide-Objective--C-438EFF.svg?style=flat&labelColor=black&color=438EFF)](https://styles.goatbytes.io/lang/objective-c) +```{.markdown .copy} +[![Style Guide-Objective-C](https://img.shields.io/badge/Style%20Guide-Objective--C-438EFF.svg?style=flat&labelColor=black&color=438EFF)](https://styles.goatbytes.io/lang/objective-c) +``` +/// +/// tab | [![Style Guide-Python](https://img.shields.io/badge/Style%20Guide-Python-3776AB.svg?style=flat&labelColor=black&color=3776AB&logo=python)](https://styles.goatbytes.io/lang/python) +```{.markdown .copy} +[![Style Guide-Python](https://img.shields.io/badge/Style%20Guide-Python-3776AB.svg?style=flat&labelColor=black&color=3776AB&logo=python)](https://styles.goatbytes.io/lang/python) +``` +/// +/// tab | [![Style Guide-Rust](https://img.shields.io/badge/Style%20Guide-Rust-DEA584.svg?style=flat&labelColor=black&color=DEA584&logo=rust)](https://styles.goatbytes.io/lang/rust) +```{.markdown .copy} +[![Style Guide-Rust](https://img.shields.io/badge/Style%20Guide-Rust-DEA584.svg?style=flat&labelColor=black&color=DEA584&logo=rust)](https://styles.goatbytes.io/lang/rust) +``` +/// +/// tab | [![Style Guide-Shell](https://img.shields.io/badge/Style%20Guide-Shell-4EAA25.svg?style=flat&labelColor=black&color=4EAA25&logo=gnu-bash)](https://styles.goatbytes.io/lang/shell) +```{.markdown .copy} +[![Style Guide-Shell](https://img.shields.io/badge/Style%20Guide-Shell-4EAA25.svg?style=flat&labelColor=black&color=4EAA25&logo=gnu-bash)](https://styles.goatbytes.io/lang/shell) +``` +/// +/// tab | [![Style Guide-Swift](https://img.shields.io/badge/Style%20Guide-Swift-FA7343.svg?style=flat&labelColor=black&color=FA7343&logo=swift)](https://styles.goatbytes.io/lang/swift) +```{.markdown .copy} +[![Style Guide-Swift](https://img.shields.io/badge/Style%20Guide-Swift-FA7343.svg?style=flat&labelColor=black&color=FA7343&logo=swift)](https://styles.goatbytes.io/lang/swift) +``` +/// +/// tab | [![Style Guide-TypeScript](https://img.shields.io/badge/Style%20Guide-TypeScript-3178C6.svg?style=flat&labelColor=black&color=3178C6&logo=typescript)](https://styles.goatbytes.io/lang/typescript) +```{.markdown .copy} +[![Style Guide-TypeScript](https://img.shields.io/badge/Style%20Guide-TypeScript-3178C6.svg?style=flat&labelColor=black&color=3178C6&logo=typescript)](https://styles.goatbytes.io/lang/typescript) +``` +/// +--- + +## License + +[GoatStyles][GH] is licensed under [Attribution-ShareAlike 4.0 International][LICENSE] + +[GB]: https://goatbytes.io +[GH]: https://github.com/goatbytes/GoatStyles +[LICENSE]: https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/docs/lang/kotlin.md b/docs/lang/kotlin.md index b456d42..a286cbb 100644 --- a/docs/lang/kotlin.md +++ b/docs/lang/kotlin.md @@ -372,7 +372,7 @@ formatting rules and conventions specified herein. 6. Rename the downloaded file to `.editorconfig`. 6. Add the `.editorconfig` file to your project root directory. -[EditorConfig File  :fontawesome-solid-download:][JB_XML]{ .md-button .md-button--primary } +[EditorConfig File  :fontawesome-solid-download:][JB_EDITORCONFIG]{ .md-button .md-button--primary } /// /// tab | XML Config @@ -409,6 +409,7 @@ remains clean and consistent with Kotlin best practices. [SonarQube]: https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/languages/kotlin/ [AndroidLint]: https://developer.android.com/studio/write/lint [JB_XML]: ../assets/files/kotlin-jetbrains.xml +[JB_EDITORCONFIG]: ../assets/files/kotlin.editorconfig [CodingConventions]: https://kotlinlang.org/docs/coding-conventions.html [AwesomeKotlin]: https://github.com/mcxiaoke/awesome-kotlin [AndroidKotlinGuide]: https://developer.android.com/kotlin/style-guide