Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .agents/skills/fix-semgrep-grammar/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extension grammar and its tests.**

## Inputs

- **`<lang>`** — the `test-lang` argument (e.g. `javascript`, `solidity`). The
- **`<lang>`** — the `test-lang` argument (e.g. `typescript`, `solidity`). The
sublanguage set it builds is hardcoded in the `sublangs=` block of
`lang/test-lang` — read it there; usually it's just the lang itself. Steps
1, 3, and 5 act on whichever directories it builds.
Expand Down Expand Up @@ -263,7 +263,7 @@ auto-merge.
## Running by hand

From the repo, give the agent the language and this skill, e.g.
`Use fix-semgrep-grammar to make test-lang javascript pass.` — optionally with
`Use fix-semgrep-grammar to make test-lang typescript pass.` — optionally with
a tighter cap, e.g. `... pass, with max-iterations 5.` Under the Claude Agent
SDK (e.g. a Python GitHub Action), keep the hard limits (`max_turns`, budget,
an outer `timeout`) at the harness level — `max-iterations` bounds only the fix
Expand Down
1 change: 0 additions & 1 deletion doc/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ ocaml-tree-sitter-semgrep](https://github.com/returntocorp/ocaml-tree-sitter-sem
* [hcl](https://github.com/returntocorp/semgrep-hcl)
* [html](https://github.com/returntocorp/semgrep-html)
* [java](https://github.com/returntocorp/semgrep-java)
* [javascript](https://github.com/returntocorp/semgrep-javascript)
* [jsonnet](https://github.com/returntocorp/semgrep-jsonnet)
* [julia](https://github.com/returntocorp/semgrep-julia)
* [kotlin](https://github.com/returntocorp/semgrep-kotlin)
Expand Down
2 changes: 0 additions & 2 deletions lang/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ SUPPORTED_TS_LANGUAGES = \
hcl \
html \
java \
javascript \
jsonnet \
julia \
kotlin \
Expand Down Expand Up @@ -91,7 +90,6 @@ SUPPORTED_DIALECTS = \
html \
java \
julia \
javascript \
jsonnet \
julia \
kotlin \
Expand Down
2 changes: 1 addition & 1 deletion lang/semgrep-grammars/lang/javascript
1 change: 0 additions & 1 deletion lang/semgrep-grammars/src/semgrep-javascript/Makefile

This file was deleted.

1 change: 0 additions & 1 deletion lang/semgrep-grammars/src/semgrep-javascript/prep

This file was deleted.

This file was deleted.

11 changes: 11 additions & 0 deletions lang/semgrep-grammars/src/semgrep-typescript/prep
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ echo `pwd`

# Put all the C files in the same folder to facilitate packaging
# for ocaml/dune.
mkdir -p javascript/src
ln -sf ../../common/scanner.h javascript/src
cat ../tree-sitter-javascript/src/scanner.c \
| sed -e 's:"../../common/scanner.h":"scanner.h":' \
> javascript/src/scanner.c

mkdir -p typescript/src
ln -sf ../../common/scanner.h typescript/src
cat ../tree-sitter-typescript/typescript/src/scanner.c \
Expand All @@ -20,6 +26,11 @@ cat ../tree-sitter-typescript/tsx/src/scanner.c \
| sed -e 's:"../../common/scanner.h":"scanner.h":' \
> tsx/src/scanner.c

mkdir -p javascript/corpus
rm -f javascript/corpus/inherited
ln -sf ../../../tree-sitter-javascript/test/corpus \
javascript/corpus/inherited

mkdir -p typescript/corpus
rm -f typescript/corpus/inherited
ln -sf ../../../tree-sitter-typescript/typescript/corpus \
Expand Down
2 changes: 1 addition & 1 deletion lang/test-lang
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ sublangs="$lang"
# It could be handled in a generic fashion by declaring the list of
# dialects for each tree-sitter-X project.
if [[ "$lang" = typescript ]]; then
sublangs="typescript tsx"
sublangs="javascript typescript tsx"
elif [[ "$lang" = php ]]; then
sublangs="php php-only"
elif [[ "$lang" = sfapex ]]; then
Expand Down