From 17f8d4e5a36f5c4bd020ce9163f5b1db62679e2c Mon Sep 17 00:00:00 2001 From: laurentlb Date: Thu, 24 May 2018 07:32:52 -0700 Subject: Reject files when the first line is indented. A bug in the lexer ignored indentation on the first line of a file. This now causes an error. Also, remove the COMMENT token from the lexer. Comments are now accessed separately. This will allow further optimizations in the lexer. It also aligns the code a bit more with the Go implementation. RELNOTES[INC]: Indentation on the first line of a file was previously ignored. This is now fixed. PiperOrigin-RevId: 197889775 --- .../java/com/google/devtools/build/lib/pkgcache/PackageCacheTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/test/java/com/google/devtools/build/lib/pkgcache') diff --git a/src/test/java/com/google/devtools/build/lib/pkgcache/PackageCacheTest.java b/src/test/java/com/google/devtools/build/lib/pkgcache/PackageCacheTest.java index ba07b6841a..df3c5c840a 100644 --- a/src/test/java/com/google/devtools/build/lib/pkgcache/PackageCacheTest.java +++ b/src/test/java/com/google/devtools/build/lib/pkgcache/PackageCacheTest.java @@ -488,8 +488,7 @@ public class PackageCacheTest extends FoundationTestCase { @Test public void testAddedBuildFileCausesLabelToBecomeInvalid() throws Exception { reporter.removeHandler(failFastHandler); - scratch.file( - "pkg/BUILD", " cc_library(name = 'foo', ", " srcs = ['x/y.cc'])"); + scratch.file("pkg/BUILD", "cc_library(name = 'foo', srcs = ['x/y.cc'])"); assertLabelValidity(true, "//pkg:x/y.cc"); -- cgit v1.2.3