From 9cde236bc8da2d7f7bc9fe6ead7ff475deeb5b03 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Thu, 7 Sep 2017 11:28:36 +0100 Subject: [PATCH] Add comment explaining lint errors vs compile log errors --- .../web/public/coffee/ide/editor/directives/aceEditor.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor.coffee index 7660178182..0b22e75221 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor.coffee @@ -376,6 +376,10 @@ define [ $rootScope.hasLintingError = false session.on('changeAnnotation', () -> + # Both linter errors and compile logs are set as error annotations, + # however when the user types something, the compile logs are + # replaced with linter errors. When we check for lint errors before + # autocompile we are guaranteed to get linter errors hasErrors = session .getAnnotations() .filter((annotation) -> annotation.type == 'error')