texqc 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/README.md +3 -0
- data/bin/texqc +15 -5
- data/features/cli.feature +1 -1
- data/texqc.gemspec +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11c959ccc1a42d66bc7d3d3daa09ca54a8ebdf98facb6354d57238398238d63a
|
4
|
+
data.tar.gz: b1fa00eb6c705501b0f9b5cd3663c91f8b52b1c5393c87076f715777808fd498
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d92293bb5536644213817b1d003feb3d13de5a2eb784a17dfde450cb3940cbf0d81683344c99767ae012b3dbd909dc0397cf9ef00c822b442d149e066118f790
|
7
|
+
data.tar.gz: 6e6492a16bc3c31293a64e830d8ad8f637378c192b2ccd76971f3fff60dc32cf65883cd42c8e046105db5b74287710947616cb20f3736e3425d12e80aeaf413c
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -29,6 +29,9 @@ $ latexmk -pdf article
|
|
29
29
|
$ texqc article
|
30
30
|
```
|
31
31
|
|
32
|
+
If any warnings were reported by LaTeX, you will get a short list of them
|
33
|
+
and the exit code will be non-zero (very convenient for your CI/CD scripts).
|
34
|
+
|
32
35
|
## How to contribute
|
33
36
|
|
34
37
|
Read [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
|
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.3.
|
24
|
+
VERSION = '0.3.1'
|
25
25
|
|
26
26
|
STDOUT.sync = true
|
27
27
|
|
@@ -67,12 +67,22 @@ Options are:"
|
|
67
67
|
end
|
68
68
|
raise 'Try --help' if opts.arguments.empty?
|
69
69
|
raise 'Too many arguments' unless opts.arguments.length == 1
|
70
|
-
|
70
|
+
doc = opts.arguments[0]
|
71
|
+
if doc.end_with?('.tex')
|
72
|
+
log.info("File extention removed from #{doc.inspect}")
|
73
|
+
doc = doc.gsub(/\.tex$/, '')
|
74
|
+
end
|
75
|
+
f = "#{doc}.log"
|
71
76
|
e = Errors.new
|
72
77
|
File.readlines(f).each_with_index do |t, i|
|
73
|
-
|
74
|
-
|
75
|
-
|
78
|
+
[
|
79
|
+
/^Underfull /,
|
80
|
+
/^Overfull /,
|
81
|
+
/^LaTeX Warning: /,
|
82
|
+
/^Class [a-zA-Z0-9\*]+ Warning: /,
|
83
|
+
/^Package [a-zA-Z0-9\*]+ Warning: /,
|
84
|
+
/^LaTeX Font Warning: /
|
85
|
+
].each { |p| e.report(i, t) if p.match?(t) }
|
76
86
|
end
|
77
87
|
unless e.count.zero?
|
78
88
|
log.info("#{e.count} LaTeX processing errors found in #{f.inspect}")
|
data/features/cli.feature
CHANGED
@@ -41,6 +41,6 @@ Feature: Command Line Processing
|
|
41
41
|
\end{document}
|
42
42
|
"""
|
43
43
|
When I run bash with "pdflatex article.tex"
|
44
|
-
Then I run bin/texqc with "article"
|
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"
|
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.3.
|
35
|
+
s.version = '0.3.1'
|
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'
|
@@ -47,7 +47,7 @@ Gem::Specification.new do |s|
|
|
47
47
|
s.add_runtime_dependency 'backtrace', '~> 0.3'
|
48
48
|
s.add_runtime_dependency 'loog', '~> 0.2'
|
49
49
|
s.add_runtime_dependency 'slop', '~> 4.6'
|
50
|
-
s.add_development_dependency 'codecov', '0.
|
50
|
+
s.add_development_dependency 'codecov', '0.2.6'
|
51
51
|
s.add_development_dependency 'cucumber', '~> 1.3.17'
|
52
52
|
s.add_development_dependency 'rake', '12.3.3'
|
53
53
|
s.add_development_dependency 'rubocop', '0.61.0'
|
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.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.2.6
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.2.6
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: cucumber
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|