| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 982b03e commit 6529ae9
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -103,7 +103,31 @@ jobs: | |||
| 103 | 103 | - name: Environment Information | |
| 104 | 104 | run: npx envinfo | |
| 105 | 105 | - name: Lint JavaScript files | |
| 106 | - run: NODE=$(command -v node) make lint-js | ||
| 106 | + run: | | ||
| 107 | + set +e | ||
| 108 | + NODE=$(command -v node) make lint-js | ||
| 109 | + EXIT_CODE="$?" | ||
| 110 | + if [ "$EXIT_CODE" != "0" ]; then | ||
| 111 | + echo | ||
| 112 | + echo 'ERROR: The JavaScript lint validation failed (the errors are logged above).' | ||
| 113 | + echo ' Please fix the lint errors.' | ||
| 114 | + if NODE=$(command -v node) make lint-js-fix > /dev/null 2>&1; then | ||
| 115 | + echo ' Run:' | ||
| 116 | + echo ' make lint-js-fix' | ||
| 117 | + echo ' to fix the lint issues.' | ||
| 118 | + git --no-pager diff | ||
| 119 | + elif git diff --quiet --exit-code; then | ||
| 120 | + echo ' None of the issue is auto-fixable, so manual fixes for' | ||
| 121 | + echo ' all of the issues are required.' | ||
| 122 | + else | ||
| 123 | + echo ' Run:' | ||
| 124 | + echo ' make lint-js-fix' | ||
| 125 | + echo ' to fix the auto-fixable lint issues.' | ||
| 126 | + echo ' Note that some manual fixes are also required.' | ||
| 127 | + fi | ||
| 128 | + echo | ||
| 129 | + exit "$EXIT_CODE" | ||
| 130 | + fi | ||
| 107 | 131 | - name: Get release version numbers | |
| 108 | 132 | if: ${{ github.event.pull_request && github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch }} | |
| 109 | 133 | id: get-released-versions | |
| Back | FazBrowse Home | New Git URL |
0 commit comments