Debian Codegraph @

texmf-dist/source/latex/fail-fast/fail-fast.dtx

raw
1 % \iffalse meta-comment
2 % (The MIT License)
3 %
4 % Copyright (c) 2023 Yegor Bugayenko
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 NONINFRINGEMENT. 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.
23 % \fi
24
25 % \CheckSum{0}
26 %
27 % \CharacterTable
28 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
29 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
30 % Digits \0\1\2\3\4\5\6\7\8\9
31 % Exclamation \! Double quote \" Hash (number) \#
32 % Dollar \$ Percent \% Ampersand \&
33 % Acute accent \' Left paren \( Right paren \)
34 % Asterisk \* Plus \+ Comma \,
35 % Minus \- Point \. Solidus \/
36 % Colon \: Semicolon \; Less than \<
37 % Equals \= Greater than \> Question mark \?
38 % Commercial at \@ Left bracket \[ Backslash \\
39 % Right bracket \] Circumflex \^ Underscore \_
40 % Grave accent \` Left brace \{ Vertical bar \|
41 % Right brace \} Tilde \~}
42
43 % \GetFileInfo{fail-fast.dtx}
44 % \DoNotIndex{\endgroup,\begingroup,\let,\else,\fi,\newcommand,\newenvironment}
45
46 % \iffalse
47 %<*driver>
48 \ProvidesFile{fail-fast.dtx}
49 %</driver>
50 %<package>\NeedsTeXFormat{LaTeX2e}
51 %<package>\ProvidesPackage{fail-fast}
52 %<*package>
53 [2023-07-04 0.0.2 Turns warnings into errors]
54 %</package>
55 %<*driver>
56 \documentclass{ltxdoc}
57 \usepackage[T1]{fontenc}
58 \usepackage[tt=false,type1=true]{libertine}
59 \usepackage{microtype}
60 \AddToHook{env/verbatim/begin}{\microtypesetup{protrusion=false}}
61 \usepackage{href-ul}
62 \usepackage[dtx,runs=2]{docshots}
63 \PageIndex
64 \EnableCrossrefs
65 \CodelineIndex
66 \RecordChanges
67 \begin{document}
68 \DocInput{fail-fast.dtx}
69 \PrintChanges
70 \PrintIndex
71 \end{document}
72 %</driver>
73 % \fi
74
75 % \title{|fail-fast|: \LaTeX{} Package \\ that turns warnings into errors\thanks{The sources are in GitHub at \href{https://github.com/yegor256/fail-fast}{yegor256/fail-fast}}}
76 % \author{Yegor Bugayenko \\ \texttt{[email protected]}}
77 % \date{\filedate, \fileversion}
78 %
79 % \maketitle
80 %
81 % \section{Introduction}
82 %
83 % This package, when included, turns warnings into errors, thus making the build more fragile. This
84 % may be a good practice if you care about the quality of your documents and want to keep
85 % the quality high, not losing it between changes:
86 % \begin{docshot}
87 % \documentclass{article}
88 % \usepackage{fail-fast}
89 % \pagestyle{empty}
90 % \begin{document}
91 % Here goes your content.
92 % \end{document}
93 % \end{docshot}
94
95 % The development of this package was motivated by this
96 % \href{https://stackoverflow.com/questions/3244908}{Stack Overflow question}.
97
98 % \StopEventually{}
99
100 % \section{Implementation}
101 % \changes{v0.0.1}{2023/07/01}{Initial version, which turns warnings into errors}
102 % \changes{v0.0.2}{2023/07/04}{Minor changes in the documentation}
103
104 % \begin{macrocode}
105 \message{fail-fast: Starting from now all warnings
106 are reported as errors^^J}%
107 \renewcommand{\GenericWarning}[2]{%
108 \GenericError{#1}{#2}{}{This was a warning, now an error}%
109 }
110 % \end{macrocode}
111
112 % \Finale
113
114 %\clearpage
115 %
116 %\PrintChanges
117 %\clearpage
118 %\PrintIndex