StoryScriptorg/StoryScript

View on GitHub
Update README.md #88
Satakun Utama authored 489e1c8d
complete00:00:19
Your first build completed successfully!

Congratulations

Your first build completed successfully!

See the Results

1
git clone
2
codeclimate validate-config
View output
codeclimate validate-config
No errors or warnings found in .codeclimate.json.
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
docker pull codeclimate/codeclimate-sonar-python:b10
b10: Pulling from codeclimate/codeclimate-sonar-python
709515475419: Pulling fs layer
d1c225ed7c34: Pulling fs layer
887f300163b6: Pulling fs layer
a3ed95caeb02: Pulling fs layer
9b412187b352: Pulling fs layer
8fe915fa1948: Pulling fs layer
65145a386a45: Pulling fs layer
a64dfb9c0f27: Pulling fs layer
59a464ab5a51: Pulling fs layer
47413513c002: Pulling fs layer
9f30da6d3676: Pulling fs layer
a3ed95caeb02: Waiting
9b412187b352: Waiting
47413513c002: Waiting
8fe915fa1948: Waiting
9f30da6d3676: Waiting
65145a386a45: Waiting
a64dfb9c0f27: Waiting
d1c225ed7c34: Verifying Checksum
d1c225ed7c34: Download complete
709515475419: Verifying Checksum
709515475419: Download complete
a3ed95caeb02: Verifying Checksum
a3ed95caeb02: Download complete
709515475419: Pull complete
9b412187b352: Verifying Checksum
9b412187b352: Download complete
d1c225ed7c34: Pull complete
65145a386a45: Verifying Checksum
65145a386a45: Download complete
887f300163b6: Verifying Checksum
887f300163b6: Download complete
59a464ab5a51: Verifying Checksum
59a464ab5a51: Download complete
8fe915fa1948: Verifying Checksum
8fe915fa1948: Download complete
887f300163b6: Pull complete
47413513c002: Verifying Checksum
47413513c002: Download complete
a3ed95caeb02: Pull complete
9b412187b352: Pull complete
9f30da6d3676: Verifying Checksum
9f30da6d3676: Download complete
a64dfb9c0f27: Verifying Checksum
8fe915fa1948: Pull complete
65145a386a45: Pull complete
a64dfb9c0f27: Pull complete
59a464ab5a51: Pull complete
47413513c002: Pull complete
9f30da6d3676: Pull complete
Digest: sha256:7904831e83e5474cba8a95726a691787d74d669d74a8721f114057ebb4a8943d
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-sonar-python:b10
5
structure
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
6
duplication
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
I, [2024-04-14T06:52:42.853837 #1]  INFO -- : Skipping file ./storyscript_mathparse/mathLexer.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 104
    f'Unknown character "{self.current_char}" in Math expression at character {self.current_character_index} in expression \"{self.original_text}\".'
                                                                                                                                                    ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.861982 #1]  INFO -- : Skipping file ./storyscript_mathparse/tokens.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 29
    type: TokenType
        ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.865996 #1]  INFO -- : Skipping file ./storyscript_mathparse/values.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 6
    value: float
         ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.876638 #1]  INFO -- : Skipping file ./storyscript_mathparse/mathProcessor.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 15
    return String(f"{value}"), None
                           ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.904302 #1]  INFO -- : Skipping file ./storyscript_mathparse/mathInterpreter.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 6
    method_name = f"visit_{type(node).__name__}"
                                               ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.915451 #1]  INFO -- : Skipping file ./storyscript_mathparse/nodes.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 6
    value: float
         ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.918144 #1]  INFO -- : Skipping file ./storyscript/cachelogger.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 35
    self.cache_string.append(f"{vartype} {name} {value}")
                                                       ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.926585 #1]  INFO -- : Skipping file ./storyscript/__main__.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 73
    lexer.paren_needed: str = errcollection[randint(0, 1)]
                      ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.929656 #1]  INFO -- : Skipping file ./storyscript/executor.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 1
    def check_is_float_full_number(command) -> bool:
                                            ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.938156 #1]  INFO -- : Skipping file ./storyscript/langParser.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 10
    KEYWORDS: set = {
            ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.940517 #1]  INFO -- : Skipping file ./storyscript/SymbolTable.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 7
    self.variable_table: dict = {
                       ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.949677 #1]  INFO -- : Skipping file ./storyscript/modules/tkinters/__init__.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 8
    TYPES: dict = {
         ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.952520 #1]  INFO -- : Skipping file ./storyscript/processor.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 13
    def execute(command, original_text: str = None):
                                      ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.968890 #1]  INFO -- : Skipping file ./storyscript/langData.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 7
    LISTDECLARE_KEYW: set = {
                    ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.969955 #1]  INFO -- : Skipping file ./storyscript/benchmarking.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 15
    f"Hello world (Once): {timeit(lambda: execute(hello_world), number=1)}ms\n"
                                                                              ^
SyntaxError: invalid syntax


I, [2024-04-14T06:52:42.984036 #1]  INFO -- : Skipping file ./storyscript/lexer.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 18
    symbol_table: SymbolTable,
                ^
SyntaxError: invalid syntax
7
sonar-python
sonar-python engine documentation
View output
INFO: Java 1.8.0_111-internal Oracle Corporation (64-bit)
INFO: Linux 4.4.0-1128-aws amd64
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-core-2.17.0.899.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-cli-2.1.0.566.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
INFO: Index files
INFO: Invalid character encountered in file '/code/StoryScript.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/StoryScript_Executeflow.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 36 files indexed
ERROR: Unable to parse file: /code/storyscript_mathparse/mathLexer.py
ERROR: Parse error at line 152 column 27:

  147: self.advance()
  148: 
  149:         return Token(TokenType.STRING, outstr)
  150: 
  151:     def generate_number(self) -> Token:
  -->          decimal_point_count: int = 0
  153:         number_str: str = self.current_char
  154:         self.advance()
  155: 
  156:         while self.current_char is not None and (self.

ERROR: Unable to parse file: /code/storyscript_mathparse/tokens.py
ERROR: Parse error at line 29 column 8:

   20: BITWISE_RS = 13                             
   21:     BITWISE_XOR = 14
   22:     BITWISE_NOT = 15
   23:     INCREMENT_SYMBOL = 16             
   24:     DECREMENT_SYMBOL = 17             
   25: 
   26: 
   27: @dataclass
   28: class Token:
  -->      type: TokenType
   30:     value: Any = None
   31: 
   32:     def __repr__(self):
   33:         return self.type.name + (f":{self.value}" if self.value

ERROR: Unable to parse file: /code/storyscript_mathparse/values.py
ERROR: Parse error at line 6 column 9:

    1: from dataclasses import dataclass
    2: 
    3: 
    4: @dataclass
    5: class Number:
  -->      value: float
    7: 
    8:     def __repr__(self):
    9:         return f"{self.value}"
   10: 
   11:     def __hash__(self):
   12:         return hash(self.value)

ERROR: Unable to parse file: /code/storyscript_mathparse/nodes.py
ERROR: Parse error at line 6 column 9:

    1: from dataclasses import dataclass
    2: 
    3: 
    4: @dataclass
    5: class NumberNode:
  -->      value: float
    7: 
    8:     def __repr__(self):
    9:         return str(self.value)
   10: 
   11: 
   12: @dataclass
   13: class StringNode:
   14:     value

ERROR: Unable to parse file: /code/storyscript/__main__.py
ERROR: Parse error at line 73 column 26:

   61: = parser.parse_args()
   62: 
   63:     if args.mad_error:
   64:         errcollection = [
   65: 
   66:             "InvalidSyntax: YOU NEED A PARANTHESIS AFTER A FUNCTION NAME TO CALL IT, AND YOU CAN'T PRINT FUNCTION IN StorySript",
   67:             "InvalidSyntax: HEY YOU YOU NEED A PARENTHESIS AFTER A FUNCTION NAME DON'T BE STUPID MOST OF THE TIME OTHER PROGRAMMING LANGUAGES USE THIS RULE TOO",
   68: 
   69:             "InvalidSyntax: HEY YOU NEED A PARENTHESIS AFTER AN ARGUMENT LIST DON'T BE STUPID EVERYTHING THAT HAS ITS OPENING MUST HAVE A CLOSING",
   70:             "InvalidSyntax: INSERT ) AT THE END OF ARGUMENTS LIST YOU STUPID",
   71:         ]
   72: 
  -->          lexer.paren_needed: str = errcollection[randint(0, 1)]
   74:         lexer.close_paren_needed: str = errcollection[randint(2, 3)]
   75: 
   76:     

ERROR: Unable to parse file: /code/storyscript/langParser.py
ERROR: Parse error at line 10 column 8:

    2: , LambdaExpr
    3: from storyscript_mathparse.mathProcessor import process as processmath
    4: from storyscript_mathparse import values
    5: from . import executor
    6: from typing import Any, Tuple
    7: 
    8: 
    9: 
  -->  KEYWORDS: set = {
   11:     "if",
   12:     "else",
   13:     "var",
   14:     "int",
   15:     "bool",
   16:     "float",
   17:     "list",
   18:     "dictionary",
   19:     "tuple",
   20:     "const",
   21:     "override",
   22:     "func",
   23:     "end",

ERROR: Unable to parse file: /code/storyscript/SymbolTable.py
ERROR: Parse error at line 7 column 27:

    1: from .langData import Types
    2: from typing import Any, NoReturn
    3: 
    4: 
    5: class SymbolTable:
    6:     def __init__(self):
  -->          self.variable_table: dict = {
    8:             "true": (Types.Boolean, "true"),
    9:             "false": (Types.Boolean, "false"),
   10:         }
   11:         self.function_table:

ERROR: Unable to parse file: /code/storyscript/modules/tkinters/__init__.py
ERROR: Parse error at line 8 column 5:

    1: import tkinter as tk
    2: 
    3: 
    4: def pack(ref_type, ref_val, **arguments):
    5: 	ref_val.pack(**arguments)
    6: 
    7: 
  -->  TYPES: dict = {
    9:  "TkWindow": {
   10:   "methods": {
   11:    "mainloop": lambda refType, refVal, arguments: refVal.mainloop(),
   12:    "title": lambda refType,

ERROR: Unable to parse file: /code/storyscript/langData.py
ERROR: Parse error at line 7 column 16:

    1: from enum import Enum
    2: from dataclasses import dataclass
    3: from typing import Any
    4: 
    5: 
    6: 
  -->  LISTDECLARE_KEYW: set = {
    8:     "int[]", "bool[]",
    9:     "float[]", "list[]",
   10:     "dictionary[]", "tuple[]",
   11:     "const", "string[]",
   12:     "dynamic[]",
   13: }
   14: PRIMITIVE_TYPE: set = {
   15:     "var"

ERROR: Unable to parse file: /code/storyscript/lexer.py
ERROR: Parse error at line 22 column 25:

   16: __init__(
   17:         self,
   18:         symbol_table: SymbolTable,
   19:         parser: Parser = None,
   20:         build_cache: bool = False,
   21:     ) -> NoReturn:
  -->          self.symbol_table: SymbolTable = symbol_table
   23:         self.parser: Parser = parser
   24:         self.build_cache: bool = build_cache
   25: 
   26:         if parser is None:
   27:             self.

INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.426s
INFO: Final Memory: 6M/295M
INFO: ------------------------------------------------------------------------