Skip to content

Commit b509c47

Browse files
committed
fix: Parse JSON files for errors
1 parent d5a713e commit b509c47

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ task :parse do
44
require "json"
55
require "batch"
66

7-
Batch.each(Dir["**/*.json"]) do |file|
7+
Dir["**/*.json"].each do |file|
88
JSON.parse(File.read(file))
99
end
1010
end

makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
MD_FILES:=$(shell find commands -name '*.md')
2+
JSON_FILES:=$(shell find commands -name '*.json')
23
TEXT_FILES:=$(patsubst %.md,tmp/%.txt,$(MD_FILES))
34
SPELL_FILES:=$(patsubst %.txt,%.spell,$(TEXT_FILES))
45

6+
default: parse spell
7+
8+
parse: $(JSON_FILES)
9+
rake parse
10+
511
spell: tmp/commands tmp/topics $(SPELL_FILES)
612
find tmp -name '*.spell' | xargs cat > tmp/spelling-errors
713
cat tmp/spelling-errors
@@ -30,4 +36,4 @@ tmp/dict: wordlist tmp/commands.txt
3036
clean:
3137
rm -rf tmp/*
3238

33-
.PHONY: clean
39+
.PHONY: parse spell clean

0 commit comments

Comments
 (0)