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
{{ message }}
This repository was archived by the owner on Aug 6, 2023. It is now read-only.
On running the linter on this line: private _profileNameSpace = profileNameSpace;
I get this error: (It works perfectly when I comment the line.)
Traceback (most recent call last):
File "D:\git\global_linter\source\sqf\goliat.py", line 12, in main
exceptions = sqf.analyzer.analyze(result).exceptions
File "C:\Users\vince\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqf\analyzer.py", line 545, in analyze
analyzer.execute_code(file, extra_scope={'_this': arg})
File "C:\Users\vince\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqf\analyzer.py", line 197, in execute_code
outcome = super().execute_code(code, extra_scope, namespace_name)
File "C:\Users\vince\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqf\base_interpreter.py", line 177, in execute_code
token = self.execute_token(statement)
File "C:\Users\vince\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqf\analyzer.py", line 150, in execute_token
result = self.execute_single(statement=token)
File "C:\Users\vince\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqf\analyzer.py", line 341, in execute_single
self.assign(lhs, rhs_v)
File "C:\Users\vince\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sqf\analyzer.py", line 265, in assign
scope[lhs_name] = rhs_t()
TypeError: __init__() missing 1 required positional argument: 'token'`
Here is how I run it:
import sqf.parser
import sqf.analyzer
import sqf.exceptions
def main(f, path, settings): # f is my script as a string
problems = []
fl = [""] + f.split("\n")
print(path)
try:
result = sqf.parser.parse(f)
exceptions = sqf.analyzer.analyze(result).exceptions
for exception in exceptions:
problems.append(execption_to_problem(exception, path))
except sqf.exceptions.SQFParserError as e:
problems.append(execption_to_problem(e, path))
return
def execption_to_problem(e, path):
line_number = e.position[0]
column_number = e.position[1] - 1
type_problem = e.message.split(":")[0]
message_problem = "".join(e.message.split(":")[1:])
return [path, line_number, column_number, type_problem, message_problem]
Hello
On running the linter on this line:
private _profileNameSpace = profileNameSpace;
I get this error: (It works perfectly when I comment the line.)
Here is how I run it:
My pip freeze:
The text was updated successfully, but these errors were encountered: