12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
I, [2024-09-16T17:39:14.351585 #1] INFO -- : Skipping file ./json4humans/style.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 25
self, elements: TupleWithTrailingComa[JSONType], tail: list[WSC | str] | None = None
^
SyntaxError: invalid syntax
I, [2024-09-16T17:39:14.354050 #1] INFO -- : Skipping file ./json4humans/env.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 3
DEBUG: bool = bool(os.environ.get("DEBUG", 0))
^
SyntaxError: invalid syntax
I, [2024-09-16T17:39:14.369392 #1] INFO -- : Skipping file ./json4humans/types.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 20
json_before: list[WSC]
^
SyntaxError: invalid syntax
I, [2024-09-16T17:39:14.370454 #1] INFO -- : Skipping file ./json4humans/jsonc.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 40
trim_whitespaces: bool = False
^
SyntaxError: invalid syntax
I, [2024-09-16T17:39:14.411255 #1] INFO -- : Skipping file ./json4humans/protocol.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 22
indent: int | str | None
^
SyntaxError: invalid syntax
I, [2024-09-16T17:39:14.424678 #1] INFO -- : Skipping file ./json4humans/wsc.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 16
def parse(wsc: str) -> list[WSC]:
^
SyntaxError: invalid syntax
I, [2024-09-16T17:39:14.430805 #1] INFO -- : Skipping file ./json4humans/json.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 48
def number(self, num: str):
^
SyntaxError: invalid syntax
I, [2024-09-16T17:39:14.445389 #1] INFO -- : Skipping file ./json4humans/json5.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 51
def string(self, string: String):
^
SyntaxError: invalid syntax
|
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/docs/images/favicon.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/docs/images/logo-with-text.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 44 files indexed
ERROR: Unable to parse file: /code/json4humans/env.py
ERROR: Parse error at line 3 column 5:
1: import os
2:
--> DEBUG: bool = bool(os.environ.get("DEBUG", 0))
4: """
5: If this environment is set to a truthy value,
6: the parsing and transform will be done in 2 steps
7: allowing detailled parsing errors.
8:
9: See [Tree-less LALR](https://lark-parser.readthedocs.io/en/latest/json_tutorial.html#step-3-tree-less-lalr-1)
10: """
11: EOF
ERROR: Unable to parse file: /code/json4humans/style.py
ERROR: Parse error at line 69 column 17:
59:
60:
61: value = pack_wsc
62: key = pack_wsc
63:
64:
65: Encoder = TypeVar("Encoder", bound=JSONEncoder)
66: T = TypeVar("T")
67:
68:
--> JSONEncoderMethod: TypeAlias = Callable[[Encoder, T], str]
70: """A JSON encoder type method"""
71:
72: JSONEncoderBoundMethod: TypeAlias = Callable[[T], str]
73: """A JSON encoder bound type method"""
ERROR: Unable to parse file: /code/json4humans/types.py
ERROR: Parse error at line 20 column 15:
9: import OrderedDict
10: from collections.abc import Iterable
11: from enum import Enum
12: from typing import Generic, TypeVar
13:
14:
15: class JSONType:
16: """
17: Base class for parsed types with style and metadata preservation.
18: """
19:
--> json_before: list[WSC]
21: """Whitespaces and comments sequence before the object."""
22: json_after: list[WSC]
23: """Whitespaces and comments sequence after the object."""
24:
25: def __init__(
26: self, *_, before: list[WSC
ERROR: Unable to parse file: /code/json4humans/jsonc.py
ERROR: Parse error at line 40 column 20:
31: , wsc=wsc.transformer)
32:
33:
34: class JSONCEncoder(json.JSONEncoder):
35: pass
36:
37:
38: @dataclass
39: class FormatOptions:
--> trim_whitespaces: bool = False
41: remove_comments: bool = False
42: keep_newlines: bool = False
43: add_end_line_return: bool = True
44:
45:
46: protocol.implement("jsonc",
ERROR: Unable to parse file: /code/json4humans/protocol.py
ERROR: Parse error at line 22 column 10:
9:
10:
11: from lark import Lark
12: from lark.visitors import Transformer
13:
14: from .env import DEBUG
15:
16:
17: class JSONEncoder(Protocol):
18: """
19: Protocol for JSON encoders
20: """
21:
--> indent: int | str | None
23:
24: def __init__(self, *, indent: int | str | None = None) -> None:
25:
ERROR: Unable to parse file: /code/json4humans/json.py
ERROR: Parse error at line 53 column 14:
49: Integer(num)
50:
51: @v_args(inline=True)
52: def literal(self, token: Token) -> Literal:
--> match token.value:
54: case "true":
55: return Literal[bool](True)
56: case "false":
57: return Literal[bool
ERROR: Unable to parse file: /code/json4humans/wsc.py
ERROR: Parse error at line 40 column 8:
30: ] | None = None) -> list[WSC]:
31: """
32: Parse an optional sequence of whitespaces and comments as [WSC][json4humans.types.WSC] or [str][]
33: into a list of [WSC][json4humans.types.WSC] only.
34:
35: :param items: An optional list of [WSC][json4humans.types.WSC] or string to be parsed as WSC.
36: :returns: A list of [WSC][json4humans.types.WSC].
37: """
38: if items is None:
39: return []
--> wscs: list[WSC] = []
41: for item in items:
42: if isinstance(item, str):
43: wscs.extend(
ERROR: Unable to parse file: /code/json4humans/json5.py
ERROR: Parse error at line 133 column 14:
128: returnout
129:
130:
131: class JSON5Encoder(JSONCEncoder):
132: def encode(self, obj: Any) -> str:
--> match obj:
134: case Number():
135: return self.encode_number(obj)
136: returnsuper().encode(obj)
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.358s
INFO: Final Memory: 6M/295M
INFO: ------------------------------------------------------------------------
|