You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,26 @@
1
1
# AGENTS.md
2
2
3
-
## Documentation Structure
3
+
## Documentation structure
4
4
5
5
- Main documentation is in `/packages/app-web-docs/src/docs/user/README.md`
6
6
- Spoken forms are defined in `/cursorless-talon/src/spoken_forms.json`
7
7
- Contributing documentation is in `/packages/app-web-docs/src/docs/contributing/`
8
8
9
-
## Project Organization
9
+
## Project organization
10
10
11
11
- Main extension code is in `/packages/app-vscode/`
12
12
- Engine code is in `/packages/lib-engine/`
13
13
- Tests are in `resources/fixtures/recorded` and `resources/fixtures/scopes`
14
14
- Language-specific parsing is defined in the `resources/queries/*.scm` files
15
15
16
-
## Build and Test
16
+
## Build and test
17
17
18
18
- Always run lint when making changes:
19
19
-`pnpm run lint`
20
20
- Tests can be run with:
21
21
-`pnpm test`
22
22
23
-
## Documentation Conventions
23
+
## Documentation conventions
24
24
25
25
When documenting actions or modifiers:
26
26
@@ -30,7 +30,7 @@ When documenting actions or modifiers:
30
30
- For versatile actions like `drink`, `pour`, `drop`, `float`, and `puff`, explain their behavior with different scope types
31
31
- Always document special behaviors with different scope types
32
32
33
-
## Implementation Notes
33
+
## Implementation notes
34
34
35
35
- Many actions (`drop`, `float`, `puff`) work with both line and non-line targets
36
36
- Always check test fixtures in `/resources/fixtures/recorded` to understand behavior
@@ -41,7 +41,7 @@ When documenting actions or modifiers:
41
41
42
42
When writing or updating `.scope` files please follow the guidelines in [scope-test-format.md](./packages/app-web-docs/src/docs/contributing/scope-test-format.md)
43
43
44
-
## Pull Request Guidelines
44
+
## Pull Request guidelines
45
45
46
46
- Any feedback should be addressed in code or replied to
Copy file name to clipboardExpand all lines: packages/app-web-docs/src/docs/contributing/scope-test-format.md
+81-20Lines changed: 81 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,13 +85,13 @@ For ease of readability we want all scope test to follow the recommended style g
85
85
### Naming convention and values
86
86
87
87
- For classes, functions and variables we use the classic: `foo`, `bar`, `baz`, `bongo`. Language specific formatting still applies. eg `Foo` for a class in Java, `IFoo` for an interface in C# etc.
88
-
- For arguments and parameters we usually use: `aaa`, `bbb`, `ccc` and so on.
89
-
- For data type we usually use `int` or `number`.
90
-
- For value we usually use `0`, `1`, `2` and so on.
88
+
- For arguments and parameters we use: `aaa`, `bbb`, `ccc` and so on.
89
+
- For data type we use `int` or `number`.
90
+
- For value we use `0`, `1`, `2` and so on.
91
91
92
92
Examples:
93
93
94
-
```
94
+
```java
95
95
classFoo {}
96
96
int foo =0;
97
97
foo(aaa, bbb);
@@ -101,35 +101,96 @@ foo(aaa, bbb);
101
101
102
102
Don't add more lines than the example actually needs. For example if the test is about the class name, the facet `name.class`: there is no point having a lot of code in the class body or having it span multiple lines. Keep the code single line and with an empty body if possible.
103
103
104
-
```
105
-
>---<
106
-
0| class Foo {}
104
+
```ts
105
+
classFoo {}
107
106
```
108
107
109
108
There are exceptions to this rule:
110
109
111
110
1. Sometimes we actually need a body, but that doesn't mean that we need it to be multiple lines. The facet `interior.class` can look like this:
112
111
113
-
```
114
-
>-<
115
-
0| class Foo { }
112
+
```py
113
+
class Foo { }
116
114
```
117
115
118
116
2. When testing a facet inside a code block. eg a method in a class or a field in a interface multiple lines are prefered.
119
117
120
-
```
121
-
0| class Foo {
122
-
>--------<
123
-
1| bar() {}
124
-
2| }
118
+
```ts
119
+
classFoo {
120
+
bar() {}
121
+
}
125
122
```
126
123
127
124
3. If you're doing a `*.iteration.document` test we want to include a leading and trailing new line. eg:
128
125
126
+
```java
127
+
128
+
int foo;
129
+
129
130
```
130
-
>
131
-
0|
132
-
1| int foo;
133
-
2|
134
-
<
131
+
132
+
## Examples of good fixtures
133
+
134
+
These are examples of scope facets and appropriate source code.
0 commit comments