Skip to content
Draft
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: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ Python:
- python/**/*
- change-notes/**/*python*

PHP:
- php/**/*
- change-notes/**/*php*

Ruby:
- ruby/**/*
- change-notes/**/*ruby*
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: "PHP"

on:
pull_request:
paths:
- "php/**"
- "misc/bazel/**"
- "misc/codegen/**"
- "shared/**"
- "*.bazel*"
- "MODULE.bazel"
- .github/workflows/php.yml
- .github/actions/**
- codeql-workspace.yml
- "!**/*.md"
- "!**/*.qhelp"
branches:
- main
- rc/*
- codeql-cli-*

permissions:
contents: read

env:
CARGO_TERM_COLOR: always

defaults:
run:
shell: bash

jobs:
extractor:
runs-on: ubuntu-latest
defaults:
run:
working-directory: php/extractor
steps:
- uses: actions/checkout@v5
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.88"
components: clippy,rustfmt
- name: Format
run: cargo fmt --check
- name: Compilation
run: cargo check
- name: Clippy
run: cargo clippy --no-deps -- -D warnings

qltest:
if: github.repository_owner == 'github'
runs-on: ubuntu-latest
defaults:
run:
working-directory: php
steps:
- uses: actions/checkout@v5
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.88"
components: clippy,rustfmt
- uses: ./.github/actions/fetch-codeql
- name: Build extractor pack
run: scripts/create-extractor-pack.sh
- name: Cache compilation cache
id: query-cache
uses: ./.github/actions/cache-query-compilation
with:
key: php-qltest
- name: Run QL tests
run: |
codeql test run --threads=0 --ram 50000 --search-path "${{ github.workspace }}" --check-databases --check-diff-informed --check-undefined-labels --check-unused-labels --check-repeated-labels --check-redefined-labels --check-use-before-definition --consistency-queries ql/consistency-queries ql/test --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
env:
GITHUB_TOKEN: ${{ github.token }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
# Avoid committing cached package components
.codeql

# Local CodeQL CLI distributions (VS Code / local dev)
.codeql-cli/

# Compiled class file
*.class

Expand Down
27 changes: 27 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
resolver = "2"
members = [
"shared/tree-sitter-extractor",
"php/extractor",
"ruby/extractor",
"rust/extractor",
"rust/extractor/macros",
"rust/ast-generator",
"rust/autobuild",
]

1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ use_repo(
"vendor_ts__tree-sitter-0.25.9",
"vendor_ts__tree-sitter-embedded-template-0.25.0",
"vendor_ts__tree-sitter-json-0.24.8",
"vendor_ts__tree-sitter-php-0.23.11",
"vendor_ts__tree-sitter-ql-0.23.1",
"vendor_ts__tree-sitter-ruby-0.23.1",
"vendor_ts__triomphe-0.1.14",
Expand Down
12 changes: 12 additions & 0 deletions misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading