File tree Expand file tree Collapse file tree 3 files changed +42
-1
lines changed Expand file tree Collapse file tree 3 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Release Go Binaries
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ build :
10+ name : Build and Release Go Binaries
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v3
16+
17+ - name : Set up Go
18+ uses : actions/setup-go@v4
19+ with :
20+ go-version : 1.23
21+
22+ - name : Build Go Binary
23+ run : |
24+ mkdir -p dist
25+ GOOS=linux GOARCH=amd64 go build -o json-dup-keys-linux-amd64
26+
27+ - name : Release
28+ uses : softprops/action-gh-release@v2
29+ with :
30+ files : |
31+ json-dup-keys-linux-amd64
Original file line number Diff line number Diff line change 22
33CLI tool to detect duplicate keys in JSON files. Uses tree-sitter to parse JSON as text and checks that in AST trees.
44Doesn't attempt to deserialize the whole JSON into some structure in memory, so it's reasonably fast for larger files.
5+
6+ ## Installation
7+
8+ There's a pre-built binary for linux amd64 in the releases section, but the preferred way is to install it with Go.
9+
10+ If you have Go on you machine, you can install the tool with the following command:
11+
12+ ``` sh
13+ go install github.com/andriusm/json-dup-keys@latest
14+ ```
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ func main() {
3838 os .Exit (1 )
3939 }
4040
41- fmt .Println ("No duplicate keys detected. " )
41+ fmt .Println ("No duplicate keys detected! " )
4242}
4343
4444func findDuplicateKeys (node * tree_sitter.Node , content []byte ) []string {
You can’t perform that action at this time.
0 commit comments