texqc 0.8.0 → 0.9.0
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 +4 -4
- data/Gemfile +9 -20
- data/Gemfile.lock +152 -0
- data/LICENSE.txt +1 -1
- data/LICENSES/MIT.txt +21 -0
- data/README.md +16 -25
- data/REUSE.toml +35 -0
- data/Rakefile +6 -31
- data/bin/texqc +49 -61
- data/cucumber.yml +3 -0
- data/features/cli.feature +41 -42
- data/features/gem_package.feature +2 -0
- data/features/step_definitions/steps.rb +7 -26
- data/features/support/env.rb +17 -19
- data/logo.svg +1 -1
- data/texqc.gemspec +15 -37
- metadata +33 -58
- data/.0pdd.yml +0 -9
- data/.gitattributes +0 -7
- data/.gitignore +0 -8
- data/.pdd +0 -7
- data/.rubocop.yml +0 -18
- data/.rultor.yml +0 -25
- data/.simplecov +0 -38
- data/.travis.yml +0 -21
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3944f91024dca106c319ca8df2668572bec305757d37e24271019ba9aa2fc5f7
|
|
4
|
+
data.tar.gz: 726d1002190bfc6a51ead506ed1fc56e326f565568dac50ebb28b4789e937b38
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6bc7527c93937d7552634aaca518fe386704a1ebdb59736b9458b9fc290ba3bfae6efe5a9841bc75b154fc43fca10fa840b41e24f819077883bc2ca0eebf4179
|
|
7
|
+
data.tar.gz: b233f3908532ad80532b6c8bc5b69aad1771f5c8c78c2f17e2cc4626febb76501e8e097b50d2aec70ccc34a3a2cd1b130e791fdbe9a3c7ef5e77b1153de0feef
|
data/Gemfile
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2020-
|
|
4
|
-
#
|
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
# furnished to do so, subject to the following conditions:
|
|
11
|
-
#
|
|
12
|
-
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
# copies or substantial portions of the Software.
|
|
14
|
-
#
|
|
15
|
-
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
# SOFTWARE.
|
|
3
|
+
# SPDX-FileCopyrightText: Copyright (c) 2020-2026 Yegor Bugayenko
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
22
5
|
|
|
23
6
|
source 'https://rubygems.org'
|
|
24
|
-
ruby '~>2.3'
|
|
25
7
|
gemspec
|
|
8
|
+
|
|
9
|
+
gem 'rubocop-elegant', '~> 0.1', require: false
|
|
10
|
+
gem 'rubocop-minitest', '~> 0.39', require: false
|
|
11
|
+
gem 'rubocop-performance', '~> 1.26', require: false
|
|
12
|
+
gem 'rubocop-rake', '~> 0.7', require: false
|
|
13
|
+
gem 'simplecov', '~> 0.22', require: false
|
|
14
|
+
gem 'simplecov-cobertura', '~> 3.0', require: false
|
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
texqc (0.0.0)
|
|
5
|
+
backtrace (~> 0.4)
|
|
6
|
+
loog (~> 0.8)
|
|
7
|
+
slop (~> 4.10)
|
|
8
|
+
|
|
9
|
+
GEM
|
|
10
|
+
remote: https://rubygems.org/
|
|
11
|
+
specs:
|
|
12
|
+
ast (2.4.3)
|
|
13
|
+
backtrace (0.4.1)
|
|
14
|
+
base64 (0.3.0)
|
|
15
|
+
bigdecimal (4.1.2)
|
|
16
|
+
builder (3.3.0)
|
|
17
|
+
cucumber (11.0.0)
|
|
18
|
+
base64 (~> 0.2)
|
|
19
|
+
builder (~> 3.2)
|
|
20
|
+
cucumber-ci-environment (> 9, < 12)
|
|
21
|
+
cucumber-core (>= 16.2.0, < 17)
|
|
22
|
+
cucumber-cucumber-expressions (> 17, < 20)
|
|
23
|
+
cucumber-html-formatter (> 21, < 24)
|
|
24
|
+
diff-lcs (~> 1.5)
|
|
25
|
+
logger (~> 1.6)
|
|
26
|
+
mini_mime (~> 1.1)
|
|
27
|
+
multi_test (~> 1.1)
|
|
28
|
+
sys-uname (~> 1.5)
|
|
29
|
+
cucumber-ci-environment (11.0.0)
|
|
30
|
+
cucumber-core (16.2.0)
|
|
31
|
+
cucumber-gherkin (> 36, < 40)
|
|
32
|
+
cucumber-messages (> 31, < 33)
|
|
33
|
+
cucumber-tag-expressions (> 6, < 9)
|
|
34
|
+
cucumber-cucumber-expressions (19.0.0)
|
|
35
|
+
bigdecimal
|
|
36
|
+
cucumber-gherkin (39.0.0)
|
|
37
|
+
cucumber-messages (>= 31, < 33)
|
|
38
|
+
cucumber-html-formatter (23.1.0)
|
|
39
|
+
cucumber-messages (> 23, < 33)
|
|
40
|
+
cucumber-messages (32.3.1)
|
|
41
|
+
cucumber-tag-expressions (8.1.0)
|
|
42
|
+
diff-lcs (1.6.2)
|
|
43
|
+
docile (1.4.1)
|
|
44
|
+
ellipsized (0.3.0)
|
|
45
|
+
ffi (1.17.4)
|
|
46
|
+
ffi (1.17.4-aarch64-linux-gnu)
|
|
47
|
+
ffi (1.17.4-aarch64-linux-musl)
|
|
48
|
+
ffi (1.17.4-arm-linux-gnu)
|
|
49
|
+
ffi (1.17.4-arm-linux-musl)
|
|
50
|
+
ffi (1.17.4-arm64-darwin)
|
|
51
|
+
ffi (1.17.4-x86-linux-gnu)
|
|
52
|
+
ffi (1.17.4-x86-linux-musl)
|
|
53
|
+
ffi (1.17.4-x86_64-darwin)
|
|
54
|
+
ffi (1.17.4-x86_64-linux-gnu)
|
|
55
|
+
ffi (1.17.4-x86_64-linux-musl)
|
|
56
|
+
json (2.19.5)
|
|
57
|
+
language_server-protocol (3.17.0.5)
|
|
58
|
+
lint_roller (1.1.0)
|
|
59
|
+
logger (1.7.0)
|
|
60
|
+
loog (0.8.0)
|
|
61
|
+
ellipsized
|
|
62
|
+
logger (~> 1.0)
|
|
63
|
+
memoist3 (1.0.0)
|
|
64
|
+
mini_mime (1.1.5)
|
|
65
|
+
multi_test (1.1.0)
|
|
66
|
+
parallel (2.1.0)
|
|
67
|
+
parser (3.3.11.1)
|
|
68
|
+
ast (~> 2.4.1)
|
|
69
|
+
racc
|
|
70
|
+
prism (1.9.0)
|
|
71
|
+
racc (1.8.1)
|
|
72
|
+
rainbow (3.1.1)
|
|
73
|
+
rake (13.4.2)
|
|
74
|
+
regexp_parser (2.12.0)
|
|
75
|
+
rexml (3.4.4)
|
|
76
|
+
rubocop (1.86.1)
|
|
77
|
+
json (~> 2.3)
|
|
78
|
+
language_server-protocol (~> 3.17.0.2)
|
|
79
|
+
lint_roller (~> 1.1.0)
|
|
80
|
+
parallel (>= 1.10)
|
|
81
|
+
parser (>= 3.3.0.2)
|
|
82
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
83
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
84
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
85
|
+
ruby-progressbar (~> 1.7)
|
|
86
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
87
|
+
rubocop-ast (1.49.1)
|
|
88
|
+
parser (>= 3.3.7.2)
|
|
89
|
+
prism (~> 1.7)
|
|
90
|
+
rubocop-elegant (0.1.0)
|
|
91
|
+
lint_roller (~> 1.1)
|
|
92
|
+
rubocop (~> 1.75)
|
|
93
|
+
rubocop-minitest (0.39.1)
|
|
94
|
+
lint_roller (~> 1.1)
|
|
95
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
96
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
|
97
|
+
rubocop-performance (1.26.1)
|
|
98
|
+
lint_roller (~> 1.1)
|
|
99
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
100
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
101
|
+
rubocop-rake (0.7.1)
|
|
102
|
+
lint_roller (~> 1.1)
|
|
103
|
+
rubocop (>= 1.72.1)
|
|
104
|
+
rubocop-rspec (3.9.0)
|
|
105
|
+
lint_roller (~> 1.1)
|
|
106
|
+
rubocop (~> 1.81)
|
|
107
|
+
ruby-progressbar (1.13.0)
|
|
108
|
+
simplecov (0.22.0)
|
|
109
|
+
docile (~> 1.1)
|
|
110
|
+
simplecov-html (~> 0.11)
|
|
111
|
+
simplecov_json_formatter (~> 0.1)
|
|
112
|
+
simplecov-cobertura (3.1.0)
|
|
113
|
+
rexml
|
|
114
|
+
simplecov (~> 0.19)
|
|
115
|
+
simplecov-html (0.13.2)
|
|
116
|
+
simplecov_json_formatter (0.1.4)
|
|
117
|
+
slop (4.10.1)
|
|
118
|
+
sys-uname (1.5.1)
|
|
119
|
+
ffi (~> 1.1)
|
|
120
|
+
memoist3 (~> 1.0.0)
|
|
121
|
+
unicode-display_width (3.2.0)
|
|
122
|
+
unicode-emoji (~> 4.1)
|
|
123
|
+
unicode-emoji (4.2.0)
|
|
124
|
+
|
|
125
|
+
PLATFORMS
|
|
126
|
+
aarch64-linux-gnu
|
|
127
|
+
aarch64-linux-musl
|
|
128
|
+
arm-linux-gnu
|
|
129
|
+
arm-linux-musl
|
|
130
|
+
arm64-darwin
|
|
131
|
+
ruby
|
|
132
|
+
x86-linux-gnu
|
|
133
|
+
x86-linux-musl
|
|
134
|
+
x86_64-darwin
|
|
135
|
+
x86_64-linux-gnu
|
|
136
|
+
x86_64-linux-musl
|
|
137
|
+
|
|
138
|
+
DEPENDENCIES
|
|
139
|
+
cucumber (~> 11.0)
|
|
140
|
+
rake (~> 13.4)
|
|
141
|
+
rubocop (~> 1.86)
|
|
142
|
+
rubocop-elegant (~> 0.1)
|
|
143
|
+
rubocop-minitest (~> 0.39)
|
|
144
|
+
rubocop-performance (~> 1.26)
|
|
145
|
+
rubocop-rake (~> 0.7)
|
|
146
|
+
rubocop-rspec (~> 3.9)
|
|
147
|
+
simplecov (~> 0.22)
|
|
148
|
+
simplecov-cobertura (~> 3.0)
|
|
149
|
+
texqc!
|
|
150
|
+
|
|
151
|
+
BUNDLED WITH
|
|
152
|
+
2.6.8
|
data/LICENSE.txt
CHANGED
data/LICENSES/MIT.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-2026 Yegor Bugayenko
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
|
@@ -1,52 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
# texqc
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://www.0crat.com/p/C3RFVLU72)
|
|
5
|
-
[](http://www.rultor.com/p/yegor256/texqc)
|
|
6
|
-
[](https://www.jetbrains.com/ruby/)
|
|
3
|
+

|
|
7
4
|
|
|
8
|
-
[](http://badge.fury.io/rb/texqc)
|
|
11
|
-
[](https://codeclimate.com/github/yegor256/texqc/maintainability)
|
|
12
|
-
|
|
13
|
-
[](https://github.com/yegor256/takes/texqc/master/LICENSE.txt)
|
|
14
|
-
[](https://codecov.io/github/yegor256/texqc?branch=master)
|
|
15
|
-
[](https://hitsofcode.com/view/github/yegor256/texqc)
|
|
5
|
+
[](https://badge.fury.io/rb/texqc)
|
|
6
|
+
[](https://github.com/yegor256/texqc/blob/master/LICENSE.txt)
|
|
16
7
|
|
|
17
8
|
This tool helps you make sure your LaTeX document compiles without issues.
|
|
18
9
|
|
|
19
10
|
First, you install it:
|
|
20
11
|
|
|
21
12
|
```bash
|
|
22
|
-
|
|
13
|
+
gem install texqc
|
|
23
14
|
```
|
|
24
15
|
|
|
25
16
|
Then, you just run it after the LaTeX document is compiled:
|
|
26
17
|
|
|
27
18
|
```bash
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
latexmk -pdf article
|
|
20
|
+
texqc article
|
|
30
21
|
```
|
|
31
22
|
|
|
32
23
|
If any warnings were reported by LaTeX, you will get a short list of them
|
|
33
24
|
and the exit code will be non-zero (very convenient for your CI/CD scripts).
|
|
34
25
|
|
|
35
26
|
To make configuration easier, you can create `.texqc` file next to your
|
|
36
|
-
`.tex` file and place all your command line configuration options over
|
|
37
|
-
each one on its own line. You can also have a global configuration
|
|
38
|
-
at `~/.texqc`, which will be read first.
|
|
27
|
+
`.tex` file and place all your command line configuration options over
|
|
28
|
+
there, each one on its own line. You can also have a global configuration
|
|
29
|
+
file at `~/.texqc`, which will be read first.
|
|
39
30
|
|
|
40
31
|
## How to contribute
|
|
41
32
|
|
|
42
33
|
Read [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
|
|
43
|
-
Make sure your build is green before you contribute
|
|
44
|
-
|
|
45
|
-
[Bundler](https://bundler.io/) installed. Then:
|
|
34
|
+
Make sure your build is green before you contribute your pull request.
|
|
35
|
+
You will need to have [Ruby](https://www.ruby-lang.org/en/) 2.3+
|
|
36
|
+
and [Bundler](https://bundler.io/) installed. Then:
|
|
46
37
|
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
|
|
38
|
+
```bash
|
|
39
|
+
bundle update
|
|
40
|
+
bundle exec rake
|
|
50
41
|
```
|
|
51
42
|
|
|
52
43
|
If it's clean and you don't see any error messages, submit your pull request.
|
data/REUSE.toml
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2025 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
version = 1
|
|
5
|
+
[[annotations]]
|
|
6
|
+
path = [
|
|
7
|
+
".DS_Store",
|
|
8
|
+
".gitattributes",
|
|
9
|
+
".gitignore",
|
|
10
|
+
".pdd",
|
|
11
|
+
"**.json",
|
|
12
|
+
"**.md",
|
|
13
|
+
"**.svg",
|
|
14
|
+
"**.txt",
|
|
15
|
+
"**/.DS_Store",
|
|
16
|
+
"**/.gitignore",
|
|
17
|
+
"**/.pdd",
|
|
18
|
+
"**/*.csv",
|
|
19
|
+
"**/*.jpg",
|
|
20
|
+
"**/*.json",
|
|
21
|
+
"**/*.md",
|
|
22
|
+
"**/*.pdf",
|
|
23
|
+
"**/*.png",
|
|
24
|
+
"**/*.svg",
|
|
25
|
+
"**/*.txt",
|
|
26
|
+
"**/*.vm",
|
|
27
|
+
"**/CNAME",
|
|
28
|
+
"**/Gemfile.lock",
|
|
29
|
+
"Gemfile.lock",
|
|
30
|
+
"README.md",
|
|
31
|
+
"renovate.json",
|
|
32
|
+
]
|
|
33
|
+
precedence = "override"
|
|
34
|
+
SPDX-FileCopyrightText = "Copyright (c) 2025 Yegor Bugayenko"
|
|
35
|
+
SPDX-License-Identifier = "MIT"
|
data/Rakefile
CHANGED
|
@@ -1,29 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2020-2021 Yegor Bugayenko
|
|
4
|
-
#
|
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
# furnished to do so, subject to the following conditions:
|
|
11
|
-
#
|
|
12
|
-
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
# copies or substantial portions of the Software.
|
|
14
|
-
#
|
|
15
|
-
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
# SOFTWARE.
|
|
22
|
-
|
|
23
|
-
require 'rubygems'
|
|
24
3
|
require 'rake'
|
|
25
|
-
require 'rdoc'
|
|
26
4
|
require 'rake/clean'
|
|
5
|
+
require 'rdoc'
|
|
6
|
+
# SPDX-FileCopyrightText: Copyright (c) 2020-2026 Yegor Bugayenko
|
|
7
|
+
# SPDX-License-Identifier: MIT
|
|
8
|
+
|
|
9
|
+
require 'rubygems'
|
|
27
10
|
|
|
28
11
|
def name
|
|
29
12
|
@name ||= File.basename(Dir['*.gemspec'].first, '.*')
|
|
@@ -33,7 +16,7 @@ def version
|
|
|
33
16
|
Gem::Specification.load(Dir['*.gemspec'].first).version
|
|
34
17
|
end
|
|
35
18
|
|
|
36
|
-
task default: %i[clean features rubocop
|
|
19
|
+
task default: %i[clean features rubocop]
|
|
37
20
|
|
|
38
21
|
require 'rubocop/rake_task'
|
|
39
22
|
RuboCop::RakeTask.new(:rubocop) do |task|
|
|
@@ -48,11 +31,3 @@ end
|
|
|
48
31
|
Cucumber::Rake::Task.new(:'features:html') do |t|
|
|
49
32
|
t.profile = 'html_report'
|
|
50
33
|
end
|
|
51
|
-
|
|
52
|
-
task :copyright do
|
|
53
|
-
sh "grep -q -r '#{Date.today.strftime('%Y')}' \
|
|
54
|
-
--include '*.rb' \
|
|
55
|
-
--include '*.txt' \
|
|
56
|
-
--include 'Rakefile' \
|
|
57
|
-
."
|
|
58
|
-
end
|
data/bin/texqc
CHANGED
|
@@ -1,122 +1,110 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
|
-
# Copyright (c) 2020-
|
|
5
|
-
#
|
|
6
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
# of this software and associated documentation files (the 'Software'), to deal
|
|
8
|
-
# in the Software without restriction, including without limitation the rights
|
|
9
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
# furnished to do so, subject to the following conditions:
|
|
12
|
-
#
|
|
13
|
-
# The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
# copies or substantial portions of the Software.
|
|
15
|
-
#
|
|
16
|
-
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
# SOFTWARE.
|
|
4
|
+
# SPDX-FileCopyrightText: Copyright (c) 2020-2026 Yegor Bugayenko
|
|
5
|
+
# SPDX-License-Identifier: MIT
|
|
23
6
|
|
|
24
|
-
VERSION = '0.
|
|
7
|
+
VERSION = '0.9.0'
|
|
25
8
|
|
|
26
|
-
|
|
9
|
+
$stdout.sync = true
|
|
27
10
|
|
|
28
11
|
require 'backtrace'
|
|
29
12
|
require 'loog'
|
|
30
13
|
require 'open3'
|
|
31
14
|
require 'slop'
|
|
32
15
|
|
|
16
|
+
module Texqc; end
|
|
17
|
+
|
|
33
18
|
# Errors counter.
|
|
34
|
-
class Errors
|
|
19
|
+
class Texqc::Errors
|
|
35
20
|
attr_reader :count
|
|
21
|
+
|
|
36
22
|
def initialize
|
|
37
23
|
@count = 0
|
|
38
24
|
end
|
|
39
25
|
|
|
40
26
|
def report(pos, txt)
|
|
41
|
-
puts
|
|
27
|
+
puts("[#{pos}] #{txt}")
|
|
42
28
|
@count += 1
|
|
43
29
|
end
|
|
44
30
|
end
|
|
45
31
|
|
|
46
|
-
|
|
32
|
+
# Read configuration arguments from a file, if it exists.
|
|
33
|
+
def Texqc.config(path)
|
|
47
34
|
f = File.expand_path(path)
|
|
48
35
|
args = []
|
|
49
36
|
if File.exist?(f)
|
|
50
37
|
args += File.readlines(f).map(&:strip)
|
|
51
|
-
puts
|
|
38
|
+
puts("Found #{args.length} lines in #{File.absolute_path(f)}")
|
|
52
39
|
end
|
|
53
40
|
args
|
|
54
41
|
end
|
|
55
42
|
|
|
56
43
|
begin
|
|
57
44
|
log = Loog::REGULAR
|
|
58
|
-
args = config('~/.texqc') + config('.texqc') + ARGV
|
|
59
|
-
|
|
45
|
+
args = Texqc.config('~/.texqc') + Texqc.config('.texqc') + ARGV
|
|
60
46
|
begin
|
|
61
|
-
opts =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
47
|
+
opts =
|
|
48
|
+
Slop.parse(args, strict: true, help: true) do |o|
|
|
49
|
+
o.banner = "Usage (#{VERSION}): texqc [options] file...\nOptions are:"
|
|
50
|
+
o.bool('--dry', 'Don\'t fail the build on errors')
|
|
51
|
+
o.array('--ignore', 'Ignore given regexp')
|
|
52
|
+
o.bool('--version', 'Print current version') do
|
|
53
|
+
puts(VERSION)
|
|
54
|
+
exit
|
|
55
|
+
end
|
|
56
|
+
o.bool('--verbose', 'Make it more verbose than usual') do
|
|
57
|
+
log = Loog::VERBOSE
|
|
58
|
+
end
|
|
59
|
+
o.bool('--help', 'Read this: https://github.com/yegor256/texqc') do
|
|
60
|
+
puts(o)
|
|
61
|
+
exit
|
|
62
|
+
end
|
|
69
63
|
end
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
end
|
|
73
|
-
o.bool '--help', 'Read this: https://github.com/yegor256/texqc' do
|
|
74
|
-
puts o
|
|
75
|
-
exit
|
|
76
|
-
end
|
|
77
|
-
end
|
|
78
|
-
rescue Slop::Error => ex
|
|
79
|
-
raise ex.message
|
|
64
|
+
rescue Slop::Error => e
|
|
65
|
+
raise(e.message)
|
|
80
66
|
end
|
|
81
67
|
candidates = opts.arguments
|
|
82
68
|
candidates += Dir['*.tex'] if candidates.empty?
|
|
83
|
-
puts
|
|
84
|
-
puts
|
|
85
|
-
puts
|
|
69
|
+
puts("Args: #{args}") if opts[:verbose]
|
|
70
|
+
puts("Ignore: #{opts[:ignore]}") if opts[:verbose]
|
|
71
|
+
puts("Candidates: #{candidates}") if opts[:verbose]
|
|
86
72
|
candidates.each do |doc|
|
|
87
73
|
if doc.end_with?('.tex')
|
|
88
|
-
log.info("File
|
|
74
|
+
log.info("File extension removed from #{doc.inspect}")
|
|
89
75
|
doc = doc.gsub(/\.tex$/, '')
|
|
90
76
|
end
|
|
91
77
|
f = "#{doc}.log"
|
|
92
|
-
e = Errors.new
|
|
78
|
+
e = Texqc::Errors.new
|
|
93
79
|
matches = [
|
|
94
80
|
/^Underfull /,
|
|
95
81
|
/^Overfull /,
|
|
96
82
|
/^LaTeX Warning: /,
|
|
97
83
|
/^pdfTeX warning: /,
|
|
98
|
-
/^Class
|
|
99
|
-
/^Package
|
|
84
|
+
/^Class \S+ Warning: /,
|
|
85
|
+
/^Package \S+ Warning: /,
|
|
100
86
|
/^LaTeX Font Warning: /
|
|
101
87
|
]
|
|
102
|
-
File.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
88
|
+
File.open(f) do |io|
|
|
89
|
+
io.each_line.with_index do |t, i|
|
|
90
|
+
matches.each do |p|
|
|
91
|
+
next unless p.match?(t)
|
|
92
|
+
next if opts[:ignore].any? { |re| /.*#{re}.*/.match?(t) }
|
|
93
|
+
e.report(i, t)
|
|
94
|
+
end
|
|
107
95
|
end
|
|
108
96
|
end
|
|
109
97
|
unless e.count.zero?
|
|
110
98
|
log.info("#{e.count} LaTeX processing errors found in #{f.inspect}")
|
|
111
|
-
exit
|
|
99
|
+
exit(1)
|
|
112
100
|
end
|
|
113
101
|
log.info("No LaTeX processing errors found in #{f.inspect}")
|
|
114
102
|
end
|
|
115
|
-
rescue StandardError =>
|
|
103
|
+
rescue StandardError => e
|
|
116
104
|
if opts[:verbose]
|
|
117
|
-
puts
|
|
105
|
+
puts(Backtrace.new(e))
|
|
118
106
|
else
|
|
119
|
-
puts
|
|
107
|
+
puts("ERROR: #{e.message}")
|
|
120
108
|
end
|
|
121
109
|
exit(255)
|
|
122
110
|
end
|
data/cucumber.yml
CHANGED
data/features/cli.feature
CHANGED
|
@@ -1,76 +1,75 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2020-2026 Yegor Bugayenko
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
1
3
|
Feature: Command Line Processing
|
|
2
|
-
As
|
|
4
|
+
As an author of LaTeX document I want to check spelling
|
|
3
5
|
|
|
4
6
|
Scenario: Help can be printed
|
|
5
7
|
When I run bin/texqc with "--help"
|
|
6
8
|
Then Exit code is zero
|
|
7
9
|
And Stdout contains "--help"
|
|
8
10
|
|
|
9
|
-
Scenario:
|
|
10
|
-
Given I have a "article.
|
|
11
|
+
Scenario: A clean log produces no errors
|
|
12
|
+
Given I have a "article.log" file with content:
|
|
11
13
|
"""
|
|
12
|
-
|
|
13
|
-
\begin{document}
|
|
14
|
-
How are you, my dear friend?
|
|
15
|
-
\end{document}
|
|
14
|
+
This is pdfTeX, output written on article.pdf (1 page, 1234 bytes).
|
|
16
15
|
"""
|
|
17
|
-
|
|
18
|
-
Then I run bin/texqc with ""
|
|
16
|
+
Then I run bin/texqc with "article"
|
|
19
17
|
Then Exit code is zero
|
|
20
18
|
And Stdout contains "No LaTeX processing errors found"
|
|
21
19
|
|
|
22
|
-
Scenario:
|
|
23
|
-
Given I have a "article.
|
|
20
|
+
Scenario: An overfull box is reported
|
|
21
|
+
Given I have a "article.log" file with content:
|
|
24
22
|
"""
|
|
25
|
-
\
|
|
26
|
-
\begin{document}
|
|
27
|
-
HowareyouHowareyouHowareyouHowareyouHowareyouHowareyouHowareyouHowareyouHowareyouHowareyouHowareyouHowareyouHowareyou
|
|
28
|
-
\end{document}
|
|
23
|
+
Overfull \hbox (50.12345pt too wide) in paragraph at lines 3--3
|
|
29
24
|
"""
|
|
30
|
-
When I run bash with "pdflatex article.tex"
|
|
31
25
|
Then I run bin/texqc with "article"
|
|
32
26
|
Then Exit code is not zero
|
|
33
27
|
And Stdout contains "1 LaTeX processing errors"
|
|
34
28
|
|
|
35
|
-
Scenario:
|
|
36
|
-
Given I have a "article.
|
|
29
|
+
Scenario: A LaTeX warning is reported
|
|
30
|
+
Given I have a "article.log" file with content:
|
|
37
31
|
"""
|
|
38
|
-
|
|
39
|
-
\begin{document}
|
|
40
|
-
test\label{xxx}test\label{xxx}
|
|
41
|
-
\end{document}
|
|
32
|
+
LaTeX Warning: Label `xxx' multiply defined.
|
|
42
33
|
"""
|
|
43
|
-
|
|
44
|
-
Then I run bin/texqc with "article.tex"
|
|
34
|
+
Then I run bin/texqc with "article"
|
|
45
35
|
Then Exit code is not zero
|
|
46
36
|
And Stdout contains "1 LaTeX processing errors"
|
|
47
37
|
|
|
48
|
-
Scenario:
|
|
49
|
-
Given I have a "article.
|
|
38
|
+
Scenario: A LaTeX warning can be ignored from the command line
|
|
39
|
+
Given I have a "article.log" file with content:
|
|
50
40
|
"""
|
|
51
|
-
|
|
52
|
-
\begin{document}
|
|
53
|
-
test\label{xxx}test\label{xxx}
|
|
54
|
-
\end{document}
|
|
41
|
+
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
|
|
55
42
|
"""
|
|
56
|
-
|
|
57
|
-
Then I run bin/texqc with "--ignore 'may have changed' article.tex"
|
|
43
|
+
Then I run bin/texqc with "--ignore 'may have changed' article"
|
|
58
44
|
Then Exit code is zero
|
|
59
45
|
|
|
60
|
-
Scenario:
|
|
61
|
-
Given I have a "
|
|
46
|
+
Scenario: Class warning with a hyphen in the class name is not ignored
|
|
47
|
+
Given I have a "book.log" file with content:
|
|
48
|
+
"""
|
|
49
|
+
Class yb-book Warning: page 78 is too long.
|
|
50
|
+
"""
|
|
51
|
+
Then I run bin/texqc with "book"
|
|
52
|
+
Then Exit code is not zero
|
|
53
|
+
And Stdout contains "1 LaTeX processing errors"
|
|
54
|
+
|
|
55
|
+
Scenario: Package warning with a hyphen in the package name is not ignored
|
|
56
|
+
Given I have a "book.log" file with content:
|
|
62
57
|
"""
|
|
63
|
-
\
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
Package etex-pkg Warning: redefining \foo.
|
|
59
|
+
"""
|
|
60
|
+
Then I run bin/texqc with "book"
|
|
61
|
+
Then Exit code is not zero
|
|
62
|
+
And Stdout contains "1 LaTeX processing errors"
|
|
63
|
+
|
|
64
|
+
Scenario: Ignore patterns from .texqc are honored
|
|
65
|
+
Given I have a "article.log" file with content:
|
|
66
|
+
"""
|
|
67
|
+
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
|
|
67
68
|
"""
|
|
68
69
|
And I have a ".texqc" file with content:
|
|
69
70
|
"""
|
|
70
71
|
--verbose
|
|
71
|
-
|
|
72
|
-
--ignore='may have changed'
|
|
72
|
+
--ignore=changed
|
|
73
73
|
"""
|
|
74
|
-
|
|
75
|
-
Then I run bin/texqc
|
|
74
|
+
Then I run bin/texqc with "article"
|
|
76
75
|
Then Exit code is zero
|
|
@@ -1,45 +1,26 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
# furnished to do so, subject to the following conditions:
|
|
11
|
-
#
|
|
12
|
-
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
# copies or substantial portions of the Software.
|
|
14
|
-
#
|
|
15
|
-
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
# SOFTWARE.
|
|
3
|
+
require 'English'
|
|
4
|
+
# SPDX-FileCopyrightText: Copyright (c) 2020-2026 Yegor Bugayenko
|
|
5
|
+
# SPDX-License-Identifier: MIT
|
|
22
6
|
|
|
23
7
|
require 'tmpdir'
|
|
24
|
-
require 'English'
|
|
25
8
|
|
|
26
9
|
Before do
|
|
27
10
|
@cwd = Dir.pwd
|
|
28
11
|
@dir = Dir.mktmpdir('test')
|
|
29
|
-
FileUtils.mkdir_p(@dir)
|
|
12
|
+
FileUtils.mkdir_p(@dir)
|
|
30
13
|
Dir.chdir(@dir)
|
|
31
14
|
end
|
|
32
15
|
|
|
33
16
|
After do
|
|
34
17
|
Dir.chdir(@cwd)
|
|
35
|
-
FileUtils.rm_rf(@dir)
|
|
18
|
+
FileUtils.rm_rf(@dir)
|
|
36
19
|
end
|
|
37
20
|
|
|
38
21
|
Given(/^I have a "([^"]*)" file with content:$/) do |file, text|
|
|
39
22
|
FileUtils.mkdir_p(File.dirname(file)) unless File.exist?(file)
|
|
40
|
-
File.
|
|
41
|
-
f.write(text.gsub(/\\xFF/, 0xFF.chr))
|
|
42
|
-
end
|
|
23
|
+
File.write(file, text.gsub('\\xFF', 0xFF.chr))
|
|
43
24
|
end
|
|
44
25
|
|
|
45
26
|
When(%r{^I run bin/texqc with "([^"]*)"$}) do |arg|
|
|
@@ -57,7 +38,7 @@ Then(/^Stdout is empty$/) do
|
|
|
57
38
|
end
|
|
58
39
|
|
|
59
40
|
Then(/^Exit code is zero$/) do
|
|
60
|
-
raise "Non-zero exit #{@exitstatus}:\n#{@stdout}"
|
|
41
|
+
raise "Non-zero exit #{@exitstatus}:\n#{@stdout}" if @exitstatus.nonzero?
|
|
61
42
|
end
|
|
62
43
|
|
|
63
44
|
Then(/^Exit code is not zero$/) do
|
data/features/support/env.rb
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2020-
|
|
4
|
-
#
|
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
# furnished to do so, subject to the following conditions:
|
|
11
|
-
#
|
|
12
|
-
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
# copies or substantial portions of the Software.
|
|
14
|
-
#
|
|
15
|
-
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
# SOFTWARE.
|
|
3
|
+
# SPDX-FileCopyrightText: Copyright (c) 2020-2026 Yegor Bugayenko
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
22
5
|
|
|
23
6
|
require 'simplecov'
|
|
7
|
+
require 'simplecov-cobertura'
|
|
8
|
+
unless SimpleCov.running
|
|
9
|
+
SimpleCov.command_name('features')
|
|
10
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
|
11
|
+
[
|
|
12
|
+
SimpleCov::Formatter::HTMLFormatter,
|
|
13
|
+
SimpleCov::Formatter::CoberturaFormatter
|
|
14
|
+
]
|
|
15
|
+
)
|
|
16
|
+
SimpleCov.start do
|
|
17
|
+
add_filter 'features/'
|
|
18
|
+
add_filter 'vendor/'
|
|
19
|
+
track_files 'bin/*'
|
|
20
|
+
end
|
|
21
|
+
end
|
data/logo.svg
CHANGED
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
<path d="M135.676765,111.215287 C135.211714,113.540467 132.770932,120.688823 130.252813,127.100603 C127.734621,133.512383 125.2898,140.431445 124.819828,142.476214 C123.6868,147.405663 121.517836,147.185477 119.69487,141.95608 C116.899865,133.938362 105.171362,111.043501 103.859129,111.043501 C100.420089,111.043501 101.508757,114.986149 109.1771,130.30227 C113.739327,139.414532 118.032086,147.448041 118.716515,148.15443 C120.694817,150.196115 120.172626,154.319657 117.358599,158.877992 C113.567467,165.019055 107.570942,183.721189 108.054206,187.896804 C108.804956,194.383204 112.436054,192.210274 113.355359,184.724515 C114.48376,175.535577 120.945556,159.641154 124.897459,156.333653 C127.109021,154.482778 128.268636,151.905536 128.573284,148.163978 C128.818001,145.157747 131.906711,135.560972 135.437115,126.837819 C138.96752,118.114666 141.511492,110.079835 141.090434,108.982574 C139.755727,105.504315 136.554941,106.824333 135.676765,111.215287 M174.714659,126.841564 C169.37392,129.699438 169.197653,130.049915 167.452978,141.283475 C165.577352,153.360398 165.225112,168.513913 166.548289,180.203784 L167.566817,189.202501 L161.346213,191.9541 C154.601949,194.937416 150.91195,200.302465 153.156708,203.861146 C155.104824,206.949562 157.09025,206.70198 157.571826,203.310532 C158.083734,199.706169 166.097413,193.204052 170.29418,192.987978 C172.116999,192.894116 173.522874,191.717021 173.97823,189.903529 C174.383277,188.290613 177.740353,184.944554 181.438431,182.467858 C188.546172,177.707551 194.317883,170.450278 194.317883,166.273341 C194.317883,162.684548 189.493165,158.361603 185.487795,158.361603 C180.701636,158.361603 180.027195,155.239403 183.731222,150.229385 C188.308065,144.038966 188.284856,130.867646 183.690534,127.147387 C179.896537,124.075276 179.885006,124.074836 174.714659,126.841564 M182.67318,134.240439 C184.752542,140.153164 174.808961,161.185104 171.588639,157.68562 C169.868715,155.81653 172.863122,135.012708 175.266374,132.134564 C177.872553,129.013319 181.163896,129.949075 182.67318,134.240439 M184.854262,162.269586 C190.589839,163.855621 189.673839,167.881335 181.645765,176.371155 C177.281618,180.986262 173.904933,183.573859 173.371946,182.711474 C172.876636,181.91012 172.127869,176.711937 171.707987,171.159972 L170.944531,161.065463 L176.209475,161.200234 C179.105172,161.274339 182.995308,161.755548 184.854262,162.269586 M132.642184,172.492256 C131.593837,175.224098 133.152917,177.288844 136.264027,177.288844 C139.014965,177.288844 139.431396,176.221769 138.067531,172.667568 C137.039234,169.987871 133.645289,169.878218 132.642184,172.492256 M203.781503,185.840798 C203.781503,187.657595 209.264724,193.512152 210.966361,193.512152 C212.534035,193.512152 211.991059,187.391138 210.270768,185.670847 C208.092403,183.492409 203.781503,183.605293 203.781503,185.840798" id="Fill-6" fill="#427B8A" fill-rule="nonzero"></path>
|
|
12
12
|
</g>
|
|
13
13
|
</g>
|
|
14
|
-
</svg>
|
|
14
|
+
</svg>
|
data/texqc.gemspec
CHANGED
|
@@ -1,55 +1,33 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2020-
|
|
4
|
-
#
|
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
# furnished to do so, subject to the following conditions:
|
|
11
|
-
#
|
|
12
|
-
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
# copies or substantial portions of the Software.
|
|
14
|
-
#
|
|
15
|
-
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
# SOFTWARE.
|
|
3
|
+
# SPDX-FileCopyrightText: Copyright (c) 2020-2026 Yegor Bugayenko
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
22
5
|
|
|
23
6
|
require 'English'
|
|
24
7
|
|
|
25
8
|
lib = File.expand_path('lib', __dir__)
|
|
26
9
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
27
10
|
Gem::Specification.new do |s|
|
|
28
|
-
s.
|
|
29
|
-
|
|
30
|
-
s.required_rubygems_version = Gem::Requirement.new('>= 0')
|
|
31
|
-
end
|
|
32
|
-
s.rubygems_version = '2.2'
|
|
33
|
-
s.required_ruby_version = '>= 2.3'
|
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to?(:required_rubygems_version=)
|
|
12
|
+
s.required_ruby_version = '>= 3.3'
|
|
34
13
|
s.name = 'texqc'
|
|
35
|
-
s.version = '0.
|
|
14
|
+
s.version = '0.9.0'
|
|
36
15
|
s.license = 'MIT'
|
|
37
16
|
s.summary = 'Quality Control of Your LaTeX Build'
|
|
38
17
|
s.description = 'Run it after you compile your LaTeX document'
|
|
39
18
|
s.authors = ['Yegor Bugayenko']
|
|
40
19
|
s.email = 'yegor256@gmail.com'
|
|
41
|
-
s.homepage = '
|
|
42
|
-
s.files = `git ls-files`.split($RS)
|
|
20
|
+
s.homepage = 'https://github.com/yegor256/texqc'
|
|
21
|
+
s.files = `git ls-files | grep -v -E '^(test/|\\.|renovate)'`.split($RS)
|
|
43
22
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
44
|
-
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
|
45
23
|
s.rdoc_options = ['--charset=UTF-8']
|
|
46
24
|
s.extra_rdoc_files = ['README.md', 'LICENSE.txt']
|
|
47
|
-
s.
|
|
48
|
-
s.
|
|
49
|
-
s.
|
|
50
|
-
s.add_development_dependency
|
|
51
|
-
s.add_development_dependency
|
|
52
|
-
s.add_development_dependency
|
|
53
|
-
s.add_development_dependency
|
|
54
|
-
s.
|
|
25
|
+
s.add_dependency('backtrace', '~> 0.4')
|
|
26
|
+
s.add_dependency('loog', '~> 0.8')
|
|
27
|
+
s.add_dependency('slop', '~> 4.10')
|
|
28
|
+
s.add_development_dependency('cucumber', '~> 11.0')
|
|
29
|
+
s.add_development_dependency('rake', '~> 13.4')
|
|
30
|
+
s.add_development_dependency('rubocop', '~> 1.86')
|
|
31
|
+
s.add_development_dependency('rubocop-rspec', '~> 3.9')
|
|
32
|
+
s.metadata['rubygems_mfa_required'] = 'true'
|
|
55
33
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: texqc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yegor Bugayenko
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: backtrace
|
|
@@ -16,132 +15,113 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - "~>"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0.
|
|
18
|
+
version: '0.4'
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - "~>"
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0.
|
|
25
|
+
version: '0.4'
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: loog
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
30
|
- - "~>"
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0.
|
|
32
|
+
version: '0.8'
|
|
34
33
|
type: :runtime
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
37
|
- - "~>"
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0.
|
|
39
|
+
version: '0.8'
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
41
|
name: slop
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
44
43
|
requirements:
|
|
45
44
|
- - "~>"
|
|
46
45
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 4.
|
|
46
|
+
version: '4.10'
|
|
48
47
|
type: :runtime
|
|
49
48
|
prerelease: false
|
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
50
|
requirements:
|
|
52
51
|
- - "~>"
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 4.
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: codecov
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - '='
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: 0.2.6
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - '='
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: 0.2.6
|
|
53
|
+
version: '4.10'
|
|
69
54
|
- !ruby/object:Gem::Dependency
|
|
70
55
|
name: cucumber
|
|
71
56
|
requirement: !ruby/object:Gem::Requirement
|
|
72
57
|
requirements:
|
|
73
58
|
- - "~>"
|
|
74
59
|
- !ruby/object:Gem::Version
|
|
75
|
-
version:
|
|
60
|
+
version: '11.0'
|
|
76
61
|
type: :development
|
|
77
62
|
prerelease: false
|
|
78
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
64
|
requirements:
|
|
80
65
|
- - "~>"
|
|
81
66
|
- !ruby/object:Gem::Version
|
|
82
|
-
version:
|
|
67
|
+
version: '11.0'
|
|
83
68
|
- !ruby/object:Gem::Dependency
|
|
84
69
|
name: rake
|
|
85
70
|
requirement: !ruby/object:Gem::Requirement
|
|
86
71
|
requirements:
|
|
87
|
-
- -
|
|
72
|
+
- - "~>"
|
|
88
73
|
- !ruby/object:Gem::Version
|
|
89
|
-
version:
|
|
74
|
+
version: '13.4'
|
|
90
75
|
type: :development
|
|
91
76
|
prerelease: false
|
|
92
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
78
|
requirements:
|
|
94
|
-
- -
|
|
79
|
+
- - "~>"
|
|
95
80
|
- !ruby/object:Gem::Version
|
|
96
|
-
version:
|
|
81
|
+
version: '13.4'
|
|
97
82
|
- !ruby/object:Gem::Dependency
|
|
98
83
|
name: rubocop
|
|
99
84
|
requirement: !ruby/object:Gem::Requirement
|
|
100
85
|
requirements:
|
|
101
|
-
- -
|
|
86
|
+
- - "~>"
|
|
102
87
|
- !ruby/object:Gem::Version
|
|
103
|
-
version:
|
|
88
|
+
version: '1.86'
|
|
104
89
|
type: :development
|
|
105
90
|
prerelease: false
|
|
106
91
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
92
|
requirements:
|
|
108
|
-
- -
|
|
93
|
+
- - "~>"
|
|
109
94
|
- !ruby/object:Gem::Version
|
|
110
|
-
version:
|
|
95
|
+
version: '1.86'
|
|
111
96
|
- !ruby/object:Gem::Dependency
|
|
112
97
|
name: rubocop-rspec
|
|
113
98
|
requirement: !ruby/object:Gem::Requirement
|
|
114
99
|
requirements:
|
|
115
|
-
- -
|
|
100
|
+
- - "~>"
|
|
116
101
|
- !ruby/object:Gem::Version
|
|
117
|
-
version:
|
|
102
|
+
version: '3.9'
|
|
118
103
|
type: :development
|
|
119
104
|
prerelease: false
|
|
120
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
106
|
requirements:
|
|
122
|
-
- -
|
|
107
|
+
- - "~>"
|
|
123
108
|
- !ruby/object:Gem::Version
|
|
124
|
-
version:
|
|
109
|
+
version: '3.9'
|
|
125
110
|
description: Run it after you compile your LaTeX document
|
|
126
111
|
email: yegor256@gmail.com
|
|
127
112
|
executables:
|
|
128
113
|
- texqc
|
|
129
114
|
extensions: []
|
|
130
115
|
extra_rdoc_files:
|
|
131
|
-
- README.md
|
|
132
116
|
- LICENSE.txt
|
|
117
|
+
- README.md
|
|
133
118
|
files:
|
|
134
|
-
- ".0pdd.yml"
|
|
135
|
-
- ".gitattributes"
|
|
136
|
-
- ".gitignore"
|
|
137
|
-
- ".pdd"
|
|
138
|
-
- ".rubocop.yml"
|
|
139
|
-
- ".rultor.yml"
|
|
140
|
-
- ".simplecov"
|
|
141
|
-
- ".travis.yml"
|
|
142
119
|
- Gemfile
|
|
120
|
+
- Gemfile.lock
|
|
143
121
|
- LICENSE.txt
|
|
122
|
+
- LICENSES/MIT.txt
|
|
144
123
|
- README.md
|
|
124
|
+
- REUSE.toml
|
|
145
125
|
- Rakefile
|
|
146
126
|
- bin/texqc
|
|
147
127
|
- cucumber.yml
|
|
@@ -151,11 +131,11 @@ files:
|
|
|
151
131
|
- features/support/env.rb
|
|
152
132
|
- logo.svg
|
|
153
133
|
- texqc.gemspec
|
|
154
|
-
homepage:
|
|
134
|
+
homepage: https://github.com/yegor256/texqc
|
|
155
135
|
licenses:
|
|
156
136
|
- MIT
|
|
157
|
-
metadata:
|
|
158
|
-
|
|
137
|
+
metadata:
|
|
138
|
+
rubygems_mfa_required: 'true'
|
|
159
139
|
rdoc_options:
|
|
160
140
|
- "--charset=UTF-8"
|
|
161
141
|
require_paths:
|
|
@@ -164,19 +144,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
164
144
|
requirements:
|
|
165
145
|
- - ">="
|
|
166
146
|
- !ruby/object:Gem::Version
|
|
167
|
-
version: '
|
|
147
|
+
version: '3.3'
|
|
168
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
149
|
requirements:
|
|
170
150
|
- - ">="
|
|
171
151
|
- !ruby/object:Gem::Version
|
|
172
152
|
version: '0'
|
|
173
153
|
requirements: []
|
|
174
|
-
rubygems_version: 3.
|
|
175
|
-
|
|
176
|
-
specification_version: 2
|
|
154
|
+
rubygems_version: 3.6.9
|
|
155
|
+
specification_version: 4
|
|
177
156
|
summary: Quality Control of Your LaTeX Build
|
|
178
|
-
test_files:
|
|
179
|
-
- features/cli.feature
|
|
180
|
-
- features/gem_package.feature
|
|
181
|
-
- features/step_definitions/steps.rb
|
|
182
|
-
- features/support/env.rb
|
|
157
|
+
test_files: []
|
data/.0pdd.yml
DELETED
data/.gitattributes
DELETED
data/.gitignore
DELETED
data/.pdd
DELETED
data/.rubocop.yml
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
AllCops:
|
|
2
|
-
Exclude:
|
|
3
|
-
- 'assets/**/*'
|
|
4
|
-
DisplayCopNames: true
|
|
5
|
-
TargetRubyVersion: 2.3
|
|
6
|
-
|
|
7
|
-
Metrics/LineLength:
|
|
8
|
-
Max: 100
|
|
9
|
-
Layout/EndOfLine:
|
|
10
|
-
EnforcedStyle: lf
|
|
11
|
-
Style/MultilineTernaryOperator:
|
|
12
|
-
Enabled: false
|
|
13
|
-
Metrics/BlockLength:
|
|
14
|
-
Max: 50
|
|
15
|
-
Layout/AlignParameters:
|
|
16
|
-
Enabled: false
|
|
17
|
-
Layout/EmptyLineAfterGuardClause:
|
|
18
|
-
Enabled: false
|
data/.rultor.yml
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
assets:
|
|
2
|
-
rubygems.yml: yegor256/home#assets/rubygems.yml
|
|
3
|
-
install: |
|
|
4
|
-
export PATH=$PATH:/usr/local/texlive/2021/bin/x86_64-linux/
|
|
5
|
-
sudo apt install -y aspell
|
|
6
|
-
pdd -f /dev/null
|
|
7
|
-
sudo bundle install --no-color "--gemfile=$(pwd)/Gemfile"
|
|
8
|
-
release:
|
|
9
|
-
script: |-
|
|
10
|
-
bundle exec rake
|
|
11
|
-
sed -i "s/0\.0\.0/${tag}/g" bin/texqc
|
|
12
|
-
sed -i "s/0\.0\.0/${tag}/g" texqc.gemspec
|
|
13
|
-
git add bin/texqc
|
|
14
|
-
git add texqc.gemspec
|
|
15
|
-
git commit -m "version set to ${tag}"
|
|
16
|
-
gem build texqc.gemspec
|
|
17
|
-
chmod 0600 ../rubygems.yml
|
|
18
|
-
gem push *.gem --config-file ../rubygems.yml
|
|
19
|
-
merge:
|
|
20
|
-
script: |-
|
|
21
|
-
bundle exec rake
|
|
22
|
-
deploy:
|
|
23
|
-
script: |-
|
|
24
|
-
echo "There is nothing to deploy"
|
|
25
|
-
exit -1
|
data/.simplecov
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2020-2021 Yegor Bugayenko
|
|
2
|
-
#
|
|
3
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
-
# of this software and associated documentation files (the 'Software'), to deal
|
|
5
|
-
# in the Software without restriction, including without limitation the rights
|
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
8
|
-
# furnished to do so, subject to the following conditions:
|
|
9
|
-
#
|
|
10
|
-
# The above copyright notice and this permission notice shall be included in all
|
|
11
|
-
# copies or substantial portions of the Software.
|
|
12
|
-
#
|
|
13
|
-
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
-
# SOFTWARE.
|
|
20
|
-
|
|
21
|
-
if Gem.win_platform? then
|
|
22
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
|
23
|
-
SimpleCov::Formatter::HTMLFormatter
|
|
24
|
-
]
|
|
25
|
-
SimpleCov.start do
|
|
26
|
-
add_filter "/test/"
|
|
27
|
-
add_filter "/features/"
|
|
28
|
-
end
|
|
29
|
-
else
|
|
30
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
|
31
|
-
[SimpleCov::Formatter::HTMLFormatter]
|
|
32
|
-
)
|
|
33
|
-
SimpleCov.start do
|
|
34
|
-
add_filter "/test/"
|
|
35
|
-
add_filter "/features/"
|
|
36
|
-
minimum_coverage 60
|
|
37
|
-
end
|
|
38
|
-
end
|
data/.travis.yml
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
language: ruby
|
|
2
|
-
rvm:
|
|
3
|
-
- 2.6.0
|
|
4
|
-
cache: bundler
|
|
5
|
-
branches:
|
|
6
|
-
only:
|
|
7
|
-
- master
|
|
8
|
-
addons:
|
|
9
|
-
apt:
|
|
10
|
-
packages:
|
|
11
|
-
- aspell
|
|
12
|
-
- aspell-en
|
|
13
|
-
- texlive
|
|
14
|
-
install:
|
|
15
|
-
- gem install pdd -v 0.20.5
|
|
16
|
-
- travis_retry bundle update
|
|
17
|
-
script:
|
|
18
|
-
- pdd -f /dev/null
|
|
19
|
-
- bundle exec rake
|
|
20
|
-
after_success:
|
|
21
|
-
- "bash <(curl -s https://codecov.io/bash)"
|