texqc 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/texqc +21 -9
- data/texqc.gemspec +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bba664e2497edde7f5912a4f80dd869b298d4616a067485fd80c3e3dc1543f7a
|
4
|
+
data.tar.gz: 055ed18cb80ce020f457a5b247c202587f4aeab8873d4ffa8add96cede28e95e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 033e059bbe03bc3708b85d0c395304e21de151615d7c7087fb6eec384acdd63a025a9153aa227b6b9381f8ca70a8f477c502a73a6ea82d0d203c72bed2308daf
|
7
|
+
data.tar.gz: 07bac99e8f51d069614c3931a5981aa278a1bb666beba5fb2669114560938da6a76a9561af25d8335d5ed5235300db0d84d86ce0795b7f471e7fb6556d0c8b26
|
data/bin/texqc
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
|
-
VERSION = '0.
|
24
|
+
VERSION = '0.3.0'
|
25
25
|
|
26
26
|
STDOUT.sync = true
|
27
27
|
|
@@ -30,6 +30,19 @@ require 'loog'
|
|
30
30
|
require 'open3'
|
31
31
|
require 'slop'
|
32
32
|
|
33
|
+
# Errors counter.
|
34
|
+
class Errors
|
35
|
+
attr_reader :count
|
36
|
+
def initialize
|
37
|
+
@count = 0
|
38
|
+
end
|
39
|
+
|
40
|
+
def report(pos, txt)
|
41
|
+
puts "[#{pos}] #{txt}"
|
42
|
+
@count += 1
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
33
46
|
begin
|
34
47
|
log = Loog::REGULAR
|
35
48
|
begin
|
@@ -54,16 +67,15 @@ Options are:"
|
|
54
67
|
end
|
55
68
|
raise 'Try --help' if opts.arguments.empty?
|
56
69
|
raise 'Too many arguments' unless opts.arguments.length == 1
|
57
|
-
errors = 0
|
58
70
|
f = "#{opts.arguments[0]}.log"
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
71
|
+
e = Errors.new
|
72
|
+
File.readlines(f).each_with_index do |t, i|
|
73
|
+
e.report(i, t) if t.start_with?('Underfull ', 'Overfull ', 'LaTeX Warning: ')
|
74
|
+
e.report(i, t) if /^Class [a-zA-Z0-9\*]+ Warning: /.match?(t)
|
75
|
+
e.report(i, t) if /^Package [a-zA-Z0-9\*]+ Warning: /.match?(t)
|
64
76
|
end
|
65
|
-
unless
|
66
|
-
log.info("#{
|
77
|
+
unless e.count.zero?
|
78
|
+
log.info("#{e.count} LaTeX processing errors found in #{f.inspect}")
|
67
79
|
exit 1
|
68
80
|
end
|
69
81
|
log.info("No LaTeX processing errors found in #{f.inspect}")
|
data/texqc.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.rubygems_version = '2.2'
|
33
33
|
s.required_ruby_version = '>= 2.3'
|
34
34
|
s.name = 'texqc'
|
35
|
-
s.version = '0.
|
35
|
+
s.version = '0.3.0'
|
36
36
|
s.license = 'MIT'
|
37
37
|
s.summary = 'Quality Control of Your LaTeX Build'
|
38
38
|
s.description = 'Run it after you compile your LaTeX document'
|
@@ -49,7 +49,7 @@ Gem::Specification.new do |s|
|
|
49
49
|
s.add_runtime_dependency 'slop', '~> 4.6'
|
50
50
|
s.add_development_dependency 'codecov', '0.1.10'
|
51
51
|
s.add_development_dependency 'cucumber', '~> 1.3.17'
|
52
|
-
s.add_development_dependency 'rake', '12.
|
52
|
+
s.add_development_dependency 'rake', '12.3.3'
|
53
53
|
s.add_development_dependency 'rubocop', '0.61.0'
|
54
54
|
s.add_development_dependency 'rubocop-rspec', '1.31.0'
|
55
55
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: texqc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 12.
|
89
|
+
version: 12.3.3
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 12.
|
96
|
+
version: 12.3.3
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rubocop
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|