Skip to content

Update CONTRIBUTING.md #456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jonshea
Copy link
Contributor

@jonshea jonshea commented Mar 4, 2025

Some commands previous described in CONTRIBUTING.md have been removed, and some of the tree-sitter documentation links are broken. This PR updates CONTRIBUTING.md to fix these issues.


Once you've added your test case you'll want to then make the required changes
to `grammar.js`, regenerate and recompile the parser, and run the tests:

```sh
npm run build
tree-sitter generate
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the command to use now? I see it is used in CI (https://github.com/tree-sitter/tree-sitter-scala/blob/master/.github/workflows/sync.yml#L27), but I’m not sure if anything else also needs to be called?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the main testing CI script is https://github.com/tree-sitter/parser-test-action/blob/master/action.yml, and looks like it should be

tree-sitter generate
tree-sitter test

I think.

CONTRIBUTING.md Outdated
[here](https://tree-sitter.github.io/tree-sitter/syntax-highlighting#unit-testing). These test will be automatically ran with `npm run test`.
type of testing
[here](https://tree-sitter.github.io/tree-sitter/3-syntax-highlighting.html#unit-testing).
These test will be run automatically with `npm run test`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still true? I only see node --test bindings/node/*_test.js in (package.json)[https://github.com/tree-sitter/tree-sitter-scala/blob/master/package.json#L50C14-L50C49]. CI seems like it has different actions for parser and binding tests.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is also tree-sitter test.

Some commands previous described in `CONTRIBUTING.md` have been removed,
and some of the tree-sitter documentation links are broken. This PR updates
`CONTRIBUTING.md` to fix these issues.
@jonshea jonshea force-pushed the jonshea/update-contributing-docs branch from 2872105 to 6b8b5f9 Compare March 4, 2025 17:38
@eed3si9n eed3si9n merged commit ed939ed into tree-sitter:master Mar 6, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants