summaryrefslogtreecommitdiff
path: root/support/pkgcheck/src/messages/errorsd.rs
blob: c034301ad9edc900b1366ac9080ffce8f33ac2e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
// This file is generated by a Perl script. The source is
// in the docs/ directory of the repository.

pub fn e0001d() {
    println!(
        r#"E0001 -- Bad characters in file name

File name should not contain non-ascii characters. Additionally, file
names should not contain control characters or other characters which
may have a special meaning for UNIX shells.

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#nounixspecialcharacters
"#
    )
}

pub fn e0002d() {
    println!(
        r#"E0002 -- File Permissions

Files submitted to CTAN should be world readable.

Only files that are truly executable (like scripts and binaries) should
be marked as such.

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#filepermissions
"#
    )
}

pub fn e0003d() {
    println!(
        r#"E0003 -- README is not a text file

The README file specified in the error message must be a text file but
it isn't.
"#
    )
}

pub fn e0004d() {
    println!(
        r#"E0004 -- Empty directory not allowed

Empty directories are considered as rubbish, and are usually not
accepted as part of a package, neither in the package tree nor in the
TDS zip archive.

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#noemptyfiles
"#
    )
}

pub fn e0005d() {
    println!(
        r#"E0005 -- Empty files not allowed

Empty files are considered as rubbish, and are usually not accepted as
part of a package.

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#noemptyfiles
"#
    )
}

pub fn e0006d() {
    println!(
        r#"E0006 -- Hidden directories not allowed

A package should not contain hidden directories, neither in the package
tree nor in the TDS zip archive.

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#noauxfiles
"#
    )
}

pub fn e0007d() {
    println!(
        r#"E0007 -- Hidden files not allowed

A package should not contain hidden files, neither in the package tree
nor in the TDS zip archive.

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#noauxfiles
"#
    )
}

pub fn e0008d() {
    println!(
        r#"E0008 -- Temporary file detected

A temporary file was detected. These are typically files created by TeX
& friends and should not be part of a package.

Temporary files will also be detected in a TDS zip archive.

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#noauxfiles
"#
    )
}

pub fn e0009d() {
    println!(
        r#"E0009 -- Package doesn't contain a README file

A package must contain at least one of README, README.md or README.txt
file.

For more details refer to:
http://mirrors.ibiblio.org/CTAN/help/ctan/CTAN-upload-addendum.html#readme
"#
    )
}

pub fn e0010d() {
    println!(
        r#"E0010 -- Broken symlink detected

A broken symlink was detected.
"#
    )
}

pub fn e0011d() {
    println!(
        r#"E0011 -- Wrong permission for directory

Directories should have rwx for the owner and at least r-x for others
(i.e. world readable).

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#filepermissions
"#
    )
}

pub fn e0012d() {
    println!(
        r#"E0012 -- CRLF line endings detected

The file specified in the error message contains CRLF line endings. Text
files should have UNIX style line endings.

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#crlf
"#
    )
}

pub fn e0013d() {
    println!(
        r#"E0013 -- Socket special fie detected

The file specified in the error message is a socket special file which
is not allowed.
"#
    )
}

pub fn e0014d() {
    println!(
        r#"E0014 -- Fifo special file detected

The file specified in the error message is a fifo special file which is
not allowed.
"#
    )
}

pub fn e0015d() {
    println!(
        r#"E0015 -- Bloch device file detected

The file specified in the error message is a block device file which is
not allowed.
"#
    )
}

pub fn e0016d() {
    println!(
        r#"E0016 -- Character device file detected

The file specified in the error message is a character device file which
is not allowed.
"#
    )
}

pub fn e0017d() {
    println!(
        r#"E0017 -- PDF document is in error

The PDF document mentioned in the message is in error.

pdfinfo will be run to check if a PDF document can be read. Message
E0017 will be followed by the error messages from pdfinfo.

Example:

    I0002   Checking package files in directory somepkg
    E0017   PDF error detected in somepkg/sompkg.pdf
    Syntax Error (1293042): Illegal character ')'
    Syntax Error: Couldn't find trailer dictionary
    Syntax Error (1293042): Illegal character ')'
    Syntax Error: Couldn't find trailer dictionary
    Syntax Error: Couldn't read xref table
"#
    )
}

pub fn e0018d() {
    println!(
        r#"E0018 -- Unwanted directory detected

A directory was detected which should not be part of a package. Example:
__MACOSX
"#
    )
}

pub fn e0019d() {
    println!(
        r#"E0019 -- Generated file detected

In order to avoid redundancy we don't want to have included files in a
package which easily can be generated from other files in the
submission.

Exceptions are the README files of the package, i.e. README, README.md
or README.txt, or .pdf files.

pkgcheck detects generated files anywhere in the package directory tree.

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#nogeneratedfiles
"#
    )
}

pub fn e0020d() {
    println!(
        r#"E0020 -- Unwanted directory detected in the top level directory in TDS zip archive

The name of a top level directory of a TDS archive must be one of those
listed here: asymptote, bibtex, chktex, context, doc, dvipdfmx, dvips,
fonts, hbf2gf, makeindex, metafont, metapost, mft, omega, pbibtex,
psutils, scripts, source, tex, tex4ht, texconfig, texdoc, texdoctk,
ttf2pk, web2c, xdvi, xindy,

Any other other directory at the top level is an error.
"#
    )
}

pub fn e0021d() {
    println!(
        r#"E0021 -- Error when reading a file

An error was encountered when reading the file specified in the message.
"#
    )
}

pub fn e0022d() {
    println!(
        r#"E0022 -- Check of an URL in a README file failed

URL checking is in effect. An error occcured when trying to retrieve an
URL which was found in the specified README file.
"#
    )
}

pub fn e0023d() {
    println!(
        r#"E0023 -- Follow up error when trying to read a directory with insufficient permissions

Error which is a follow-up error. For instance, when a directory could
not be read.
"#
    )
}

pub fn e0024d() {
    println!(
        r#"E0024 -- TDS zip archive has wrong permissions

The TDS zip archive should have at least r-- for the owner and at least
r-- for others (i.e. world readable).

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#filepermissions
"#
    )
}

pub fn e0025d() {
    println!(
        r#"E0025 -- Duplicate names when ignoring letter case for files or directories

As there are operating systems which do not distinguish between myfile
and MYFILE we don't want to have file names in a directory which are the
same after converting to lower case.

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#filenames
"#
    )
}

pub fn e0026d() {
    println!(
        r#"E0026 -- Files not in TDS or different in TDS and non-install tree

The file mentioned in the error message is either not existing in the
TDS zip archive, or it is different to the one in the non-install tree
"#
    )
}

pub fn e0027d() {
    println!(
        r#"E0027 -- An I/O error occured

Some kind of I/O error occured. If you believe there is an error in
pkgcheck please contact the author.
"#
    )
}

pub fn e0028d() {
    println!(
        r#"E0028 -- A path name in a TDS zip archive must contain the package name

The path names in a TDS zip archive must contain the package name.

Example: Assume a package somepkg. Then path names should look like
follows:

    tex/latex/somepkg/somepkg.cls
    doc/latex/somepkg/README
    source/latex/somepkg/somepkg.dtx
    ...
"#
    )
}

pub fn e0029d() {
    println!(
        r#"E0029 -- README file:  encoding with BOM detected

A README file should be either ASCII or UTF-8 without BOM(byte order
mark)

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#readme
"#
    )
}

pub fn e0030d() {
    println!(
        r#"E0030 -- A symlink was found which points outside of the package directory tree

A symlink must not point to a file or directory outside of the package
directory tree.
"#
    )
}

pub fn e0031d() {
    println!(
        r#"E0031 -- File name contains invalid UTF-8 character(s)

A file name contains invald UTF-8 character(s).
"#
    )
}

pub fn e0033d() {
    println!(
        r#"E0033 -- Error when unpacking tds archive

In order to investigate the contents of the TDS zip archive pkgcheck
unpacks the TDS zip archive to a temporary location which failed for the
reason given in the error message.
"#
    )
}

pub fn e0034d() {
    println!(
        r#"E0034 -- Unwanted file detected in the top level directory in TDS zip archive

A top level directory of a TDS archive should only contain certain
directories but no files.
"#
    )
}

pub fn e0035d() {
    println!(
        r#"E0035 -- Unwanted TDS archive detected in package directory tree

A package directory should not contain a TDS zip archive.
"#
    )
}

pub fn e0036d() {
    println!(
        r#"E0036 -- .dtx/.ins files found in wrong directory in TDS zip archive

In a TDS zip archive a .dtx resp. .ins file must be in a subdirectory of
either of source/ or doc/ top level directories.
"#
    )
}

pub fn e0037d() {
    println!(
        r#"E0037 -- CR line endings detected

The file specified in the error message contains CR line endings. Text
files should have UNIX style line endings.

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#crlf
"#
    )
}

pub fn e0038d() {
    println!(
        r#"E0038 -- File has inconsistent line endings: CR: x, LF: y, CRLF: z

The file specified in the error message contains CR line endings. Text
files should have UNIX style line endings.

For more details refer to:
http://mirror.ctan.org/help/ctan/CTAN-upload-addendum.html#crlf
"#
    )
}

pub fn e0039d() {
    println!(
        r#"E0039 -- No doc/ directory found in the top level directory of the TDS zip archive

A TDS zip archive is required to contain a top level directory doc/.
"#
    )
}

pub fn e0040d() {
    println!(
        r#"E0040 -- Too few top level directories in the TDS zip archive

The top level directory of a TDS zip archive must contain at least a doc
directory and one or more of the following directories: asymptote,
bibtex, chktex, context, dvipdfmx, dvips, fonts, hbf2gf, makeindex,
metafont, metapost, mft, omega, pbibtex, psutils, scripts, source, tex,
tex4ht, texconfig, texdoc, texdoctk, ttf2pk, web2c, xdvi, xindy,

Any other other directory at the top level is an error.
"#
    )
}

pub fn e0041d() {
    println!(
        r#"E0041 -- One or more map file found for the package but none of them is in a path starting with fonts/map/dvips

At least one map file was found which was not in a path starting with
fonts/map/dvips.
"#
    )
}