opencode-conductor-plugin 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +91 -0
- package/dist/commands/implement.d.ts +2 -0
- package/dist/commands/implement.js +17 -0
- package/dist/commands/newTrack.d.ts +2 -0
- package/dist/commands/newTrack.js +19 -0
- package/dist/commands/revert.d.ts +2 -0
- package/dist/commands/revert.js +17 -0
- package/dist/commands/setup.d.ts +2 -0
- package/dist/commands/setup.js +19 -0
- package/dist/commands/status.d.ts +2 -0
- package/dist/commands/status.js +15 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +97 -0
- package/dist/prompts/agent/conductor.md +33 -0
- package/dist/prompts/agent.md +23 -0
- package/dist/prompts/commands/c-implement.md +5 -0
- package/dist/prompts/commands/c-new.md +5 -0
- package/dist/prompts/commands/c-revert.md +5 -0
- package/dist/prompts/commands/c-setup.md +5 -0
- package/dist/prompts/commands/c-status.md +5 -0
- package/dist/prompts/implement.toml +170 -0
- package/dist/prompts/newTrack.toml +144 -0
- package/dist/prompts/revert.toml +123 -0
- package/dist/prompts/setup.toml +426 -0
- package/dist/prompts/status.toml +57 -0
- package/dist/templates/code_styleguides/c.md +28 -0
- package/dist/templates/code_styleguides/cpp.md +46 -0
- package/dist/templates/code_styleguides/csharp.md +115 -0
- package/dist/templates/code_styleguides/dart.md +238 -0
- package/dist/templates/code_styleguides/general.md +23 -0
- package/dist/templates/code_styleguides/go.md +48 -0
- package/dist/templates/code_styleguides/html-css.md +49 -0
- package/dist/templates/code_styleguides/java.md +39 -0
- package/dist/templates/code_styleguides/javascript.md +51 -0
- package/dist/templates/code_styleguides/julia.md +27 -0
- package/dist/templates/code_styleguides/kotlin.md +41 -0
- package/dist/templates/code_styleguides/php.md +37 -0
- package/dist/templates/code_styleguides/python.md +37 -0
- package/dist/templates/code_styleguides/react.md +37 -0
- package/dist/templates/code_styleguides/ruby.md +39 -0
- package/dist/templates/code_styleguides/rust.md +44 -0
- package/dist/templates/code_styleguides/shell.md +35 -0
- package/dist/templates/code_styleguides/solidity.md +60 -0
- package/dist/templates/code_styleguides/sql.md +39 -0
- package/dist/templates/code_styleguides/swift.md +36 -0
- package/dist/templates/code_styleguides/typescript.md +43 -0
- package/dist/templates/code_styleguides/vue.md +38 -0
- package/dist/templates/code_styleguides/zig.md +27 -0
- package/dist/templates/workflow.md +333 -0
- package/dist/utils/bootstrap.d.ts +1 -0
- package/dist/utils/bootstrap.js +49 -0
- package/dist/utils/promptLoader.d.ts +1 -0
- package/dist/utils/promptLoader.js +23 -0
- package/dist/utils/stateManager.d.ts +10 -0
- package/dist/utils/stateManager.js +30 -0
- package/package.json +74 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Google C# Style Guide Summary
|
|
2
|
+
|
|
3
|
+
This document summarizes key rules and best practices from the Google C# Style Guide.
|
|
4
|
+
|
|
5
|
+
## 1. Naming Conventions
|
|
6
|
+
- **PascalCase:** For class names, method names, constants, properties, namespaces, and public fields.
|
|
7
|
+
- Example: `MyClass`, `GetValue()`, `MaxValue`
|
|
8
|
+
- **_camelCase:** For private, internal, and protected fields (with leading underscore).
|
|
9
|
+
- Example: `_myField`, `_internalState`
|
|
10
|
+
- **camelCase:** For local variables and parameters.
|
|
11
|
+
- Example: `localVariable`, `methodParameter`
|
|
12
|
+
- **Interfaces:** Prefix with `I` (e.g., `IMyInterface`).
|
|
13
|
+
- **Type Parameters:** Use descriptive names prefixed with `T` (e.g., `TValue`, `TKey`), or just `T` for simple cases.
|
|
14
|
+
|
|
15
|
+
## 2. Formatting Rules
|
|
16
|
+
- **Indentation:** Use 2 spaces (never tabs).
|
|
17
|
+
- **Braces:** K&R style—no line break before the opening brace; keep `} else` on one line; braces required even when optional.
|
|
18
|
+
```csharp
|
|
19
|
+
if (condition) {
|
|
20
|
+
DoSomething();
|
|
21
|
+
} else {
|
|
22
|
+
DoSomethingElse();
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
- **Line Length:** Column limit 100.
|
|
26
|
+
- **One Statement Per Line:** Each statement on its own line.
|
|
27
|
+
|
|
28
|
+
## 3. Declaration Order
|
|
29
|
+
Class member ordering:
|
|
30
|
+
- Group members in this order:
|
|
31
|
+
1. Nested classes, enums, delegates, and events
|
|
32
|
+
2. Static, const, and readonly fields
|
|
33
|
+
3. Fields and properties
|
|
34
|
+
4. Constructors and finalizers
|
|
35
|
+
5. Methods
|
|
36
|
+
- Within each group, order by accessibility:
|
|
37
|
+
1. Public
|
|
38
|
+
2. Internal
|
|
39
|
+
3. Protected internal
|
|
40
|
+
4. Protected
|
|
41
|
+
5. Private
|
|
42
|
+
- Where possible, group interface implementations together.
|
|
43
|
+
|
|
44
|
+
## 4. Language Features
|
|
45
|
+
- **var:** Use of `var` is encouraged if it aids readability by avoiding type names that are noisy, obvious, or unimportant. Prefer explicit types when it improves clarity.
|
|
46
|
+
```csharp
|
|
47
|
+
var apple = new Apple(); // Good - type is obvious
|
|
48
|
+
bool success = true; // Preferred over var for basic types
|
|
49
|
+
```
|
|
50
|
+
- **Expression-bodied Members:** Use sparingly for simple properties and lambdas; don't use on method definitions.
|
|
51
|
+
```csharp
|
|
52
|
+
public int Age => _age;
|
|
53
|
+
// Methods: prefer block bodies.
|
|
54
|
+
```
|
|
55
|
+
- **String Interpolation:** In general, use whatever is easiest to read, particularly for logging and assert messages.
|
|
56
|
+
- Be aware that chained `operator+` concatenations can be slower and cause memory churn.
|
|
57
|
+
- If performance is a concern, `StringBuilder` can be faster for multiple concatenations.
|
|
58
|
+
```csharp
|
|
59
|
+
var message = $"Hello, {name}!";
|
|
60
|
+
```
|
|
61
|
+
- **Collection Initializers:** Use collection and object initializers when appropriate.
|
|
62
|
+
```csharp
|
|
63
|
+
var list = new List<int> { 1, 2, 3 };
|
|
64
|
+
```
|
|
65
|
+
- **Null-conditional Operators:** Use `?.` and `??` to simplify null checks.
|
|
66
|
+
```csharp
|
|
67
|
+
var length = text?.Length ?? 0;
|
|
68
|
+
```
|
|
69
|
+
- **Pattern Matching:** Use pattern matching for type checks and casts.
|
|
70
|
+
```csharp
|
|
71
|
+
if (obj is string str) { /* use str */ }
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## 5. Best Practices
|
|
75
|
+
- **Structs vs Classes**:
|
|
76
|
+
- Almost always use a class.
|
|
77
|
+
- Consider structs only for small, value-like types that are short-lived or frequently embedded.
|
|
78
|
+
- Performance considerations may justify deviations from this guidance.
|
|
79
|
+
- **Access Modifiers:** Always explicitly declare access modifiers (don't rely on defaults).
|
|
80
|
+
- **Ordering Modifiers:** Use standard order: `public protected internal private new abstract virtual override sealed static readonly extern unsafe volatile async`.
|
|
81
|
+
- **Namespace Imports:** Place `using` directives at the top of the file (outside namespaces); `System` first, then alphabetical.
|
|
82
|
+
- **Constants:** Always make variables `const` when possible; if not, use `readonly`. Prefer named constants over magic numbers.
|
|
83
|
+
- **IEnumerable vs IList vs IReadOnlyList:** When method inputs are intended to be immutable, prefer the most restrictive collection type possible (e.g., IEnumerable, IReadOnlyList); for return values, prefer IList when transferring ownership of a mutable collection, and otherwise prefer the most restrictive option.
|
|
84
|
+
- **Array vs List:** Prefer `List<>` for public variables, properties, and return types. Use arrays when size is fixed and known at construction time, or for multidimensional arrays.
|
|
85
|
+
- **Extension Methods:** Only use when the source is unavailable or changing it is infeasible. Only for core, general features. Be aware they obfuscate code.
|
|
86
|
+
- **LINQ:** Use LINQ for readability, but be mindful of performance in hot paths.
|
|
87
|
+
|
|
88
|
+
## 6. File Organization
|
|
89
|
+
- **One Class Per File:** Typically one class, interface, enum, or struct per file.
|
|
90
|
+
- **File Name:** Prefer the file name to match the name of the primary type it contains.
|
|
91
|
+
- **Folders and File Locations:**
|
|
92
|
+
- Be consistent within the project.
|
|
93
|
+
- Prefer a flat folder structure where possible.
|
|
94
|
+
- Don’t force file/folder layout to match namespaces.
|
|
95
|
+
- **Namespaces:**
|
|
96
|
+
- In general, namespaces should be no more than 2 levels deep.
|
|
97
|
+
- For shared library/module code, use namespaces.
|
|
98
|
+
- For leaf application code, namespaces are not necessary.
|
|
99
|
+
- New top-level namespace names must be globally unique and recognizable.
|
|
100
|
+
|
|
101
|
+
## 7. Parameters and Returns
|
|
102
|
+
- **out Parameters:** Permitted for output-only values; place `out` parameters after all other parameters. Prefer tuples or return types when they improve clarity.
|
|
103
|
+
- **Argument Clarity:** When argument meaning is nonobvious, use named constants, replace `bool` with `enum`, use named arguments, or create a configuration class/struct.
|
|
104
|
+
```csharp
|
|
105
|
+
// Bad
|
|
106
|
+
DecimalNumber product = CalculateProduct(values, 7, false, null);
|
|
107
|
+
|
|
108
|
+
// Good
|
|
109
|
+
var options = new ProductOptions { PrecisionDecimals = 7, UseCache = CacheUsage.DontUseCache };
|
|
110
|
+
DecimalNumber product = CalculateProduct(values, options, completionDelegate: null);
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**BE CONSISTENT.** When editing code, follow the existing style in the codebase.
|
|
114
|
+
|
|
115
|
+
*Source: [Google C# Style Guide](https://google.github.io/styleguide/csharp-style.html)*
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# Dart Code Style Guide
|
|
2
|
+
|
|
3
|
+
This guide summarizes key recommendations from the official Effective Dart documentation, covering style, documentation, language usage, and API design principles. Adhering to these guidelines promotes consistent, readable, and maintainable Dart code.
|
|
4
|
+
|
|
5
|
+
## 1. Style
|
|
6
|
+
|
|
7
|
+
### 1.1. Identifiers
|
|
8
|
+
|
|
9
|
+
- **DO** name types, extensions, and enum types using `UpperCamelCase`.
|
|
10
|
+
- **DO** name packages, directories, and source files using `lowercase_with_underscores`.
|
|
11
|
+
- **DO** name import prefixes using `lowercase_with_underscores`.
|
|
12
|
+
- **DO** name other identifiers (class members, top-level definitions, variables, parameters) using `lowerCamelCase`.
|
|
13
|
+
- **PREFER** using `lowerCamelCase` for constant names.
|
|
14
|
+
- **DO** capitalize acronyms and abbreviations longer than two letters like words (e.g., `Http`, `Nasa`, `Uri`). Two-letter acronyms (e.g., `ID`, `TV`, `UI`) should remain capitalized.
|
|
15
|
+
- **PREFER** using wildcards (`_`) for unused callback parameters in anonymous and local functions.
|
|
16
|
+
- **DON'T** use a leading underscore for identifiers that aren't private.
|
|
17
|
+
- **DON'T** use prefix letters (e.g., `kDefaultTimeout`).
|
|
18
|
+
- **DON'T** explicitly name libraries using the `library` directive.
|
|
19
|
+
|
|
20
|
+
### 1.2. Ordering
|
|
21
|
+
|
|
22
|
+
- **DO** place `dart:` imports before other imports.
|
|
23
|
+
- **DO** place `package:` imports before relative imports.
|
|
24
|
+
- **DO** specify exports in a separate section after all imports.
|
|
25
|
+
- **DO** sort sections alphabetically.
|
|
26
|
+
|
|
27
|
+
### 1.3. Formatting
|
|
28
|
+
|
|
29
|
+
- **DO** format your code using `dart format`.
|
|
30
|
+
- **CONSIDER** changing your code to make it more formatter-friendly (e.g., shortening long identifiers, simplifying nested expressions).
|
|
31
|
+
- **PREFER** lines 80 characters or fewer.
|
|
32
|
+
- **DO** use curly braces for all flow control statements (`if`, `for`, `while`, `do`, `try`, `catch`, `finally`).
|
|
33
|
+
|
|
34
|
+
## 2. Documentation
|
|
35
|
+
|
|
36
|
+
### 2.1. Comments
|
|
37
|
+
|
|
38
|
+
- **DO** format comments like sentences (capitalize the first word, end with a period).
|
|
39
|
+
- **DON'T** use block comments (`/* ... */`) for documentation; use `//` for regular comments.
|
|
40
|
+
|
|
41
|
+
### 2.2. Doc Comments
|
|
42
|
+
|
|
43
|
+
- **DO** use `///` doc comments to document members and types.
|
|
44
|
+
- **PREFER** writing doc comments for public APIs.
|
|
45
|
+
- **CONSIDER** writing a library-level doc comment.
|
|
46
|
+
- **CONSIDER** writing doc comments for private APIs.
|
|
47
|
+
- **DO** start doc comments with a single-sentence summary.
|
|
48
|
+
- **DO** separate the first sentence of a doc comment into its own paragraph.
|
|
49
|
+
- **AVOID** redundancy with the surrounding context (e.g., don't repeat the class name in its doc comment).
|
|
50
|
+
- **PREFER** starting comments of a function or method with third-person verbs if its main purpose is a side effect (e.g., "Connects to...").
|
|
51
|
+
- **PREFER** starting a non-boolean variable or property comment with a noun phrase (e.g., "The current day...").
|
|
52
|
+
- **PREFER** starting a boolean variable or property comment with "Whether" followed by a noun or gerund phrase (e.g., "Whether the modal is...").
|
|
53
|
+
- **PREFER** a noun phrase or non-imperative verb phrase for a function or method if returning a value is its primary purpose.
|
|
54
|
+
- **DON'T** write documentation for both the getter and setter of a property.
|
|
55
|
+
- **PREFER** starting library or type comments with noun phrases.
|
|
56
|
+
- **CONSIDER** including code samples in doc comments using triple backticks.
|
|
57
|
+
- **DO** use square brackets (`[]`) in doc comments to refer to in-scope identifiers (e.g., `[StateError]`, `[anotherMethod()]`, `[Duration.inDays]`, `[Point.new]`).
|
|
58
|
+
- **DO** use prose to explain parameters, return values, and exceptions.
|
|
59
|
+
- **DO** put doc comments before metadata annotations.
|
|
60
|
+
|
|
61
|
+
### 2.3. Markdown
|
|
62
|
+
|
|
63
|
+
- **AVOID** using markdown excessively.
|
|
64
|
+
- **AVOID** using HTML for formatting.
|
|
65
|
+
- **PREFER** backtick fences (```) for code blocks.
|
|
66
|
+
|
|
67
|
+
### 2.4. Writing
|
|
68
|
+
|
|
69
|
+
- **PREFER** brevity.
|
|
70
|
+
- **AVOID** abbreviations and acronyms unless they are obvious.
|
|
71
|
+
- **PREFER** using "this" instead of "the" to refer to a member's instance.
|
|
72
|
+
|
|
73
|
+
## 3. Usage
|
|
74
|
+
|
|
75
|
+
### 3.1. Libraries
|
|
76
|
+
|
|
77
|
+
- **DO** use strings in `part of` directives.
|
|
78
|
+
- **DON'T** import libraries that are inside the `src` directory of another package.
|
|
79
|
+
- **DON'T** allow an import path to reach into or out of `lib`.
|
|
80
|
+
- **PREFER** relative import paths when not crossing the `lib` boundary.
|
|
81
|
+
|
|
82
|
+
### 3.2. Null Safety
|
|
83
|
+
|
|
84
|
+
- **DON'T** explicitly initialize variables to `null`.
|
|
85
|
+
- **DON'T** use an explicit default value of `null`.
|
|
86
|
+
- **DON'T** use `true` or `false` in equality operations (e.g., `if (nonNullableBool == true)`).
|
|
87
|
+
- **AVOID** `late` variables if you need to check whether they are initialized; prefer nullable types.
|
|
88
|
+
- **CONSIDER** type promotion or null-check patterns for using nullable types.
|
|
89
|
+
|
|
90
|
+
### 3.3. Strings
|
|
91
|
+
|
|
92
|
+
- **DO** use adjacent strings to concatenate string literals.
|
|
93
|
+
- **PREFER** using interpolation (`$variable`, `${expression}`) to compose strings and values.
|
|
94
|
+
- **AVOID** using curly braces in interpolation when not needed (e.g., `'$name'` instead of `'${name}'`).
|
|
95
|
+
|
|
96
|
+
### 3.4. Collections
|
|
97
|
+
|
|
98
|
+
- **DO** use collection literals (`[]`, `{}`, `<type>{}`) when possible.
|
|
99
|
+
- **DON'T** use `.length` to check if a collection is empty; use `.isEmpty` or `.isNotEmpty`.
|
|
100
|
+
- **AVOID** using `Iterable.forEach()` with a function literal; prefer `for-in` loops.
|
|
101
|
+
- **DON'T** use `List.from()` unless you intend to change the type of the result; prefer `.toList()`.
|
|
102
|
+
- **DO** use `whereType()` to filter a collection by type.
|
|
103
|
+
- **AVOID** using `cast()` when a nearby operation (like `List<T>.from()` or `map<T>()`) will do.
|
|
104
|
+
|
|
105
|
+
### 3.5. Functions
|
|
106
|
+
|
|
107
|
+
- **DO** use a function declaration to bind a function to a name.
|
|
108
|
+
- **DON'T** create a lambda when a tear-off will do (e.g., `list.forEach(print)` instead of `list.forEach((e) => print(e))`).
|
|
109
|
+
|
|
110
|
+
### 3.6. Variables
|
|
111
|
+
|
|
112
|
+
- **DO** follow a consistent rule for `var` and `final` on local variables (either `final` for non-reassigned and `var` for reassigned, or `var` for all locals).
|
|
113
|
+
- **AVOID** storing what you can calculate (e.g., don't store `area` if you have `radius`).
|
|
114
|
+
|
|
115
|
+
### 3.7. Members
|
|
116
|
+
|
|
117
|
+
- **DON'T** wrap a field in a getter and setter unnecessarily.
|
|
118
|
+
- **PREFER** using a `final` field to make a read-only property.
|
|
119
|
+
- **CONSIDER** using `=>` for simple members (getters, setters, single-expression methods).
|
|
120
|
+
- **DON'T** use `this.` except to redirect to a named constructor or to avoid shadowing.
|
|
121
|
+
- **DO** initialize fields at their declaration when possible.
|
|
122
|
+
|
|
123
|
+
### 3.8. Constructors
|
|
124
|
+
|
|
125
|
+
- **DO** use initializing formals (`this.field`) when possible.
|
|
126
|
+
- **DON'T** use `late` when a constructor initializer list will do.
|
|
127
|
+
- **DO** use `;` instead of `{}` for empty constructor bodies.
|
|
128
|
+
- **DON'T** use `new`.
|
|
129
|
+
- **DON'T** use `const` redundantly in constant contexts.
|
|
130
|
+
|
|
131
|
+
### 3.9. Error Handling
|
|
132
|
+
|
|
133
|
+
- **AVOID** `catch` clauses without `on` clauses.
|
|
134
|
+
- **DON'T** discard errors from `catch` clauses without `on` clauses.
|
|
135
|
+
- **DO** throw objects that implement `Error` only for programmatic errors.
|
|
136
|
+
- **DON'T** explicitly catch `Error` or types that implement it.
|
|
137
|
+
- **DO** use `rethrow` to rethrow a caught exception to preserve the original stack trace.
|
|
138
|
+
|
|
139
|
+
### 3.10. Asynchrony
|
|
140
|
+
|
|
141
|
+
- **PREFER** `async`/`await` over using raw `Future`s.
|
|
142
|
+
- **DON'T** use `async` when it has no useful effect.
|
|
143
|
+
- **CONSIDER** using higher-order methods to transform a stream.
|
|
144
|
+
- **AVOID** using `Completer` directly.
|
|
145
|
+
|
|
146
|
+
## 4. API Design
|
|
147
|
+
|
|
148
|
+
### 4.1. Names
|
|
149
|
+
|
|
150
|
+
- **DO** use terms consistently.
|
|
151
|
+
- **AVOID** abbreviations unless more common than the unabbreviated term.
|
|
152
|
+
- **PREFER** putting the most descriptive noun last (e.g., `pageCount`).
|
|
153
|
+
- **CONSIDER** making the code read like a sentence when using the API.
|
|
154
|
+
- **PREFER** a noun phrase for a non-boolean property or variable.
|
|
155
|
+
- **PREFER** a non-imperative verb phrase for a boolean property or variable (e.g., `isEnabled`, `canClose`).
|
|
156
|
+
- **CONSIDER** omitting the verb for a named boolean parameter (e.g., `growable: true`).
|
|
157
|
+
- **PREFER** the "positive" name for a boolean property or variable (e.g., `isConnected` over `isDisconnected`).
|
|
158
|
+
- **PREFER** an imperative verb phrase for a function or method whose main purpose is a side effect (e.g., `list.add()`, `window.refresh()`).
|
|
159
|
+
- **PREFER** a noun phrase or non-imperative verb phrase for a function or method if returning a value is its primary purpose (e.g., `list.elementAt(3)`).
|
|
160
|
+
- **CONSIDER** an imperative verb phrase for a function or method if you want to draw attention to the work it performs (e.g., `database.downloadData()`).
|
|
161
|
+
- **AVOID** starting a method name with `get`.
|
|
162
|
+
- **PREFER** naming a method `to___()` if it copies the object's state to a new object (e.g., `toList()`).
|
|
163
|
+
- **PREFER** naming a method `as___()` if it returns a different representation backed by the original object (e.g., `asMap()`).
|
|
164
|
+
- **AVOID** describing the parameters in the function's or method's name.
|
|
165
|
+
- **DO** follow existing mnemonic conventions when naming type parameters (e.g., `E` for elements, `K`, `V` for map keys/values, `T`, `S`, `U` for general types).
|
|
166
|
+
|
|
167
|
+
### 4.2. Libraries
|
|
168
|
+
|
|
169
|
+
- **PREFER** making declarations private (`_`).
|
|
170
|
+
- **CONSIDER** declaring multiple classes in the same library if they logically belong together.
|
|
171
|
+
|
|
172
|
+
### 4.3. Classes and Mixins
|
|
173
|
+
|
|
174
|
+
- **AVOID** defining a one-member abstract class when a simple function (`typedef`) will do.
|
|
175
|
+
- **AVOID** defining a class that contains only static members; prefer top-level functions/variables or a library.
|
|
176
|
+
- **AVOID** extending a class that isn't intended to be subclassed.
|
|
177
|
+
- **DO** use class modifiers (e.g., `final`, `interface`, `sealed`) to control if your class can be extended.
|
|
178
|
+
- **AVOID** implementing a class that isn't intended to be an interface.
|
|
179
|
+
- **DO** use class modifiers to control if your class can be an interface.
|
|
180
|
+
- **PREFER** defining a pure mixin or pure class to a `mixin class`.
|
|
181
|
+
|
|
182
|
+
### 4.4. Constructors
|
|
183
|
+
|
|
184
|
+
- **CONSIDER** making your constructor `const` if the class supports it (all fields are `final` and initialized in the constructor).
|
|
185
|
+
|
|
186
|
+
### 4.5. Members
|
|
187
|
+
|
|
188
|
+
- **PREFER** making fields and top-level variables `final`.
|
|
189
|
+
- **DO** use getters for operations that conceptually access properties (no arguments, returns a result, no user-visible side effects, idempotent).
|
|
190
|
+
- **DO** use setters for operations that conceptually change properties (single argument, no result, changes state, idempotent).
|
|
191
|
+
- **DON'T** define a setter without a corresponding getter.
|
|
192
|
+
- **AVOID** using runtime type tests to fake overloading.
|
|
193
|
+
- **AVOID** public `late final` fields without initializers.
|
|
194
|
+
- **AVOID** returning nullable `Future`, `Stream`, and collection types; prefer empty containers or non-nullable futures of nullable types.
|
|
195
|
+
- **AVOID** returning `this` from methods just to enable a fluent interface; prefer method cascades.
|
|
196
|
+
|
|
197
|
+
### 4.6. Types
|
|
198
|
+
|
|
199
|
+
- **DO** type annotate variables without initializers.
|
|
200
|
+
- **DO** type annotate fields and top-level variables if the type isn't obvious.
|
|
201
|
+
- **DON'T** redundantly type annotate initialized local variables.
|
|
202
|
+
- **DO** annotate return types on function declarations.
|
|
203
|
+
- **DO** annotate parameter types on function declarations.
|
|
204
|
+
- **DON'T** annotate inferred parameter types on function expressions.
|
|
205
|
+
- **DON'T** type annotate initializing formals.
|
|
206
|
+
- **DO** write type arguments on generic invocations that aren't inferred.
|
|
207
|
+
- **DON'T** write type arguments on generic invocations that are inferred.
|
|
208
|
+
- **AVOID** writing incomplete generic types.
|
|
209
|
+
- **DO** annotate with `dynamic` instead of letting inference fail silently.
|
|
210
|
+
- **PREFER** signatures in function type annotations.
|
|
211
|
+
- **DON'T** specify a return type for a setter.
|
|
212
|
+
- **DON'T** use the legacy `typedef` syntax.
|
|
213
|
+
- **PREFER** inline function types over `typedef`s.
|
|
214
|
+
- **PREFER** using function type syntax for parameters.
|
|
215
|
+
- **AVOID** using `dynamic` unless you want to disable static checking.
|
|
216
|
+
- **DO** use `Future<void>` as the return type of asynchronous members that do not produce values.
|
|
217
|
+
- **AVOID** using `FutureOr<T>` as a return type.
|
|
218
|
+
|
|
219
|
+
### 4.7. Parameters
|
|
220
|
+
|
|
221
|
+
- **AVOID** positional boolean parameters.
|
|
222
|
+
- **AVOID** optional positional parameters if the user may want to omit earlier parameters.
|
|
223
|
+
- **AVOID** mandatory parameters that accept a special "no argument" value.
|
|
224
|
+
- **DO** use inclusive start and exclusive end parameters to accept a range.
|
|
225
|
+
|
|
226
|
+
### 4.8. Equality
|
|
227
|
+
|
|
228
|
+
- **DO** override `hashCode` if you override `==`.
|
|
229
|
+
- **DO** make your `==` operator obey the mathematical rules of equality (reflexive, symmetric, transitive, consistent).
|
|
230
|
+
- **AVOID** defining custom equality for mutable classes.
|
|
231
|
+
- **DON'T** make the parameter to `==` nullable.
|
|
232
|
+
|
|
233
|
+
_Sources:_
|
|
234
|
+
|
|
235
|
+
- [Effective Dart: Style](https://dart.dev/effective-dart/style)
|
|
236
|
+
- [Effective Dart: Documentation](https://dart.dev/effective-dart/documentation)
|
|
237
|
+
- [Effective Dart: Usage](https://dart.dev/effective-dart/usage)
|
|
238
|
+
- [Effective Dart: Design](https://dart.dev/effective-dart/design)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# General Code Style Principles
|
|
2
|
+
|
|
3
|
+
This document outlines general coding principles that apply across all languages and frameworks used in this project.
|
|
4
|
+
|
|
5
|
+
## Readability
|
|
6
|
+
- Code should be easy to read and understand by humans.
|
|
7
|
+
- Avoid overly clever or obscure constructs.
|
|
8
|
+
|
|
9
|
+
## Consistency
|
|
10
|
+
- Follow existing patterns in the codebase.
|
|
11
|
+
- Maintain consistent formatting, naming, and structure.
|
|
12
|
+
|
|
13
|
+
## Simplicity
|
|
14
|
+
- Prefer simple solutions over complex ones.
|
|
15
|
+
- Break down complex problems into smaller, manageable parts.
|
|
16
|
+
|
|
17
|
+
## Maintainability
|
|
18
|
+
- Write code that is easy to modify and extend.
|
|
19
|
+
- Minimize dependencies and coupling.
|
|
20
|
+
|
|
21
|
+
## Documentation
|
|
22
|
+
- Document *why* something is done, not just *what*.
|
|
23
|
+
- Keep documentation up-to-date with code changes.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Effective Go Style Guide Summary
|
|
2
|
+
|
|
3
|
+
This document summarizes key rules and best practices from the official "Effective Go" guide for writing idiomatic Go code.
|
|
4
|
+
|
|
5
|
+
## 1. Formatting
|
|
6
|
+
- **`gofmt`:** All Go code **must** be formatted with `gofmt` (or `go fmt`). This is a non-negotiable, automated standard.
|
|
7
|
+
- **Indentation:** Use tabs for indentation (`gofmt` handles this).
|
|
8
|
+
- **Line Length:** Go has no strict line length limit. Let `gofmt` handle line wrapping.
|
|
9
|
+
|
|
10
|
+
## 2. Naming
|
|
11
|
+
- **`MixedCaps`:** Use `MixedCaps` or `mixedCaps` for multi-word names. Do not use underscores.
|
|
12
|
+
- **Exported vs. Unexported:** Names starting with an uppercase letter are exported (public). Names starting with a lowercase letter are not exported (private).
|
|
13
|
+
- **Package Names:** Short, concise, single-word, lowercase names.
|
|
14
|
+
- **Getters:** Do not name getters with a `Get` prefix. A getter for a field named `owner` should be named `Owner()`.
|
|
15
|
+
- **Interface Names:** One-method interfaces are named by the method name plus an `-er` suffix (e.g., `Reader`, `Writer`).
|
|
16
|
+
|
|
17
|
+
## 3. Control Structures
|
|
18
|
+
- **`if`:** No parentheses around the condition. Braces are mandatory. Can include an initialization statement (e.g., `if err := file.Chmod(0664); err != nil`).
|
|
19
|
+
- **`for`:** Go's only looping construct. Unifies `for` and `while`. Use `for...range` to iterate over slices, maps, strings, and channels.
|
|
20
|
+
- **`switch`:** More general than in C. Cases do not fall through by default (use `fallthrough` explicitly). Can be used without an expression to function as a cleaner `if-else-if` chain.
|
|
21
|
+
|
|
22
|
+
## 4. Functions
|
|
23
|
+
- **Multiple Returns:** Functions can return multiple values. This is the standard way to return a result and an error (e.g., `value, err`).
|
|
24
|
+
- **Named Result Parameters:** Return parameters can be named. This can make code clearer and more concise.
|
|
25
|
+
- **`defer`:** Schedules a function call to be run immediately before the function executing `defer` returns. Use it for cleanup tasks like closing files.
|
|
26
|
+
|
|
27
|
+
## 5. Data
|
|
28
|
+
- **`new` vs. `make`:**
|
|
29
|
+
- `new(T)`: Allocates memory for a new item of type `T`, zeroes it, and returns a pointer (`*T`).
|
|
30
|
+
- `make(T, ...)`: Creates and initializes slices, maps, and channels only. Returns an initialized value of type `T` (not a pointer).
|
|
31
|
+
- **Slices:** The preferred way to work with sequences. They are more flexible than arrays.
|
|
32
|
+
- **Maps:** Use the "comma ok" idiom to check for the existence of a key: `value, ok := myMap[key]`.
|
|
33
|
+
|
|
34
|
+
## 6. Interfaces
|
|
35
|
+
- **Implicit Implementation:** A type implements an interface by implementing its methods. No `implements` keyword is needed.
|
|
36
|
+
- **Small Interfaces:** Prefer many small interfaces over one large one. The standard library is full of single-method interfaces (e.g., `io.Reader`).
|
|
37
|
+
|
|
38
|
+
## 7. Concurrency
|
|
39
|
+
- **Share Memory By Communicating:** This is the core philosophy. Do not communicate by sharing memory; instead, share memory by communicating.
|
|
40
|
+
- **Goroutines:** Lightweight, concurrently executing functions. Start one with the `go` keyword.
|
|
41
|
+
- **Channels:** Typed conduits for communication between goroutines. Use `make` to create them.
|
|
42
|
+
|
|
43
|
+
## 8. Errors
|
|
44
|
+
- **`error` type:** The built-in `error` interface is the standard way to handle errors.
|
|
45
|
+
- **Explicit Error Handling:** Do not discard errors with the blank identifier (`_`). Check for errors explicitly.
|
|
46
|
+
- **`panic`:** Reserved for truly exceptional, unrecoverable situations. Generally, libraries should not panic.
|
|
47
|
+
|
|
48
|
+
*Source: [Effective Go](https://go.dev/doc/effective_go)*
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Google HTML/CSS Style Guide Summary
|
|
2
|
+
|
|
3
|
+
This document summarizes key rules and best practices from the Google HTML/CSS Style Guide.
|
|
4
|
+
|
|
5
|
+
## 1. General Rules
|
|
6
|
+
- **Protocol:** Use HTTPS for all embedded resources.
|
|
7
|
+
- **Indentation:** Indent by 2 spaces. Do not use tabs.
|
|
8
|
+
- **Capitalization:** Use only lowercase for all code (element names, attributes, selectors, properties).
|
|
9
|
+
- **Trailing Whitespace:** Remove all trailing whitespace.
|
|
10
|
+
- **Encoding:** Use UTF-8 (without a BOM). Specify `<meta charset="utf-8">` in HTML.
|
|
11
|
+
|
|
12
|
+
## 2. HTML Style Rules
|
|
13
|
+
- **Document Type:** Use `<!doctype html>`.
|
|
14
|
+
- **HTML Validity:** Use valid HTML.
|
|
15
|
+
- **Semantics:** Use HTML elements according to their intended purpose (e.g., use `<p>` for paragraphs, not for spacing).
|
|
16
|
+
- **Multimedia Fallback:** Provide `alt` text for images and transcripts/captions for audio/video.
|
|
17
|
+
- **Separation of Concerns:** Strictly separate structure (HTML), presentation (CSS), and behavior (JavaScript). Link to CSS and JS from external files.
|
|
18
|
+
- **`type` Attributes:** Omit `type` attributes for stylesheets (`<link>`) and scripts (`<script>`).
|
|
19
|
+
|
|
20
|
+
## 3. HTML Formatting Rules
|
|
21
|
+
- **General:** Use a new line for every block, list, or table element, and indent its children.
|
|
22
|
+
- **Quotation Marks:** Use double quotation marks (`""`) for attribute values.
|
|
23
|
+
|
|
24
|
+
## 4. CSS Style Rules
|
|
25
|
+
- **CSS Validity:** Use valid CSS.
|
|
26
|
+
- **Class Naming:** Use meaningful, generic names. Separate words with a hyphen (`-`).
|
|
27
|
+
- **Good:** `.video-player`, `.site-navigation`
|
|
28
|
+
- **Bad:** `.vid`, `.red-text`
|
|
29
|
+
- **ID Selectors:** Avoid using ID selectors for styling. Prefer class selectors.
|
|
30
|
+
- **Shorthand Properties:** Use shorthand properties where possible (e.g., `padding`, `font`).
|
|
31
|
+
- **`0` and Units:** Omit units for `0` values (e.g., `margin: 0;`).
|
|
32
|
+
- **Leading `0`s:** Always include leading `0`s for decimal values (e.g., `font-size: 0.8em;`).
|
|
33
|
+
- **Hexadecimal Notation:** Use 3-character hex notation where possible (e.g., `#fff`).
|
|
34
|
+
- **`!important`:** Avoid using `!important`.
|
|
35
|
+
|
|
36
|
+
## 5. CSS Formatting Rules
|
|
37
|
+
- **Declaration Order:** Alphabetize declarations within a rule.
|
|
38
|
+
- **Indentation:** Indent all block content.
|
|
39
|
+
- **Semicolons:** Use a semicolon after every declaration.
|
|
40
|
+
- **Spacing:**
|
|
41
|
+
- Use a space after a property name's colon (`font-weight: bold;`).
|
|
42
|
+
- Use a space between the last selector and the opening brace (`.foo {`).
|
|
43
|
+
- Start a new line for each selector and declaration.
|
|
44
|
+
- **Rule Separation:** Separate rules with a new line.
|
|
45
|
+
- **Quotation Marks:** Use single quotes (`''`) for attribute selectors and property values (e.g., `[type='text']`).
|
|
46
|
+
|
|
47
|
+
**BE CONSISTENT.** When editing code, match the existing style.
|
|
48
|
+
|
|
49
|
+
*Source: [Google HTML/CSS Style Guide](https://google.github.io/styleguide/htmlcssguide.html)*
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Google Java Style Guide Summary
|
|
2
|
+
|
|
3
|
+
This document summarizes key rules and best practices from the Google Java Style Guide.
|
|
4
|
+
|
|
5
|
+
## 1. Source File Organization
|
|
6
|
+
- **Filename**: The source file name is the case-sensitive name of the top-level class it contains, plus the `.java` extension.
|
|
7
|
+
- **File Encoding**: UTF-8.
|
|
8
|
+
- **Structure**:
|
|
9
|
+
1. License or copyright information (if any)
|
|
10
|
+
2. Package statement
|
|
11
|
+
3. Import statements
|
|
12
|
+
4. Exactly one top-level class
|
|
13
|
+
|
|
14
|
+
## 2. Formatting
|
|
15
|
+
- **Indentation**: 2 spaces (Google style).
|
|
16
|
+
- **Column limit**: 100 characters.
|
|
17
|
+
- **Braces**: Use Egyptian brackets (opening brace on the same line).
|
|
18
|
+
- **Empty blocks**: Can be concise `{}` if they contain no code.
|
|
19
|
+
|
|
20
|
+
## 3. Naming Conventions
|
|
21
|
+
- **Packages**: `lower.case.with.dots` (e.g., `com.google.common.base`).
|
|
22
|
+
- **Classes**: `UpperCamelCase` (e.g., `HttpRequest`).
|
|
23
|
+
- **Methods**: `lowerCamelCase` (e.g., `sendMessage`).
|
|
24
|
+
- **Variables**: `lowerCamelCase` (e.g., `userId`).
|
|
25
|
+
- **Constants**: `CONSTANT_CASE` (e.g., `MAX_RETRY_COUNT`).
|
|
26
|
+
- **Type Variables**: Single capital letter or `UpperCamelCase` followed by a capital letter (e.g., `T`, `RequestT`).
|
|
27
|
+
|
|
28
|
+
## 4. Programming Practices
|
|
29
|
+
- **Overrides**: Always use the `@Override` annotation.
|
|
30
|
+
- **Exceptions**: Never ignore exceptions. At least log them or explain why they are ignored in a comment.
|
|
31
|
+
- **Static Members**: Access static members via the class name, not an instance (e.g., `MyClass.staticMethod()`).
|
|
32
|
+
- **Finalizers**: Do not use `Object.finalize()`.
|
|
33
|
+
|
|
34
|
+
## 5. Javadoc
|
|
35
|
+
- **Formatting**: Use standard Javadoc format `/** ... */`.
|
|
36
|
+
- **At-clauses**: Use `@param`, `@return`, `@throws`, `@deprecated` in that order.
|
|
37
|
+
- **Summary**: The first sentence of each Javadoc block should be a concise summary.
|
|
38
|
+
|
|
39
|
+
*Source: [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html)*
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Google JavaScript Style Guide Summary
|
|
2
|
+
|
|
3
|
+
This document summarizes key rules and best practices from the Google JavaScript Style Guide.
|
|
4
|
+
|
|
5
|
+
## 1. Source File Basics
|
|
6
|
+
- **File Naming:** All lowercase, with underscores (`_`) or dashes (`-`). Extension must be `.js`.
|
|
7
|
+
- **File Encoding:** UTF-8.
|
|
8
|
+
- **Whitespace:** Use only ASCII horizontal spaces (0x20). Tabs are forbidden for indentation.
|
|
9
|
+
|
|
10
|
+
## 2. Source File Structure
|
|
11
|
+
- New files should be ES modules (`import`/`export`).
|
|
12
|
+
- **Exports:** Use named exports (`export {MyClass};`). **Do not use default exports.**
|
|
13
|
+
- **Imports:** Do not use line-wrapped imports. The `.js` extension in import paths is mandatory.
|
|
14
|
+
|
|
15
|
+
## 3. Formatting
|
|
16
|
+
- **Braces:** Required for all control structures (`if`, `for`, `while`, etc.), even single-line blocks. Use K&R style ("Egyptian brackets").
|
|
17
|
+
- **Indentation:** +2 spaces for each new block.
|
|
18
|
+
- **Semicolons:** Every statement must be terminated with a semicolon.
|
|
19
|
+
- **Column Limit:** 80 characters.
|
|
20
|
+
- **Line-wrapping:** Indent continuation lines at least +4 spaces.
|
|
21
|
+
- **Whitespace:** Use single blank lines between methods. No trailing whitespace.
|
|
22
|
+
|
|
23
|
+
## 4. Language Features
|
|
24
|
+
- **Variable Declarations:** Use `const` by default, `let` if reassignment is needed. **`var` is forbidden.**
|
|
25
|
+
- **Array Literals:** Use trailing commas. Do not use the `Array` constructor.
|
|
26
|
+
- **Object Literals:** Use trailing commas and shorthand properties. Do not use the `Object` constructor.
|
|
27
|
+
- **Classes:** Do not use JavaScript getter/setter properties (`get name()`). Provide ordinary methods instead.
|
|
28
|
+
- **Functions:** Prefer arrow functions for nested functions to preserve `this` context.
|
|
29
|
+
- **String Literals:** Use single quotes (`'`). Use template literals (`` ` ``) for multi-line strings or complex interpolation.
|
|
30
|
+
- **Control Structures:** Prefer `for-of` loops. `for-in` loops should only be used on dict-style objects.
|
|
31
|
+
- **`this`:** Only use `this` in class constructors, methods, or in arrow functions defined within them.
|
|
32
|
+
- **Equality Checks:** Always use identity operators (`===` / `!==`).
|
|
33
|
+
|
|
34
|
+
## 5. Disallowed Features
|
|
35
|
+
- `with` keyword.
|
|
36
|
+
- `eval()` or `Function(...string)`.
|
|
37
|
+
- Automatic Semicolon Insertion.
|
|
38
|
+
- Modifying builtin objects (`Array.prototype.foo = ...`).
|
|
39
|
+
|
|
40
|
+
## 6. Naming
|
|
41
|
+
- **Classes:** `UpperCamelCase`.
|
|
42
|
+
- **Methods & Functions:** `lowerCamelCase`.
|
|
43
|
+
- **Constants:** `CONSTANT_CASE` (all uppercase with underscores).
|
|
44
|
+
- **Non-constant Fields & Variables:** `lowerCamelCase`.
|
|
45
|
+
|
|
46
|
+
## 7. JSDoc
|
|
47
|
+
- JSDoc is used on all classes, fields, and methods.
|
|
48
|
+
- Use `@param`, `@return`, `@override`, `@deprecated`.
|
|
49
|
+
- Type annotations are enclosed in braces (e.g., `/** @param {string} userName */`).
|
|
50
|
+
|
|
51
|
+
*Source: [Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html)*
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Julia Style Guide Summary
|
|
2
|
+
|
|
3
|
+
This document summarizes key rules and best practices for Julia development, based on the official Julia Style Guide and common community patterns.
|
|
4
|
+
|
|
5
|
+
## 1. Naming Conventions
|
|
6
|
+
- **Variables**: `snake_case` (e.g., `user_id`).
|
|
7
|
+
- **Functions**: `snake_case` (e.g., `calculate_sum`).
|
|
8
|
+
- **Types (Modules, Types)**: `PascalCase` (e.g., `MemoryManager`).
|
|
9
|
+
- **Files**: `snake_case.jl` (e.g., `data_processing.jl`).
|
|
10
|
+
- **Mutating Functions**: Functions that modify their arguments should end with an exclamation mark (e.g., `sort!`).
|
|
11
|
+
|
|
12
|
+
## 2. Formatting
|
|
13
|
+
- **Indentation**: 4 spaces.
|
|
14
|
+
- **Line Length**: 92 characters limit is often recommended.
|
|
15
|
+
- **Braces**: Opening brace on the same line.
|
|
16
|
+
|
|
17
|
+
## 3. Idiomatic Julia
|
|
18
|
+
- **Type Annotations**: Avoid over-specifying types in function signatures unless needed for multiple dispatch.
|
|
19
|
+
- **Global Variables**: Avoid global variables where possible. Use `const` if globals are necessary.
|
|
20
|
+
- **Performance**: Use type-stable functions and avoid type-unstable constructs (like `Any` in performance-critical sections).
|
|
21
|
+
- **Arrays**: Indexing is 1-based. Use `eachindex(A)` for efficient iteration.
|
|
22
|
+
|
|
23
|
+
## 4. Documentation
|
|
24
|
+
- Use `""" ... """` for docstrings before function/type definitions.
|
|
25
|
+
- Document arguments, return values, and include examples.
|
|
26
|
+
|
|
27
|
+
*Source: [Official Julia Documentation - Style Guide](https://docs.julialang.org/en/v1/manual/style-guide/)*
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Kotlin Style Guide Summary
|
|
2
|
+
|
|
3
|
+
This document summarizes key rules and best practices for Kotlin development, based on the official Kotlin coding conventions and Google's Android Kotlin style guide.
|
|
4
|
+
|
|
5
|
+
## 1. Source File Organization
|
|
6
|
+
- **Encoding**: UTF-8.
|
|
7
|
+
- **Indentation**: 4 spaces.
|
|
8
|
+
- **Structure**:
|
|
9
|
+
1. Package header
|
|
10
|
+
2. Imports
|
|
11
|
+
3. Top-level declarations (classes, functions, etc.)
|
|
12
|
+
|
|
13
|
+
## 2. Naming Conventions
|
|
14
|
+
- **Classes/Interfaces**: `UpperCamelCase`.
|
|
15
|
+
- **Functions/Properties**: `lowerCamelCase`.
|
|
16
|
+
- **Constants**: `SCREAMING_SNAKE_CASE` (only for `const val`).
|
|
17
|
+
- **Packages**: `lower.case.without.underscores`.
|
|
18
|
+
|
|
19
|
+
## 3. Formatting
|
|
20
|
+
- Use 100 character line limit.
|
|
21
|
+
- Prefer expression bodies for simple one-line functions (e.g., `fun foo() = bar()`).
|
|
22
|
+
- Omit the unit return type explicitly (e.g., `fun foo(): Unit` \u2192 `fun foo()`).
|
|
23
|
+
|
|
24
|
+
## 4. Idiomatic Kotlin
|
|
25
|
+
- **Immutability**: Prefer `val` over `var` whenever possible.
|
|
26
|
+
- **Null Safety**:
|
|
27
|
+
- Use `?.` and `?:` (Elvis operator) instead of explicit null checks.
|
|
28
|
+
- Avoid `!!` (non-null assertion) unless absolutely certain.
|
|
29
|
+
- **Data Classes**: Use `data class` for simple data-holding classes.
|
|
30
|
+
- **Scope Functions**: Use `let`, `run`, `apply`, `also`, and `with` where they improve readability.
|
|
31
|
+
- **String Templates**: Prefer `"$foo"` over concatenation.
|
|
32
|
+
|
|
33
|
+
## 5. Collections
|
|
34
|
+
- Prefer read-only collection interfaces (`List`, `Map`, `Set`) over mutable ones.
|
|
35
|
+
- Use collection transformation methods (`map`, `filter`, etc.) instead of manual loops.
|
|
36
|
+
|
|
37
|
+
## 6. Documentation (KDoc)
|
|
38
|
+
- Use `/** ... */` for documentation comments.
|
|
39
|
+
- Use `[` and `]` to reference symbols within doc comments.
|
|
40
|
+
|
|
41
|
+
*Source: [Official Kotlin Coding Conventions](https://kotlinlang.org/docs/coding-conventions.html)*
|