You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the linter currently handles the old-style docstrings as "not implemented".
While Godot seems to have moved from quote-based docstrings to diamond-based ones, the linter just crashes with a very non-descriptive error:
# foo.gd"""hello world!"""
> gdlint foo.gd
Traceback (most recent call last):
File "/home/user/.local/bin/gdlint", line 8, in<module>sys.exit(main())
^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/gdtoolkit/linter/__main__.py", line 66, in main
problems_total += _lint_file(file_path, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/gdtoolkit/linter/__main__.py", line 134, in _lint_file
problems = lint_code(content, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/gdtoolkit/linter/__init__.py", line 119, in lint_code
problems += class_checks.lint(parse_tree, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/gdtoolkit/linter/class_checks.py", line 38, in lint
problems += [problem forclusterin problem_clusters forproblemin cluster]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/gdtoolkit/linter/class_checks.py", line 38, in<listcomp>
problems += [problem forclusterin problem_clusters forproblemin cluster]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/gdtoolkit/linter/class_checks.py", line 35, in<genexpr>
function(ast) if name not in disable else []
^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/gdtoolkit/linter/class_checks.py", line 71, in _class_definitions_order_check
return [
^
File "/home/user/.local/lib/python3.11/site-packages/gdtoolkit/linter/class_checks.py", line 74, in<listcomp>forproblemin _class_definitions_order_check_for_class(a_class, order)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/gdtoolkit/linter/class_checks.py", line 87, in _class_definitions_order_check_for_class
statement_section = _map_statement_to_section(statement)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/gdtoolkit/linter/class_checks.py", line 145, in _map_statement_to_section
raise NotImplementedError
NotImplementedError
Could this maybe be changed to recommend the user to change quotes to double diamonds? Or even better: fix it to be so?
The unhandled statement kind in this case is docstr_stmt
I had written a small script to do the conversion for us when we migrated from Godot 3.x to 4, if that is any help:
In Godot 4 the docstrings were removed at first and re-added after a few months due to user complaints. I followed the Godot in gdtoolkit and it looks like I forgot to re-add linter support for them while re-adding general support.
Hi,
the linter currently handles the old-style docstrings as "not implemented".
While Godot seems to have moved from quote-based docstrings to diamond-based ones, the linter just crashes with a very non-descriptive error:
Could this maybe be changed to recommend the user to change quotes to double diamonds? Or even better: fix it to be so?
The unhandled statement kind in this case is
docstr_stmt
I had written a small script to do the conversion for us when we migrated from Godot 3.x to 4, if that is any help:
The text was updated successfully, but these errors were encountered: