I am using python 3.9.1 and have 0.3.6 sqlfluff. I do lint some files successfully and fix them however I am trying to lint 757 rows of sql file and it is giving me this error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/bin/sqlfluff", line 8, in <module>
sys.exit(cli())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlfluff/cli/commands.py", line 172, in lint
result = lnt.lint_paths(paths, verbosity=verbose, ignore_non_existent_files=False)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlfluff/linter.py", line 911, in lint_paths
result.add(self.lint_path(path, verbosity=verbosity, fix=fix,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlfluff/linter.py", line 896, in lint_path
self.lint_string(target_file.read(), fname=fname,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlfluff/linter.py", line 748, in lint_string
lerrs, _, _, _ = crawler.crawl(parsed, dialect=config.get('dialect_obj'))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlfluff/rules/base.py", line 268, in crawl
dvs, raw_stack, child_fixes, memory = self.crawl(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlfluff/rules/base.py", line 233, in crawl
res = self._eval(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlfluff/rules/std.py", line 53, in _eval
if raw_stack[idx].type == 'whitespace':
IndexError: tuple index out of range