Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
build: run cpplint even if jslint failed
from now lint target should run both linters
even if one of them failed.
  • Loading branch information
krydos committed Apr 7, 2017
commit 383cc0869e21399ab455d1a65cff87e15edf3f30
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,11 @@ cpplint:
@$(PYTHON) tools/check-imports.py

ifneq ("","$(wildcard tools/eslint/lib/eslint.js)")
lint: jslint cpplint
lint:
EXIT_STATUS=0 ; \
$(MAKE) jslint || EXIT_STATUS=$$? ; \
$(MAKE) cpplint || EXIT_STATUS=$$? ; \
exit $$EXIT_STATUS
CONFLICT_RE=^>>>>>>> [0-9A-Fa-f]+|^<<<<<<< [A-Za-z]+
lint-ci: jslint-ci cpplint

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be updated too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aqrln I've updated lint with idea to get all the lint error when I run lint or test locally.
On CI it is enough to know the fact that something (and what exactly) failed. That's why I didn't touch lint-ci. Do you think it should be updated also?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it can probably be left alone since CI doesn't show the lint output anyway and as @krydos said, it's enough to let everyone know linting of any kind failed.

@if ! ( grep -IEqrs "$(CONFLICT_RE)" benchmark deps doc lib src test tools ) \
Expand Down