Here's my code,
invalid_VB_file = """
'C' * (65535 + 1)
"""
LineLengthBearLangSpecificAspectTest = verify_local_bear(
LineLengthBear,
valid_files=(test_file,),
invalid_files=(invalid_VB_file,),
aspects=AspectList([
get_aspect('LineLength')('VisualBasic', max_line_length=4),
]),
settings={'language': 'VisualBasic'},
)
So basically, it ignores max_line_length=4
and picks up the already defined limit of 65535 for the Visual Basic file. The problem I am facing is the LineLengthBear gives me 18 as the length of the line in invalid_VB_test
and renders the test as valid, thus, the test fails. Is there any way to write an invalid test i.e. a line longer than 65535 characters, without literally writing such a long line?