Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6529ae9

Browse filesBrowse files
dario-piotrowicztargos
authored andcommitted
tools: add message on auto-fixing js lint issues in gh workflow
PR-URL: #59128 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 982b03e commit 6529ae9
Copy full SHA for 6529ae9

File tree

Expand file treeCollapse file tree

1 file changed

+25
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+25
-1
lines changed
Open diff view settings
Collapse file

‎.github/workflows/linters.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/linters.yml
+25-1Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,31 @@ jobs:
103103
- name: Environment Information
104104
run: npx envinfo
105105
- 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
107131
- name: Get release version numbers
108132
if: ${{ github.event.pull_request && github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch }}
109133
id: get-released-versions

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.