225 lines
11 KiB
TeX
225 lines
11 KiB
TeX
|
\section{Code-Stil}
|
||
|
|
||
|
\subsection{Server}
|
||
|
|
||
|
% Balkendiagram:
|
||
|
% zwei Balken: vorher, nachher
|
||
|
% eine Balken besteht aus verschiedenen Ebenen für jeden Linter Fehler
|
||
|
\definecolor{error00}{RGB}{255, 0, 0}
|
||
|
\definecolor{error01}{RGB}{204, 0, 0}
|
||
|
\definecolor{error02}{RGB}{153, 0, 0}
|
||
|
\definecolor{error03}{RGB}{102, 0, 0}
|
||
|
\definecolor{error04}{RGB}{51, 0, 0}
|
||
|
\definecolor{error05}{RGB}{25, 0, 0}
|
||
|
|
||
|
\definecolor{warning00}{RGB}{255, 255, 0}
|
||
|
\definecolor{warning01}{RGB}{255, 215, 0}
|
||
|
\definecolor{warning02}{RGB}{139, 117, 0}
|
||
|
\definecolor{warning03}{RGB}{238, 201, 0}
|
||
|
\definecolor{warning04}{RGB}{255, 215, 0}
|
||
|
\definecolor{warning05}{RGB}{238, 238, 0}
|
||
|
\definecolor{warning06}{RGB}{139, 139, 0}
|
||
|
\definecolor{warning07}{RGB}{255, 255, 0}
|
||
|
\definecolor{warning08}{RGB}{238, 201, 0}
|
||
|
\definecolor{warning09}{RGB}{205, 173, 0}
|
||
|
\definecolor{warning10}{RGB}{205, 205, 0}
|
||
|
\definecolor{warning11}{RGB}{205, 173, 0}
|
||
|
\definecolor{warning12}{RGB}{238, 238, 0}
|
||
|
\definecolor{warning13}{RGB}{139, 117, 0}
|
||
|
\definecolor{warning14}{RGB}{139, 139, 0}
|
||
|
|
||
|
\vspace{-2cm}
|
||
|
\begin{tikzpicture}
|
||
|
\begin{axis}[
|
||
|
title={Code-Stil-Anmerkungen durch Checkstyle Sun-Checks},
|
||
|
ybar stacked, ymin=0,
|
||
|
bar width=10mm,
|
||
|
symbolic x coords={Vorher,Nachher},
|
||
|
legend style={
|
||
|
at={(1.3,0.5)},
|
||
|
cells={anchor=west},
|
||
|
anchor=west
|
||
|
},
|
||
|
xtick=data,
|
||
|
xticklabel style={text width=2cm,align=center},
|
||
|
nodes near coords={}
|
||
|
]
|
||
|
|
||
|
\addplot [fill=error02] coordinates { ({Vorher}, 285 ) ({Nachher}, 0)}; % (sizes) LineLength
|
||
|
\addplot [fill=error00] coordinates { ({Vorher}, 143 ) ({Nachher}, 0)}; % (misc) FinalParameters
|
||
|
\addplot [fill=error03] coordinates { ({Vorher}, 101 ) ({Nachher}, 0)}; % (javadoc) JavadocVariable
|
||
|
\addplot [fill=error04] coordinates { ({Vorher}, 83 ) ({Nachher}, 0)}; % (javadoc) JavadocStyle
|
||
|
\addplot [fill=error02] coordinates { ({Vorher}, 43 ) ({Nachher}, 0)}; % (design) DesignForExtension
|
||
|
\addplot [fill=error01] coordinates { ({Vorher}, 39 ) ({Nachher}, 0)}; % (javadoc) MissingJavadocMethod
|
||
|
\addplot [fill=error01] coordinates { ({Vorher}, 26 ) ({Nachher}, 0)}; % (regexp) RegexpSingleline
|
||
|
\addplot [fill=error02] coordinates { ({Vorher}, 15 ) ({Nachher}, 0)}; % (whitespace) WhitespaceAround
|
||
|
\addplot [fill=error01] coordinates { ({Vorher}, 13 ) ({Nachher}, 0)}; % (javadoc) JavadocPackage
|
||
|
\addplot [fill=error03] coordinates { ({Vorher}, 10 ) ({Nachher}, 0)}; % (whitespace) OperatorWrap
|
||
|
\addplot [fill=error00] coordinates { ({Vorher}, 10 ) ({Nachher}, 0)}; % (javadoc) JavadocType
|
||
|
\addplot [fill=error05] coordinates { ({Vorher}, 7 ) ({Nachher}, 0)}; % (imports) AvoidStarImport
|
||
|
\addplot [fill=error05] coordinates { ({Vorher}, 6 ) ({Nachher}, 0)}; % (coding) MagicNumber
|
||
|
\addplot [fill=error05] coordinates { ({Vorher}, 4 ) ({Nachher}, 0)}; % (javadoc) JavadocMethod
|
||
|
\addplot [fill=error04] coordinates { ({Vorher}, 3 ) ({Nachher}, 0)}; % (coding) HiddenField
|
||
|
\addplot [fill=error02] coordinates { ({Vorher}, 2 ) ({Nachher}, 0)}; % (javadoc) InvalidJavadocPosition
|
||
|
\addplot [fill=error00] coordinates { ({Vorher}, 2 ) ({Nachher}, 0)}; % (blocks) RightCurly
|
||
|
\addplot [fill=error03] coordinates { ({Vorher}, 1 ) ({Nachher}, 0)}; % (whitespace) WhitespaceAfter
|
||
|
\addplot [fill=error04] coordinates { ({Vorher}, 1 ) ({Nachher}, 0)}; % (whitespace) FileTabCharacter
|
||
|
\addplot [fill=error04] coordinates { ({Vorher}, 1 ) ({Nachher}, 0)}; % (misc) NewlineAtEndOfFile
|
||
|
\addplot [fill=error01] coordinates { ({Vorher}, 1 ) ({Nachher}, 0)}; % (misc) ArrayTypeStyle
|
||
|
\addplot [fill=error00] coordinates { ({Vorher}, 1 ) ({Nachher}, 0)}; % (imports) UnusedImports
|
||
|
\addplot [fill=error03, point meta=y,nodes near coords,nodes near coords align={anchor=south}] coordinates { ({Vorher}, 2 ) ({Nachher}, 1)}; % (design) HideUtilityClassConstructor
|
||
|
|
||
|
\legend{
|
||
|
sizes: LineLength,
|
||
|
misc: FinalParameters,
|
||
|
javadoc: JavadocVariable,
|
||
|
javadoc: JavadocStyle,
|
||
|
design: DesignForExtension,
|
||
|
javadoc: MissingJavadocMethod,
|
||
|
regexp: RegexpSingleline,
|
||
|
whitespace: WhitespaceAround,
|
||
|
javadoc: JavadocPackage,
|
||
|
whitespace: OperatorWrap,
|
||
|
javadoc: JavadocType,
|
||
|
imports: AvoidStarImport,
|
||
|
coding: MagicNumber,
|
||
|
javadoc: JavadocMethod,
|
||
|
coding: HiddenField,
|
||
|
javadoc: InvalidJavadocPosition,
|
||
|
blocks: RightCurly,
|
||
|
whitespace: WhitespaceAfter,
|
||
|
whitespace: FileTabCharacter,
|
||
|
misc: NewlineAtEndOfFile,
|
||
|
misc: ArrayTypeStyle,
|
||
|
imports: UnusedImports,
|
||
|
design: HideUtilityClassConstructor,
|
||
|
}
|
||
|
\end{axis}
|
||
|
\end{tikzpicture}
|
||
|
|
||
|
\begin{tabularx}{\textwidth}{X | c | c}
|
||
|
Regel & Vorher & Nacher \\ \hline
|
||
|
sizes: LineLength & 285 & 0 \\
|
||
|
misc: FinalParameters & 143 & 0 \\
|
||
|
javadoc: JavadocVariable & 101 & 0 \\
|
||
|
javadoc: JavadocStyle & 83 & 0 \\
|
||
|
design: DesignForExtension & 43 & 0 \\
|
||
|
javadoc: MissingJavadocMethod & 39 & 0 \\
|
||
|
regexp: RegexpSingleline & 26 & 0 \\
|
||
|
whitespace: WhitespaceAround & 15 & 0 \\
|
||
|
javadoc: JavadocPackage & 13 & 0 \\
|
||
|
whitespace: OperatorWrap & 10 & 0 \\
|
||
|
javadoc: JavadocType & 10 & 0 \\
|
||
|
imports: AvoidStarImport & 7 & 0 \\
|
||
|
coding: MagicNumber & 6 & 0 \\
|
||
|
javadoc: JavadocMethod & 4 & 0 \\
|
||
|
coding: HiddenField & 3 & 0 \\
|
||
|
javadoc: InvalidJavadocPosition & 2 & 0 \\
|
||
|
blocks: RightCurly & 2 & 0 \\
|
||
|
whitespace: WhitespaceAfter & 1 & 0 \\
|
||
|
whitespace: FileTabCharacter & 1 & 0 \\
|
||
|
misc: NewlineAtEndOfFile & 1 & 0 \\
|
||
|
misc: ArrayTypeStyle & 1 & 0 \\
|
||
|
imports: UnusedImports & 1 & 0 \\
|
||
|
design: HideUtilityClassConstructor & 2 & 1 \\
|
||
|
\end{tabularx}
|
||
|
|
||
|
\subsection{Dashboard}
|
||
|
|
||
|
\vspace{-1.5cm}
|
||
|
\begin{tikzpicture}
|
||
|
\begin{axis}[
|
||
|
title={Code-Stil-Anmerkungen durch ESLint},
|
||
|
ybar stacked, ymin=0,
|
||
|
bar width=10mm,
|
||
|
symbolic x coords={Vorher,Nachher},
|
||
|
legend style={
|
||
|
at={(1.1,0.5)},
|
||
|
cells={anchor=west},
|
||
|
anchor=west
|
||
|
},
|
||
|
xtick=data,
|
||
|
xticklabel style={text width=2cm,align=center},
|
||
|
nodes near coords={}
|
||
|
]
|
||
|
|
||
|
\addplot [fill=error00] coordinates { ({Vorher}, 26 ) ({Nachher}, 0)}; % error vue/html-indent
|
||
|
\addplot [fill=error01] coordinates { ({Vorher}, 17 ) ({Nachher}, 0)}; % error vue/script-indent
|
||
|
\addplot [fill=error02] coordinates { ({Vorher}, 6 ) ({Nachher}, 0)}; % error vue/require-v-for-key
|
||
|
\addplot [fill=error03] coordinates { ({Vorher}, 5 ) ({Nachher}, 0)}; % error vue/multi-word-component-names
|
||
|
\addplot [fill=error04] coordinates { ({Vorher}, 1 ) ({Nachher}, 0)}; % error vue/valid-v-for
|
||
|
\addplot [fill=error05] coordinates { ({Vorher}, 1 ) ({Nachher}, 0)}; % error vue/valid-template-root
|
||
|
\addplot [fill=warning00] coordinates { ({Vorher}, 125 ) ({Nachher}, 0)}; % warning vue/max-attributes-per-line
|
||
|
\addplot [fill=warning01] coordinates { ({Vorher}, 34 ) ({Nachher}, 0)}; % warning vue/attributes-order
|
||
|
\addplot [fill=warning02] coordinates { ({Vorher}, 26 ) ({Nachher}, 0)}; % warning vue/singleline-html-element-content-newline
|
||
|
\addplot [fill=warning03] coordinates { ({Vorher}, 12 ) ({Nachher}, 0)}; % warning vue/require-default-prop
|
||
|
\addplot [fill=warning04] coordinates { ({Vorher}, 12 ) ({Nachher}, 0)}; % warning vue/html-self-closing
|
||
|
\addplot [fill=warning05] coordinates { ({Vorher}, 11 ) ({Nachher}, 0)}; % warning vue/first-attribute-linebreak
|
||
|
\addplot [fill=warning06] coordinates { ({Vorher}, 10 ) ({Nachher}, 0)}; % warning vue/html-closing-bracket-newline
|
||
|
\addplot [fill=warning07] coordinates { ({Vorher}, 8 ) ({Nachher}, 0)}; % warning vue/multiline-html-element-content-newline
|
||
|
\addplot [fill=warning08] coordinates { ({Vorher}, 5 ) ({Nachher}, 0)}; % warning vue/html-closing-bracket-spacing
|
||
|
\addplot [fill=warning09] coordinates { ({Vorher}, 3 ) ({Nachher}, 0)}; % warning vue/require-prop-types
|
||
|
\addplot [fill=warning10] coordinates { ({Vorher}, 3 ) ({Nachher}, 0)}; % warning vue/attribute-hyphenation
|
||
|
\addplot [fill=warning11] coordinates { ({Vorher}, 2 ) ({Nachher}, 0)}; % warning vue/html-self-closing
|
||
|
\addplot [fill=warning12] coordinates { ({Vorher}, 1 ) ({Nachher}, 0)}; % warning vue/v-on-event-hyphenation
|
||
|
\addplot [fill=warning13] coordinates { ({Vorher}, 1 ) ({Nachher}, 0)}; % warning vue/no-v-html
|
||
|
\addplot +[fill=warning14, point meta=y,nodes near coords,nodes near coords align={anchor=south}]coordinates { ({Vorher}, 1 ) ({Nachher}, 1)}; % warning vue/mustache-interpolation-spacing
|
||
|
|
||
|
|
||
|
\legend{
|
||
|
error: html-indent,
|
||
|
error: script-indent,
|
||
|
error: require-v-for-key,
|
||
|
error: multi-word-component-names,
|
||
|
error: valid-v-for,
|
||
|
error: valid-template-root,
|
||
|
warning: max-attributes-per-line,
|
||
|
warning: attributes-order,
|
||
|
warning: singleline-html-element-content-newline,
|
||
|
warning: require-default-prop,
|
||
|
warning: html-self-closing,
|
||
|
warning: first-attribute-linebreak,
|
||
|
warning: html-closing-bracket-newline,
|
||
|
warning: multiline-html-element-content-newline,
|
||
|
warning: html-closing-bracket-spacing,
|
||
|
warning: require-prop-types,
|
||
|
warning: attribute-hyphenation,
|
||
|
warning: html-self-closing,
|
||
|
warning: v-on-event-hyphenation,
|
||
|
warning: mustache-interpolation-spacing,
|
||
|
warning: no-v-html,
|
||
|
}
|
||
|
\end{axis}
|
||
|
\end{tikzpicture}
|
||
|
|
||
|
\begin{tabularx}{\textwidth}{X | c | c}
|
||
|
Regel & Vorher & Nachher \\ \hline
|
||
|
error: html-indent & 26 & 0 \\
|
||
|
error: script-indent & 17 & 0 \\
|
||
|
error: require-v-for-key & 6 & 0 \\
|
||
|
error: multi-word-component-names & 5 & 0 \\
|
||
|
error: valid-v-for & 1 & 0 \\
|
||
|
error: valid-template-root & 1 & 0 \\
|
||
|
warning: max-attributes-per-line & 125 & 0 \\
|
||
|
warning: attributes-order & 34 & 0 \\
|
||
|
warning: singleline-html-element-content-newline & 26 & 0 \\
|
||
|
warning: require-default-prop & 12 & 0 \\
|
||
|
warning: html-self-closing & 12 & 0 \\
|
||
|
warning: first-attribute-linebreak & 11 & 0 \\
|
||
|
warning: html-closing-bracket-newline & 10 & 0 \\
|
||
|
warning: multiline-html-element-content-newline & 8 & 0 \\
|
||
|
warning: html-closing-bracket-spacing & 5 & 0 \\
|
||
|
warning: require-prop-types & 3 & 0 \\
|
||
|
warning: attribute-hyphenation & 3 & 0 \\
|
||
|
warning: html-self-closing & 2 & 0 \\
|
||
|
warning: v-on-event-hyphenation & 1 & 0 \\
|
||
|
warning: mustache-interpolation-spacing & 1 & 0 \\
|
||
|
warning: no-v-html & 1 & 1 \\
|
||
|
\end{tabularx}
|
||
|
|
||
|
Das Attribut \texttt{v-html} wird genutzt, um das Hilfe-Popup zu übersetzen. Die
|
||
|
Übersetzungen für jede Sprache ist in einer separaten \texttt{HTML}-Datei gespeichert.
|
||
|
Dies gibt dem Übersetzer einen großen Spielraum dafür, welche Inhalte in den Hilfe-Popups
|
||
|
ausgegeben werden können.
|
||
|
|