mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix and create code-smell test for line endings.
This commit is contained in:
parent
66a0b1475f
commit
469c4a106b
3 changed files with 24 additions and 11 deletions
|
@ -174,11 +174,11 @@ h3 {
|
|||
|
||||
h3, h4, h5, h6 {
|
||||
color: #073642;
|
||||
border-bottom: 1px dotted #eee;
|
||||
border-bottom: 1px dotted #eee;
|
||||
}
|
||||
|
||||
div.body h1 a, div.body h2 a, div.body h3 a, div.body h4 a, div.body h5 a, div.body h6 a {
|
||||
color: #657B83!important;
|
||||
color: #657B83!important;
|
||||
}
|
||||
|
||||
h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor {
|
||||
|
@ -214,8 +214,8 @@ a.headerlink:hover {
|
|||
|
||||
|
||||
cite, code, tt {
|
||||
font-family: 'Source Code Pro', monospace;
|
||||
font-size: 0.9em;
|
||||
font-family: 'Source Code Pro', monospace;
|
||||
font-size: 0.9em;
|
||||
letter-spacing: 0.01em;
|
||||
background-color: #eeeff2;
|
||||
font-style: normal;
|
||||
|
@ -233,17 +233,17 @@ hr {
|
|||
}
|
||||
|
||||
pre {
|
||||
font-family: 'Source Code Pro', monospace;
|
||||
font-family: 'Source Code Pro', monospace;
|
||||
font-style: normal;
|
||||
font-size: 0.9em;
|
||||
font-size: 0.9em;
|
||||
letter-spacing: 0.015em;
|
||||
line-height: 120%;
|
||||
padding: 0.7em;
|
||||
white-space: pre-wrap; /* css-3 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
white-space: pre-wrap; /* css-3 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
}
|
||||
|
||||
pre a {
|
||||
|
|
12
test/sanity/code-smell/line-endings.sh
Executable file
12
test/sanity/code-smell/line-endings.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
grep -RIPl '\r' . 2>/dev/null \
|
||||
--exclude-dir .git \
|
||||
| grep -v -F \
|
||||
-e './test/integration/targets/win_regmerge/templates/win_line_ending.j2'
|
||||
|
||||
if [ $? -ne 1 ]; then
|
||||
printf 'One or more file(s) listed above have invalid line endings.\n'
|
||||
printf 'Make sure all files use "\\n" for line endings instead of "\\r\\n".\n'
|
||||
exit 1
|
||||
fi
|
|
@ -21,6 +21,7 @@ test/sanity/code-smell/use-compat-six.sh lib
|
|||
test/sanity/code-smell/boilerplate.sh
|
||||
test/sanity/code-smell/required-and-default-attributes.sh
|
||||
test/sanity/code-smell/shebang.sh
|
||||
test/sanity/code-smell/line-endings.sh
|
||||
|
||||
shellcheck \
|
||||
test/integration/targets/*/*.sh \
|
||||
|
|
Loading…
Reference in a new issue