texqc 0.4.0 → 0.5.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 +17 -11
- data/features/cli.feature +12 -0
- data/texqc.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19e114b82eed83d7dc3e0b0320418c89dbc0fbaf557b9886867837264c49939e
|
4
|
+
data.tar.gz: d815e0852ed6fdf217935cdc8a3340bffec993430b51064b5af1f0ef6f56080c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb0a5f84ecdc58c058ce1ba513cea2e30a9b3deadf42a342b254002f2ea911174f2b853ff05fa0a7ccfeb7ba9a62b193fbe79d51f7763311d378c273d211a914
|
7
|
+
data.tar.gz: 33e1ffc295e36868d42a345ac1522ffd5aa7fb5ea45caad133afb189fb0627bc4a222dabaadeb0376348df9c8ffa507b1cc15086de9bc53ace22e36bb2631eb6
|
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.5.0'
|
25
25
|
|
26
26
|
STDOUT.sync = true
|
27
27
|
|
@@ -49,7 +49,8 @@ begin
|
|
49
49
|
opts = Slop.parse(ARGV, strict: true, help: true) do |o|
|
50
50
|
o.banner = "Usage (#{VERSION}): texqc [options] file
|
51
51
|
Options are:"
|
52
|
-
o.
|
52
|
+
o.bool '--dry', 'Don\'t fail the build on errors'
|
53
|
+
o.array '--ignore', 'Ignore given regexp'
|
53
54
|
o.bool '--version', 'Print current version' do
|
54
55
|
puts VERSION
|
55
56
|
exit
|
@@ -74,16 +75,21 @@ Options are:"
|
|
74
75
|
end
|
75
76
|
f = "#{doc}.log"
|
76
77
|
e = Errors.new
|
78
|
+
matches = [
|
79
|
+
/^Underfull /,
|
80
|
+
/^Overfull /,
|
81
|
+
/^LaTeX Warning: /,
|
82
|
+
/^pdfTeX warning: /,
|
83
|
+
/^Class [a-zA-Z0-9\*]+ Warning: /,
|
84
|
+
/^Package [a-zA-Z0-9\*]+ Warning: /,
|
85
|
+
/^LaTeX Font Warning: /
|
86
|
+
]
|
77
87
|
File.readlines(f).each_with_index do |t, i|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
/^Class [a-zA-Z0-9\*]+ Warning: /,
|
84
|
-
/^Package [a-zA-Z0-9\*]+ Warning: /,
|
85
|
-
/^LaTeX Font Warning: /
|
86
|
-
].each { |p| e.report(i, t) if p.match?(t) }
|
88
|
+
matches.each do |p|
|
89
|
+
next unless p.match?(t)
|
90
|
+
next if opts[:ignore].any? { |re| /.*#{re}.*/.match?(t) }
|
91
|
+
e.report(i, t)
|
92
|
+
end
|
87
93
|
end
|
88
94
|
unless e.count.zero?
|
89
95
|
log.info("#{e.count} LaTeX processing errors found in #{f.inspect}")
|
data/features/cli.feature
CHANGED
@@ -44,3 +44,15 @@ Feature: Command Line Processing
|
|
44
44
|
Then I run bin/texqc with "article.tex"
|
45
45
|
Then Exit code is not zero
|
46
46
|
And Stdout contains "1 LaTeX processing errors"
|
47
|
+
|
48
|
+
Scenario: Bad LaTeX log output checked with LaTeX warning, but ignored
|
49
|
+
Given I have a "article.tex" file with content:
|
50
|
+
"""
|
51
|
+
\documentclass{article}
|
52
|
+
\begin{document}
|
53
|
+
test\label{xxx}test\label{xxx}
|
54
|
+
\end{document}
|
55
|
+
"""
|
56
|
+
When I run bash with "pdflatex article.tex"
|
57
|
+
Then I run bin/texqc with "--ignore 'may have changed' article.tex"
|
58
|
+
Then Exit code is zero
|
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.5.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'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: texqc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|