Skip to content
This repository was archived by the owner on Jul 3, 2024. It is now read-only.

Commit b6609fe

Browse files
committed
Add CI support for CSS and HTML
Now all CSS and HTML files are linted during each CI run. Related-Issues: #11 Signed-off-by: Matt Langbehn <[email protected]>
1 parent dcc85ea commit b6609fe

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

.travis.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ env:
2020
- TEST_RUN="./tests/test-docker.sh"
2121

2222
before_install:
23-
- npm install eslint
23+
- npm install eslint html-lint csslint
2424
- sudo pip install yamllint
2525

2626
install: true
2727

2828
before_script:
29+
- "./tests/test-csslint.sh"
2930
- "./tests/test-eslint.sh"
31+
- "./tests/test-html-lint.sh"
3032
- "./tests/test-shellcheck.sh"
3133
- "./tests/test-yamllint.sh"
3234

tests/test-csslint.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash -e
2+
3+
# shellcheck disable=SC1090
4+
source "$(dirname "$0")"/../scripts/resources.sh
5+
6+
if find . -path ./node_modules -prune -o -name '*.css' -print0 | xargs -n1 -0 ./node_modules/.bin/csslint --ignore=order-alphabetical; then
7+
test_passed "$0"
8+
else
9+
test_failed "$0"
10+
fi

tests/test-html-lint.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash -e
2+
3+
# shellcheck disable=SC1090
4+
source "$(dirname "$0")"/../scripts/resources.sh
5+
6+
if find . -path ./node_modules -prune -o \( -name '*.htm' -o -name '*.html' \) -print0 | xargs -n1 -0 -I % ./node_modules/.bin/html-lint % --verbose --strict; then
7+
test_passed "$0"
8+
else
9+
test_failed "$0"
10+
fi

tests/test-yamllint.sh

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# shellcheck disable=SC1090
44
source "$(dirname "$0")"/../scripts/resources.sh
55

6-
# IGNORE node_modules
76
if find . -path ./node_modules -prune -o \( -name '*.yml' -o -name '*.yaml' \) -print0 | xargs -n1 -0 yamllint -c .yamllint.yml; then
87
test_passed "$0"
98
else

0 commit comments

Comments
 (0)