summaryrefslogtreecommitdiff
path: root/support/pkgcheck/src/messages/mod.rs
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-11-30 03:00:37 +0000
committerNorbert Preining <norbert@preining.info>2020-11-30 03:00:37 +0000
commitcb68d38823870fa7adb5f0c2b68cf59205dd4bec (patch)
tree8d6e29ee5d082dcbf1ad936b7025db071e9cf573 /support/pkgcheck/src/messages/mod.rs
parent0cc87411bcebcb1b0d2a3488d7a7093024b58650 (diff)
CTAN sync 202011300300
Diffstat (limited to 'support/pkgcheck/src/messages/mod.rs')
-rw-r--r--support/pkgcheck/src/messages/mod.rs72
1 files changed, 67 insertions, 5 deletions
diff --git a/support/pkgcheck/src/messages/mod.rs b/support/pkgcheck/src/messages/mod.rs
index 842c693718..65dcbc502a 100644
--- a/support/pkgcheck/src/messages/mod.rs
+++ b/support/pkgcheck/src/messages/mod.rs
@@ -260,7 +260,11 @@ macro_rules! e0011 {
macro_rules! e0012 {
($fmt:expr) => {
error_occured!();
- print!("{} File {} has CRLF line endings\n", msgid!("E0012"), $fmt);
+ print!(
+ "{} File {} has CRLF line endings\n",
+ msgid!("E0012"),
+ $fmt
+ );
};
}
@@ -326,6 +330,17 @@ macro_rules! e0019 {
};
}
+macro_rules! e0020 {
+ ($fmt:expr) => {
+ error_occured!();
+ print!(
+ "{} Unwanted directory `{}` detected in the top level directory of a TDS archive\n",
+ msgid!("E0020"),
+ $fmt
+ );
+ };
+}
+
macro_rules! e0021 {
($fmt1:expr, $fmt2:expr, $fmt3:expr) => {
error_occured!();
@@ -501,9 +516,39 @@ macro_rules! e0037 {
macro_rules! e0038 {
($fmt1:expr, $fmt2:expr, $fmt3:expr, $fmt4:expr) => {
error_occured!();
- print!("{} File {} has inconsistent line endings: CR={}, LF={}, CRLF={}\n", msgid!("E0038"), $fmt1, $fmt2, $fmt3, $fmt4);
+ print!(
+ "{} File {} has inconsistent line endings: CR={}, LF={}, CRLF={}\n",
+ msgid!("E0038"),
+ $fmt1,
+ $fmt2,
+ $fmt3,
+ $fmt4
+ );
+ };
+}
+
+macro_rules! e0039 {
+ () => {
+ error_occured!();
+ print!("{} No doc/ directory found\n", msgid!("E0039"));
};
}
+
+macro_rules! e0040 {
+ () => {
+ error_occured!();
+ print!("{} Too few top level directories in the TDS zip archive\n", msgid!("E0040"));
+ };
+}
+
+macro_rules! e0041 {
+ () => {
+ error_occured!();
+ print!("{} One or more map file found for the package but none of them is in a path starting with fonts/map/dvips\n", msgid!("E0041"));
+ };
+}
+
+
macro_rules! w0001 {
($fmt:expr) => {
print!(
@@ -570,14 +615,22 @@ macro_rules! w0006 {
macro_rules! w0007 {
($fmt:expr) => {
error_occured!();
- print!("{} Empty directory {} detected in TDS zip archive\n", msgid!("W0007"), $fmt);
+ print!(
+ "{} Empty directory {} detected in TDS zip archive\n",
+ msgid!("W0007"),
+ $fmt
+ );
};
}
macro_rules! w0008 {
($fmt:expr) => {
error_occured!();
- print!("{} Windows file {} has Unix line endings\n", msgid!("W0008"), $fmt);
+ print!(
+ "{} Windows file {} has Unix line endings\n",
+ msgid!("W0008"),
+ $fmt
+ );
};
}
@@ -643,7 +696,6 @@ macro_rules! i0007 {
};
}
-
pub fn explains(err: &str) {
let err_upp = err.to_ascii_uppercase();
match err_upp.as_str() {
@@ -674,6 +726,7 @@ pub fn explains(err: &str) {
"E0017" => e0017d(),
"E0018" => e0018d(),
"E0019" => e0019d(),
+ "E0020" => e0020d(),
"E0021" => e0021d(),
"E0022" => e0022d(),
"E0023" => e0023d(),
@@ -691,6 +744,9 @@ pub fn explains(err: &str) {
"E0036" => e0036d(),
"E0037" => e0037d(),
"E0038" => e0038d(),
+ "E0039" => e0039d(),
+ "E0040" => e0040d(),
+ "E0041" => e0041d(),
// "I0001" => i0001d!(),
"I0001" => i0001d(),
@@ -744,6 +800,7 @@ pub fn explains_all() {
explains("E0017");
explains("E0018");
explains("E0019");
+ explains("E0020");
explains("E0021");
explains("E0022");
explains("E0023");
@@ -759,6 +816,11 @@ pub fn explains_all() {
explains("E0034");
explains("E0035");
explains("E0036");
+ explains("E0037");
+ explains("E0038");
+ explains("E0039");
+ explains("E0040");
+ explains("E0041");
explains("I0001");
explains("I0002");