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: .github/copilot-instructions.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,21 +9,21 @@ Most of our development takes place in the `internal` directory, and most behavi
9
9
10
10
Most development on the codebase is in Go.
11
11
Standard Go commands and practices apply, but we primarily use a tool called `hereby` to build, run tests, and other tasks.
12
-
Run `npx hereby --list` to see all available commands.
12
+
Run `npx hereby --tasks` to see all available commands.
13
13
14
14
```sh
15
-
npx hereby build # Build the project
15
+
npx hereby build # Build the tsgo binary (not required for tests)
16
16
npx hereby test# Run tests
17
17
npx hereby format # Format the code
18
18
npx hereby lint # Run linters
19
19
20
20
# To run a specific compiler test:
21
-
go test -run='TestSubmodule/<test name>' ./internal/testrunner # For submodule tests in _submodules/TypeScript
22
-
go test -run='TestLocal/<test name>' ./internal/testrunner # For local tests in testdata/tests/cases
21
+
go test -run='TestSubmodule/<test name>' ./internal/testrunner # For pre-existing "submodule" tests in _submodules/TypeScript
22
+
go test -run='TestLocal/<test name>' ./internal/testrunner # For new "local" tests created in testdata/tests/cases
23
23
```
24
24
25
-
Always make sure code is formatted, linted, and tested before sending a pull request.
26
-
25
+
Always make sure code is formatted, linted, and tested before sending a pull request.
26
+
27
27
## Compiler Features, Fixes, and Tests
28
28
29
29
When fixing a bug or implementing a new feature, at least one minimal test case should always be added in advance to verify the fix.
@@ -56,10 +56,10 @@ export interface Person {
56
56
function greet(person) {
57
57
console.log(`Hello, ${person.name}!`);
58
58
}
59
-
```
60
-
61
-
**New compiler tests should always enable strict mode (`@strict: true`) unless the bug specifically involves non-strict mode behavior.**
62
-
59
+
```
60
+
61
+
**New compiler tests should always enable strict mode (`@strict: true`) unless the bug specifically involves non-strict mode behavior.**
62
+
63
63
Tests don't always need the above `@option`s specified, but they are common to specify or modify.
64
64
Tests can be run with multiple settings for a given option by using a comma-separated list (e.g. `@option: settingA,settingB`).
65
65
`@filename` is only required when a test has multiple files, or when writing a test for a single JavaScript file (where `allowJs` or `checkJs` is enabled).
0 commit comments