github.com/cheshirekow/buildtools@v0.0.0-20200224190056-5d637702fe81/build/testdata/051.bzl.golden (about)

     1  foo(
     2      name = "foo",
     3      srcs = [bar],
     4  )
     5  
     6  aaa
     7  bbb
     8  ccc
     9  
    10  ddd
    11  
    12  # multiline
    13  # comment
    14  eee
    15  
    16  fff
    17  ggg
    18  
    19  def function(
    20          # This shouldn't mess with indentation counting
    21          x,
    22          y = z):
    23      aaa
    24      bbb
    25  
    26      def g(
    27              a,
    28              s,
    29              d):  # this is d
    30          # this is function definition
    31          ccc
    32  
    33          # Misalingned comments
    34          # are not a syntax error
    35          ddd
    36  
    37          def h(a, s = d):  # this is h
    38              eee
    39  
    40          def k(g):
    41              g += 1
    42              return g
    43  
    44          for x in y:
    45              print(y)
    46  
    47          if x:
    48              print(x)
    49          elif y:
    50              print(y)
    51          else:
    52              print(z)
    53              print(y)
    54              print(x)
    55  
    56          if x:
    57              print(x)
    58  
    59          elif y:
    60              print(y)
    61  
    62          else:
    63              print(z)
    64              print(y)
    65              print(x)
    66  
    67          def i():
    68              def j():
    69                  return h(
    70                      [1],
    71                      [2],
    72                  )  # returns h
    73  
    74      return u() + w
    75  
    76  for b in a:  # first
    77      for c, d in b:  # second
    78          for ((e, f), g) in zip(c, d):  # third
    79              pass
    80  
    81  if foo in bar:
    82      for f in foo:
    83          # loop
    84          f()
    85  elif True:
    86      a = b
    87  
    88  elif False:
    89      #assign
    90      b = a
    91  else:
    92      (a, b) = (b, a)
    93  
    94  if foo:
    95      bar
    96  if foo:
    97      bar
    98  
    99  #comment
   100  bar
   101  
   102  bar
   103  
   104  def a(name, foo = True, **kwargs):
   105      # comment here
   106      return