• Stars
    star
    160
  • Rank 234,703 (Top 5 %)
  • Language
    Go
  • License
    MIT License
  • Created over 10 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Finds copy/pastes in a git diff

cccv

cccv finds what parts of a diff were copy/pasted from elsewhere in the project.

Why? Because copy/pasted code is impossible to spot at code review time.

Installation

Use Docker image:

% git diff | docker run --rm -i artemave/cccv

Or, compile cccv binary (needs Docker):

% git clone https://github.com/artemave/cccv.git && cd cccv
% make

Or, if you have Golang installed:

% go get github.com/artemave/cccv

Usage

% git checkout pr1
% git diff master | cccv

For fine tuning, drop .cccv.yml into the root of your project. Example:

exclude-lines:
  - "require\\(['\"].+['\"]\\);$" # will exclude `var x = require('y');`
                                  # this regexp gets parsed by YAML first, hence extra escaping for \ and "
  - console.log

exclude-files:
  - "README.*" # regexp, NOT a glob

min-hunk-size: 3 # mininum number of consecutive duplicate
                 # lines to consider relevant; default 2

min-line-length: 15 # minimum line length (bar leading/trailing tabs and spaces)
                    # to be considered relevant; default 10

Limitations

Relies on default git diff output format.

More Repositories

1

translate_onhover

Google Chrome translation extension
JavaScript
194
star
2

StarLogs

JavaScript
172
star
3

workspace-diagnostics.nvim

Populate diagnostics for _all_ projects files, not just opened ones.
Lua
122
star
4

thesmallestrailsapp.dev

Ruby
100
star
5

tmux_super_fingers

A Tmux plugin to open file links from the terminal in vim
Python
81
star
6

REST-assured

Real stubs and spies for HTTP(S) services
Ruby
38
star
7

slowdown.vim

Slows down vim
Vim Script
36
star
8

tmux_capture_last_command_output

Capture the output of the last terminal command and open it an editor in a separate tmux window.
Shell
20
star
9

node-test-runners-performance-comparison

Node test runners performance comparison
JavaScript
12
star
10

gemstash-docker

Run gemstash server in a docker container
10
star
11

pinboard-sync

Manage your Pinboard bookmarks with native browser bookmark tools.
JavaScript
8
star
12

vjs

Missing javascript refactoring tools for nvim
Vim Script
7
star
13

37-pieces-of-flair

The badges of github
Ruby
6
star
14

meshell

Dead simple shell commands from Node
TypeScript
6
star
15

liquid-proxy

http proxy with api for modifying requests passing through
Ruby
4
star
16

dotfiles

.bashrc, .vimrc, etc.
Shell
4
star
17

github-plus-one

Google Chrome extension for upvoting github issues and pull requests.
PogoScript
4
star
18

ts-swc-es-loader

JavaScript
3
star
19

oompa-loompa

Ruby
3
star
20

coderat

Generate code changes in your local code by talking to AI
JavaScript
3
star
21

vagrant-forge-sandbox

Common vagrant provisioning for forge sandbox hidden in a gem
Ruby
3
star
22

merjis

JavaScript
2
star
23

rails-testing-post

Ruby
2
star
24

music-stash

Ruby
2
star
25

assert-raisins

Minimalistic, debugger friendly test runner for Node
JavaScript
2
star
26

weatherdiff

JavaScript
2
star
27

js-editor-tags

Generate tags file for javascript codebase using static code analyses.
JavaScript
2
star
28

REST-assured-example

Sample app that demonstrates REST-assured
JavaScript
2
star
29

dungeon

Ruby
2
star
30

vigun

Unclutter your test diet
Vim Script
2
star
31

spec-index.vim

Read and navigate your rspec/mocha/etc. tests in a quickfix window.
Vim Script
2
star
32

social-to-arse

Chrome extension that replaces text "social" with "arse"
JavaScript
2
star
33

monty_hall_paradox

Ruby
1
star
34

lj-friends-feed

Ruby
1
star
35

conways-go

Conway's battle of Life
Go
1
star
36

food4feed

generate rss from html pages
JavaScript
1
star
37

paul-tracker

Ruby
1
star
38

artemave.github.com

my tech blog
CSS
1
star
39

chess-pad

Ruby
1
star
40

jog

LiveJournal mobile client (core)
CoffeeScript
1
star
41

jog_droid

Java
1
star
42

til

things I learn
Ruby
1
star
43

mtgrand

Ruby
1
star
44

headshift_test

1
star
45

i3_auto_floating

Remember floating state of i3wm windows and automatically set it when a new window of the same app is created.
Python
1
star
46

myws

configures my workstation using puppet
Ruby
1
star