linty 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bin/linty +15 -0
- data/lib/linty/analyzer.rb +22 -0
- data/lib/linty/data/common_misspellings.txt +4268 -0
- data/lib/linty/jshint_analyzer.rb +43 -0
- data/lib/linty/offense.rb +14 -0
- data/lib/linty/rubocop_analyzer.rb +41 -0
- data/lib/linty/spelling_analyzer.rb +52 -0
- data/lib/linty.rb +14 -0
- metadata +154 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c89c3ee77a1e97fbc4308b5d826cbdede2a7951d
|
4
|
+
data.tar.gz: eea3f61e1b0f28a34807efc48002cae6d81b4351
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 206444993bb2759c21960c619947a76dc01e0d7567839085af5493577a54016152612b99a796508baf2d4edfef2047fad63a6fc54e5ff3a0179fc823afffd100
|
7
|
+
data.tar.gz: 21d679ebe340dadceb831b22803054f2e66cf27ce32bd1944385796e9f8538e157ca498679bb400a06a56dc73b172cd13ee6051dcd09644e1c28146fabb26ad0
|
data/bin/linty
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
class Linty
|
2
|
+
class Analyzer
|
3
|
+
def initialize
|
4
|
+
@analyzers = analyzers
|
5
|
+
end
|
6
|
+
|
7
|
+
def analyze(path)
|
8
|
+
@analyzers.each do |analyzer|
|
9
|
+
analyzer.analyze(path) do |offense|
|
10
|
+
yield offense
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def analyzers
|
16
|
+
analyzers = []
|
17
|
+
analyzers.push(SpellingAnalyzer.new)
|
18
|
+
analyzers.push(RubocopAnalyzer.new)
|
19
|
+
analyzers.push(JshintAnalyzer.new)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|