Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

bug 1354243: add macro linter (for JSON "macros") #159

Merged
merged 2 commits into from Apr 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions Jenkinsfile
Expand Up @@ -8,10 +8,11 @@ node {
}

stage('Test') {
sh 'make lint-macros'
try {
sh 'make test VERSION=latest TEST_RUN_ARGS="--reporter=junit --output=junit-results"'
sh 'make test VERSION=latest TEST_RUN_ARGS="--reporter=junit --output=junit-results"'
} finally {
junit 'junit-results/*.xml'
junit 'junit-results/*.xml'
}
}

Expand All @@ -27,10 +28,11 @@ node {
}

stage('Test') {
sh 'make lint-macros'
try {
sh 'make test TEST_RUN_ARGS="--reporter=junit --output=junit-results"'
sh 'make test TEST_RUN_ARGS="--reporter=junit --output=junit-results"'
} finally {
junit 'junit-results/*.xml'
junit 'junit-results/*.xml'
}
}

Expand Down
2 changes: 2 additions & 0 deletions Makefile
Expand Up @@ -34,6 +34,8 @@ lint:
lint-macros:
docker run ${DOCKER_RUN_ARGS} ${IMAGE} \
/node_modules/.bin/ejslint "macros/**/*.ejs"
docker run ${DOCKER_RUN_ARGS} ${IMAGE} \
/node_modules/.bin/jsonlint-cli "macros/**/*.json"

bash:
docker run -it ${DOCKER_RUN_ARGS} ${IMAGE} bash
Expand Down
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -65,7 +65,7 @@ summary:
login, create a new document that uses your new or modified macro(s), and
test that it renders correctly.

* Run the macro linter to check for JavaScript syntax errors:
* Run the macro linter to check for syntax errors:

make lint-macros

Expand Down Expand Up @@ -138,7 +138,8 @@ more before you run your local development version of MDN.
* `make test`
* To check your code (using JSHint):
* `make lint`
* To check for JavaScript syntax errors within all macros (using ejslint):
* To check for JavaScript syntax errors within the EJS macros (using `ejslint`)
and JSON syntax errors within the JSON data files (using `jsonlint-cli`):
* `make lint-macros`
* To run the service:
* `make run`
Expand Down
34 changes: 0 additions & 34 deletions macros/CustomSampleCSS.css

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion macros/L10n-HTML.json
Expand Up @@ -33,7 +33,7 @@
},
"tagOmission": {
"en-US": "Tag omission",
"ca" : "Omissió de l\'etiqueta",
"ca" : "Omissió de l'etiqueta",
"de" : "Tagauslassung",
"es" : "Omisión de la etiqueta",
"fr" : "Omission de balises",
Expand Down