https://github.com/comby-tools/cactuscon-2019
https://github.com/comby-tools/cactuscon-2019
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/comby-tools/cactuscon-2019
- Owner: comby-tools
- Created: 2019-12-06T18:08:50.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-17T00:08:20.000Z (almost 6 years ago)
- Last Synced: 2025-01-19T18:14:58.917Z (9 months ago)
- Size: 6.02 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cactuscon-2019
### Slides
The [slides](https://github.com/comby-tools/cactuscon-2019/blob/master/slides.pdf) are in this repository.
### Running the examples
- [Install comby](https://github.com/comby-tools/comby#install-pre-built-binaries)
- The match `with-highlights` utility is work in progress and not available yet :) You can run all the examples and get plain text output with the commands below
- In general, run the commands at the root directory of the directory or repository that you want to search
- Tack on `-stats` to get a summary of matches and number of files searched
- See more command line options with `-h` and usage at [comby.dev](https://comby.dev)**Example `libssh2`**
- git clone [libssh2-f1cfa55](https://github.com/rvantonder/libssh2-f1cfa55), which is `libssh2` pinned to the commit that contains matches for the example pattern
- cd `libssh2-f1cfa55`
- Then run:```
comby 'alloc_workqueue(:[args]);' '' .c -match-only -stats
```**Example `Linux Kernel`**
- git clone the linux kernel, or any repository you want to search over
- `cd` into the root directory, then run these commandsPart 1
```
comby 'alloc_workqueue(:[args]); :[[word]]' '' -rule 'where :[[word]] != "if"' .c -match-only
```Part 2
```
comby 'alloc_workqueue(:[args]); :[[word]]' '' -rule 'where :[[word]] != "if", :[[word]] != "BUG_ON"' .c -match-only
```**Example `Kubernetes`**
- `git clone https://github.com/kubernetes/kubernetes`
- `cd kubernetes````
comby ':[[v]], err := strconv.ParseInt(:[1], :[2], 64) :[rest]' '' -rule 'where match :[rest] { | "int32(:[arg])" -> :[arg] == :[[v]] }' .c -match-only
```