Syntax-aware Go code search, based on the mvdan/gogrep

Overview

gogrep

logo

WIP: this is an attempt to move modified gogrep from the go-ruleguard project, so it can be used outside of the ruleguard as a library.

Acknowledgements

The original gogrep is written by the Daniel Martí.

Issues
  • improve variadic funcs matching rules

    improve variadic funcs matching rules

    Introduced a new matcher op: maybeVariadicCallExpr. Unlike CallExpr, it doesn't unconditionally accept both variadic and non-variadic calls. Instead, it only accepts variadic calls if there are more than N arguments.

    Take this pattern for example:

    f($_, $_, $_, $*_)
    

    Variadic call will be accepted only if there are more than 3 arguments passed to f.

    f(a, b, c, 4)     // ok
    f(a, b, c, xs...) // ok
    f(a, b, xs...)    // NOT ok
    

    Fixes #28

    opened by quasilyte 0
  • Make it possible to use heatmap levels in the -format string

    Make it possible to use heatmap levels in the -format string

    This will make it possible to format the output in a way that it can be processed by the other tool.

    For example, that other script can sort the results using the scores.

    We could do sorting in gogrep itself, but it looks like a relatively big feature that can be implemented outside (because there is more than 1 way to sort the output).

    opened by quasilyte 0
Owner
Iskander (Alex) Sharipov
Iskander (Alex) Sharipov
Transpiling C code to Go code

A tool for transpiling C code to Go code. Milestones of the project: Transpiling project GNU GSL. Transpiling project GTK+. Notes: Transpiler works on

Konstantin 316 Jun 20, 2022
Transpiling fortran code to golang code

f4go Example of use > # Install golang > # Compile f4go > go get -u github.com/Konstantin8105/f4go > cd $GOPATH/src/github.com/Konstantin8105/f4go > g

Konstantin 33 May 23, 2022
A compiler from Go to JavaScript for running Go code in a browser

GopherJS - A compiler from Go to JavaScript GopherJS compiles Go code (golang.org) to pure JavaScript code. Its main purpose is to give you the opport

GopherJS 11.2k Jun 21, 2022
Grumpy is a Python to Go source code transcompiler and runtime.

Grumpy: Go running Python Overview Grumpy is a Python to Go source code transcompiler and runtime that is intended to be a near drop-in replacement fo

Google 10.5k Jun 28, 2022
Transform Go code into it's AST

Welcome to go2ast ?? Transform Go code into it's AST Usage echo "a := 1" | go run main.go Example output []ast.Stmt { &ast.AssignStmt {

Eli Yukelzon 97 Jun 15, 2022
Compile Go regular expressions to Go code

regexp2go regexp2go is an alternate backend for the regexp package that allows to perform ahead-of-time compilation of regular expressions to Go code.

Carlo Alberto Ferraris 84 Jun 24, 2022
Go compiler for small places. Microcontrollers, WebAssembly, and command-line tools. Based on LLVM.

TinyGo - Go compiler for small places TinyGo is a Go compiler intended for use in small places such as microcontrollers, WebAssembly (Wasm), and comma

TinyGo 11k Jun 27, 2022
wagon, a WebAssembly-based Go interpreter, for Go.

wagon wagon is a WebAssembly-based interpreter in Go, for Go. As of 2020/05/11 Wagon is in read-only mode, and looking for a maintainer. You may want

Go Interpreter 901 May 30, 2022
Syntax-aware grep for PHP code.

phpgrep Syntax-aware grep for PHP code. This repository is used for the library and command-line tool development. A good source for additional utilit

Iskander (Alex) Sharipov 210 May 15, 2022
Go-based search engine URL collector , support Google, Bing, can be based on Google syntax batch collection URL

Go-based search engine URL collector , support Google, Bing, can be based on Google syntax batch collection URL

Re 50 Jun 20, 2022
Search for Go code using syntax trees

gogrep GO111MODULE=on go get mvdan.cc/gogrep Search for Go code using syntax trees. Work in progress. gogrep -x 'if $x != nil { return $x, $*_ }' In

Daniel Martí 470 Jun 15, 2022
Search for HCL(v2) using syntax tree

hclgrep Search for HCL(v2) using syntax tree. The idea is heavily inspired by ht

magodo 65 Jun 14, 2022
gpool - a generic context-aware resizable goroutines pool to bound concurrency based on semaphore.

gpool - a generic context-aware resizable goroutines pool to bound concurrency. Installation $ go get github.com/sherifabdlnaby/gpool import "github.c

Sherif Abdel-Naby 84 Feb 21, 2022
A fast data generator that's multi-table aware and supports multi-row DML.

If you need to generate a lot of random data for your database tables but don't want to spend hours configuring a custom tool for the job, then datage

Coding Concepts 48 Apr 29, 2022
xlog is a logger for net/context aware HTTP applications

⚠️ Check zerolog, the successor of xlog. HTTP Handler Logger xlog is a logger for net/context aware HTTP applications. Unlike most loggers, xlog will

Olivier Poitrey 135 Nov 22, 2021
xmux is a httprouter fork on top of xhandler (net/context aware)

Xmux Xmux is a lightweight high performance HTTP request muxer on top xhandler. Xmux gets its speed from the fork of the amazing httprouter. Route par

Olivier Poitrey 95 Jun 28, 2022
Pomerium is an identity-aware access proxy.

Pomerium is an identity-aware proxy that enables secure access to internal applications. Pomerium provides a standardized interface to add access cont

null 3.1k Jun 25, 2022
A collection of (ANSI-sequence aware) text reflow operations & algorithms

reflow A collection of ANSI-aware methods and io.Writers helping you to transform blocks of text. This means you can still style your terminal output

Christian Muehlhaeuser 351 Jun 25, 2022
depaware makes you aware of your Go dependencies

depaware depaware makes you aware of your Go dependencies. It generates a list of your dependencies which you check in to your repo: https://github.co

Tailscale 397 Jun 14, 2022
Content aware image resize library

Caire is a content aware image resize library based on Seam Carving for Content-Aware Image Resizing paper. How does it work An energy map (edge detec

Endre Simo 9.9k Jun 23, 2022
self-aware Golang profile dumper[beta]

holmes WARNING : holmes is under heavy development now, so API will make breaking change during dev. If you want to use it in production, please wait

MOSN 692 Jun 20, 2022
Graphik is a Backend as a Service implemented as an identity-aware document & graph database with support for gRPC and graphQL

Graphik is a Backend as a Service implemented as an identity-aware, permissioned, persistant document/graph database & pubsub server written in Go.

null 302 Jun 17, 2022
Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.

Consul Website: https://www.consul.io Tutorials: HashiCorp Learn Forum: Discuss Consul is a distributed, highly available, and data center aware solut

HashiCorp 24.9k Jun 22, 2022
A lockout aware password sprayer for golang

Crimson-Spray Crimson-Spray is a lockout aware password sprayer for active direc

iLightThings 11 Apr 11, 2022
Cost-aware network traffic analysis

Traffic Refinery Overview Traffic Refinery is a cost-aware network traffic analysis library implemented in Go For a project overview, installation inf

null 3 Apr 22, 2022
The backend for @yomo/presencejs ⚡️ made realtime web applications edge-aware by YoMo

yomo-presence-backend The backend for @yomo/presencejs ?? Dev on local 0. Prerequisites Install Go 1. Install YoMo CLI $ go install github.com/yomorun

YoMo 2 Jun 25, 2022
Go package for syntax highlighting of code

syntaxhighlight Package syntaxhighlight provides syntax highlighting for code. It currently uses a language-independent lexer and performs decently on

Sourcegraph 251 Jun 17, 2022
Go package for syntax highlighting of code

syntaxhighlight Package syntaxhighlight provides syntax highlighting for code. It currently uses a language-independent lexer and performs decently on

Sourcegraph 251 Jun 17, 2022
Assembly syntax that makes you feel like you're writing code in a high-level language.

shasm Assembly syntax that makes you feel like you're writing code in a high-level language. Shasm is not an Assembler. Shasm simply compiles Shasm sy

Shoyaaa 14 Jun 5, 2021