Files
OpenGrep runs on files with the following extensions:- C/C++:
.c,.cpp,.cc,.cxx,.c++,.h,.hpp,.hh,.hxx,.h++ - C#:
.cs - Go:
.go - Java:
.java - JavaScript/TypeScript:
.js,.jsx,.ts,.tsx - Kotlin:
.kt - Python:
.py - Ruby:
.rb - Rust:
.rs - PHP:
.php - Scala:
.scala - Swift:
.swift - Terraform:
.tf - JSON:
.json
Configuration
OpenGrep is Semgrep-compatible. CodeRabbit looks for a config file in this order:opengrep.ymlopengrep.yamlopengrep.config.ymlopengrep.config.yamlsemgrep.ymlsemgrep.yamlsemgrep.config.ymlsemgrep.config.yaml
When we skip OpenGrep
CodeRabbit skips OpenGrep when:- OpenGrep is disabled in your CodeRabbit configuration.
- No files in the pull request match the supported extensions.
- OpenGrep is already running in GitHub workflows.
- No OpenGrep or Semgrep config file is found.
Links
- OpenGrep GitHub
- Semgrep rule syntax (OpenGrep is compatible)