Ver código fonte

HPCC-20115 Installed BundleBase.ecl causes syntax check warning

BOM markers in signed files cause issues. As a simple way to avoid the issue,
remove BOM from all std library files. Also downgrade the warning to
"information" category.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 7 anos atrás
pai
commit
c5dc4313e2

+ 1 - 1
ecl/hql/hqllex.l

@@ -1887,7 +1887,7 @@ FUNCTIONMACRO|MACRO {
 \357\273\277        {
                         setupdatepos;
                         if (lexer->yyPosition != 3)
-                            lexer->reportWarning(CategorySyntax, returnToken, ERR_STRING_ILLDELIMITER, "Misplaced BOM - should be at the start of the file");
+                            lexer->reportWarning(CategoryInformation, returnToken, ERR_STRING_ILLDELIMITER, "Misplaced BOM - should be at the start of the file");
                     }
 
 "("                 {

+ 2 - 2
ecllibrary/std/BundleBase.ecl

@@ -1,4 +1,4 @@
-/*##############################################################################
+/*##############################################################################
 ## HPCC SYSTEMS software Copyright (C) 2013 HPCC Systems®.  All rights reserved.
 ############################################################################## */
 
@@ -71,4 +71,4 @@ EXPORT BundleBase := MODULE,VIRTUAL
    */
   EXPORT STRING PlatformVersion := '';
 
-END;
+END;

+ 1 - 1
ecllibrary/std/Uni.ecl

@@ -1,4 +1,4 @@
-/*##############################################################################
+/*##############################################################################
 ## HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.  All rights reserved.
 ############################################################################## */
 

+ 1 - 1
ecllibrary/teststd/BLAS/Test_dasum.ecl

@@ -1,4 +1,4 @@
-IMPORT Std.BLAS AS BLAS;
+IMPORT Std.BLAS AS BLAS;
 SET OF REAL8 init1 := [1.0, 2.0, -3.0, 4.0, 5.0, -6.0, 7.0, 8.0, 9.0];
 
 EXPORT Test_dasum := MODULE

+ 1 - 1
ecllibrary/teststd/BLAS/Test_extract_tri.ecl

@@ -1,4 +1,4 @@
-IMPORT Std.BLAS AS BLAS;
+IMPORT Std.BLAS AS BLAS;
 IMPORT BLAS.Types;
 Diagonal := Types.Diagonal;
 Triangle := Types.Triangle;

+ 2 - 2
ecllibrary/teststd/uni/TestCountWords.ecl

@@ -1,4 +1,4 @@
-/*##############################################################################
+/*##############################################################################
 ## HPCC SYSTEMS software Copyright (C) 2017 HPCC Systems®.  All rights reserved.
 ############################################################################## */
 
@@ -72,4 +72,4 @@ EXPORT TestCountWords := MODULE
     EXPORT Test40 := ASSERT(Uni.CountWords(U'𐐀xx𐐀𐐀',U'x') = 2);
   END;
 
-END;
+END;

+ 1 - 1
ecllibrary/teststd/uni/TestEndsWith.ecl

@@ -1,4 +1,4 @@
-/*##############################################################################
+/*##############################################################################
 ## HPCC SYSTEMS software Copyright (C) 2017 HPCC Systems®.  All rights reserved.
 ############################################################################## */
 

+ 2 - 2
ecllibrary/teststd/uni/TestExcludeFirstWord.ecl

@@ -1,4 +1,4 @@
-/*##############################################################################
+/*##############################################################################
 ## HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.  All rights reserved.
 ############################################################################## */
 
@@ -49,4 +49,4 @@ EXPORT TestExcludeFirstWord := MODULE
     EXPORT Test20 := ASSERT(Uni.ExcludeFirstWord(U'קָמָץ שִׁי״ן')+U'!' = U'שִׁי״ן!');
   END;
 
-END;
+END;

+ 1 - 1
ecllibrary/teststd/uni/TestExcludeNthWord.ecl

@@ -1,4 +1,4 @@
-/*##############################################################################
+/*##############################################################################
      HPCC SYSTEMS software Copyright (C) 2017 HPCC Systems®.
  
      Licensed under the Apache License, Version 2.0 (the "License");

+ 1 - 1
ecllibrary/teststd/uni/TestFindCount.ecl

@@ -1,4 +1,4 @@
-/*##############################################################################
+/*##############################################################################
 ## HPCC SYSTEMS software Copyright (C) 2017 HPCC Systems®.  All rights reserved.
 ############################################################################## */
 

+ 1 - 1
ecllibrary/teststd/uni/TestRemoveSuffix.ecl

@@ -1,4 +1,4 @@
-/*##############################################################################
+/*##############################################################################
 ## HPCC SYSTEMS software Copyright (C) 2017 HPCC Systems®.  All rights reserved.
 ############################################################################## */
 

+ 1 - 1
ecllibrary/teststd/uni/TestSplitWords.ecl

@@ -1,4 +1,4 @@
-/*##############################################################################
+/*##############################################################################
 ## HPCC SYSTEMS software Copyright (C) 2017 HPCC Systems®.  All rights reserved.
 ############################################################################## */
 

+ 2 - 2
ecllibrary/teststd/uni/TestStartsWith.ecl

@@ -1,4 +1,4 @@
-/*##############################################################################
+/*##############################################################################
 ## HPCC SYSTEMS software Copyright (C) 2017 HPCC Systems®.  All rights reserved.
 ############################################################################## */
 
@@ -97,4 +97,4 @@ EXPORT TestStartsWith := MODULE
     EXPORT Test46 := ASSERT(Uni.StartsWith(t1,t2,'NFD') = TRUE);
   END;
 
-END;
+END;

+ 1 - 1
ecllibrary/teststd/uni/TestTranslate.ecl

@@ -1,4 +1,4 @@
-/*##############################################################################
+/*##############################################################################
 ## HPCC SYSTEMS software Copyright (C) 2017 HPCC Systems®.  All rights reserved.
 ############################################################################## */