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
Describe the bug
I had a space after the function name before the argument so : function_name (int n), and i had a main commented after the function.
It gave the error that i pasted down below and no more info.
Removing the main fixed this issue, although there was no problem with the main, and that said main was inside /* */ .
I then fixed the function name to function_name(int n) removing the space and the error was gone, even with the same main in place, that single space cause norminette to not work.
Erroneous code
Traceback (most recent call last):
File "/home/tiago/.local/bin/norminette", line 8, in
sys.exit(main())
^^^^^^
File "/home/tiago/.local/share/pipx/venvs/norminette/lib/python3.12/site-packages/norminette/main.py", line 155, in main
registry.run(context, source)
File "/home/tiago/.local/share/pipx/venvs/norminette/lib/python3.12/site-packages/norminette/registry.py", line 61, in run
ret, jump = self.run_rules(context, rule)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tiago/.local/share/pipx/venvs/norminette/lib/python3.12/site-packages/norminette/registry.py", line 37, in run_rules
self.run_rules(context, rule)
File "/home/tiago/.local/share/pipx/venvs/norminette/lib/python3.12/site-packages/norminette/registry.py", line 29, in run_rules
result = rule.run(context)
^^^^^^^^^^^^^^^^^
File "/home/tiago/.local/share/pipx/venvs/norminette/lib/python3.12/site-packages/norminette/rules/check_func_declaration.py", line 66, in run
context.new_error("NO_SPC_BFR_PAR", context.peek_token(i))
File "/home/tiago/.local/share/pipx/venvs/norminette/lib/python3.12/site-packages/norminette/context.py", line 249, in new_error
pos = tkn.pos
^^^^^^^
AttributeError: 'NoneType' object has no attribute 'pos'
The text was updated successfully, but these errors were encountered:
Describe the bug
I had a space after the function name before the argument so : function_name (int n), and i had a main commented after the function.
It gave the error that i pasted down below and no more info.
Removing the main fixed this issue, although there was no problem with the main, and that said main was inside /* */ .
I then fixed the function name to function_name(int n) removing the space and the error was gone, even with the same main in place, that single space cause norminette to not work.
Erroneous code
Traceback (most recent call last):
File "/home/tiago/.local/bin/norminette", line 8, in
sys.exit(main())
^^^^^^
File "/home/tiago/.local/share/pipx/venvs/norminette/lib/python3.12/site-packages/norminette/main.py", line 155, in main
registry.run(context, source)
File "/home/tiago/.local/share/pipx/venvs/norminette/lib/python3.12/site-packages/norminette/registry.py", line 61, in run
ret, jump = self.run_rules(context, rule)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tiago/.local/share/pipx/venvs/norminette/lib/python3.12/site-packages/norminette/registry.py", line 37, in run_rules
self.run_rules(context, rule)
File "/home/tiago/.local/share/pipx/venvs/norminette/lib/python3.12/site-packages/norminette/registry.py", line 29, in run_rules
result = rule.run(context)
^^^^^^^^^^^^^^^^^
File "/home/tiago/.local/share/pipx/venvs/norminette/lib/python3.12/site-packages/norminette/rules/check_func_declaration.py", line 66, in run
context.new_error("NO_SPC_BFR_PAR", context.peek_token(i))
File "/home/tiago/.local/share/pipx/venvs/norminette/lib/python3.12/site-packages/norminette/context.py", line 249, in new_error
pos = tkn.pos
^^^^^^^
AttributeError: 'NoneType' object has no attribute 'pos'
The text was updated successfully, but these errors were encountered: