simonkowallik/tmconfpy

View on GitHub
Update README.md #34
Simon Kowallik authored d603df60
complete00:00:34
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
WARNING: unknown engine or channel <codescan:stable>
WARNING: unknown engine or channel <cody:stable>
WARNING: unknown engine or channel <isort:stable>
WARNING: unknown engine or channel <proselint:stable>
WARNING: unknown engine or channel <protobuf:stable>
WARNING: unknown engine or channel <rustfmt:stable>
WARNING: unknown engine or channel <tfsec:stable>
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
docker pull codeclimate/codeclimate-bandit:b1124
b1124: Pulling from codeclimate/codeclimate-bandit
c158987b0551: Pulling fs layer
f7a0074baec6: Pulling fs layer
d3652c33ba6f: Pulling fs layer
91bdc615afbe: Pulling fs layer
3ac712e04e08: Pulling fs layer
30af34904229: Pulling fs layer
6d42fbb1fef9: Pulling fs layer
91bdc615afbe: Waiting
3ac712e04e08: Waiting
30af34904229: Waiting
6d42fbb1fef9: Waiting
f7a0074baec6: Download complete
d3652c33ba6f: Verifying Checksum
d3652c33ba6f: Download complete
3ac712e04e08: Verifying Checksum
3ac712e04e08: Download complete
30af34904229: Verifying Checksum
30af34904229: Download complete
c158987b0551: Verifying Checksum
c158987b0551: Download complete
6d42fbb1fef9: Verifying Checksum
6d42fbb1fef9: Download complete
c158987b0551: Pull complete
f7a0074baec6: Pull complete
d3652c33ba6f: Pull complete
91bdc615afbe: Verifying Checksum
91bdc615afbe: Download complete
91bdc615afbe: Pull complete
3ac712e04e08: Pull complete
30af34904229: Pull complete
6d42fbb1fef9: Pull complete
Digest: sha256:4a20738ab9ac2ef317caa32e02acce6222a25cbf52d6076f058aa3223806783d
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-bandit:b1124
docker pull codeclimate/codeclimate-black:b1058
b1058: Pulling from codeclimate/codeclimate-black
345e3491a907: Pulling fs layer
57671312ef6f: Pulling fs layer
5e9250ddb7d0: Pulling fs layer
07318ed61f01: Pulling fs layer
ddd2f39cd424: Pulling fs layer
df25d5beb216: Pulling fs layer
d961feeb0441: Pulling fs layer
83c8bd201a12: Pulling fs layer
5bce6627a0c4: Pulling fs layer
ce6b953d3e62: Pulling fs layer
9921c94708b9: Pulling fs layer
94c6ee8cbbc0: Pulling fs layer
07318ed61f01: Waiting
ddd2f39cd424: Waiting
df25d5beb216: Waiting
d961feeb0441: Waiting
83c8bd201a12: Waiting
5bce6627a0c4: Waiting
ce6b953d3e62: Waiting
9921c94708b9: Waiting
94c6ee8cbbc0: Waiting
5e9250ddb7d0: Verifying Checksum
5e9250ddb7d0: Download complete
57671312ef6f: Verifying Checksum
57671312ef6f: Download complete
ddd2f39cd424: Verifying Checksum
07318ed61f01: Verifying Checksum
07318ed61f01: Download complete
345e3491a907: Verifying Checksum
345e3491a907: Download complete
83c8bd201a12: Download complete
df25d5beb216: Verifying Checksum
df25d5beb216: Download complete
5bce6627a0c4: Verifying Checksum
5bce6627a0c4: Download complete
ce6b953d3e62: Verifying Checksum
ce6b953d3e62: Download complete
9921c94708b9: Verifying Checksum
9921c94708b9: Download complete
94c6ee8cbbc0: Verifying Checksum
94c6ee8cbbc0: Download complete
345e3491a907: Pull complete
57671312ef6f: Pull complete
5e9250ddb7d0: Pull complete
07318ed61f01: Pull complete
ddd2f39cd424: Pull complete
d961feeb0441: Verifying Checksum
d961feeb0441: Download complete
df25d5beb216: Pull complete
d961feeb0441: Pull complete
83c8bd201a12: Pull complete
5bce6627a0c4: Pull complete
ce6b953d3e62: Pull complete
9921c94708b9: Pull complete
94c6ee8cbbc0: Pull complete
Digest: sha256:4b73b361e5bd84cc9ba1f1866441120197c59f3de5d76c98dfad76f24acba427
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-black:b1058
docker pull codeclimate/codeclimate-radon:b695
b695: Pulling from codeclimate/codeclimate-radon
e00d546a75ad: Pulling fs layer
21f0a0866768: Pulling fs layer
cd9d3946aa16: Pulling fs layer
2e56add6654f: Pulling fs layer
6c87f215a2be: Pulling fs layer
c2b31566ca3d: Pulling fs layer
6c87f215a2be: Waiting
c2b31566ca3d: Waiting
21f0a0866768: Download complete
e00d546a75ad: Verifying Checksum
e00d546a75ad: Download complete
e00d546a75ad: Pull complete
cd9d3946aa16: Verifying Checksum
cd9d3946aa16: Download complete
6c87f215a2be: Verifying Checksum
6c87f215a2be: Download complete
21f0a0866768: Pull complete
c2b31566ca3d: Verifying Checksum
c2b31566ca3d: Download complete
cd9d3946aa16: Pull complete
2e56add6654f: Download complete
2e56add6654f: Pull complete
6c87f215a2be: Pull complete
c2b31566ca3d: Pull complete
Digest: sha256:dfeb7edc634b4e2f851f3c788f7c21bd8bae097d4c66af722c76a6ba51121f98
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-radon:b695
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
9f30da6d3676: Waiting
9b412187b352: Waiting
65145a386a45: Waiting
a64dfb9c0f27: Waiting
59a464ab5a51: Waiting
47413513c002: Waiting
8fe915fa1948: Waiting
d1c225ed7c34: Verifying Checksum
d1c225ed7c34: Download complete
709515475419: Download complete
a3ed95caeb02: Verifying Checksum
a3ed95caeb02: Download complete
709515475419: Pull complete
9b412187b352: Verifying Checksum
9b412187b352: Download complete
d1c225ed7c34: Pull complete
65145a386a45: Download complete
887f300163b6: Verifying Checksum
887f300163b6: Download complete
59a464ab5a51: Verifying Checksum
59a464ab5a51: Download complete
887f300163b6: Pull complete
a3ed95caeb02: Pull complete
9b412187b352: Pull complete
8fe915fa1948: Verifying Checksum
8fe915fa1948: Download complete
a64dfb9c0f27: Verifying Checksum
a64dfb9c0f27: Download complete
8fe915fa1948: Pull complete
65145a386a45: Pull complete
9f30da6d3676: Verifying Checksum
9f30da6d3676: Download complete
47413513c002: Verifying Checksum
47413513c002: Download 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-09-03T03:13:18.448745 #1]  INFO -- : Skipping file ./tmconfpy/parser.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 31
    def __init__(self, tmconf: str, is_filepath: bool = False, sort: bool = False):
                             ^
SyntaxError: invalid syntax


I, [2024-09-03T03:13:18.460107 #1]  INFO -- : Skipping file ./tmconfpy/apiserver.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 147
    filename: str
            ^
SyntaxError: invalid syntax


I, [2024-09-03T03:13:18.460259 #1]  INFO -- : Skipping file ./tmconfpy/cli.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
    epilog=f"LICENSE: {__license__}, homepage: {__homepage__}",
                                                             ^
SyntaxError: invalid syntax


I, [2024-09-03T03:13:18.472324 #1]  INFO -- : Skipping file ./ansible_collections/simonkowallik/tmconfpy/plugins/module_utils/tmos_api.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 45
    "utilCmdArgs": f"-c 'test -f {configfile} || echo NOT_A_FILE;sha256sum --tag {configfile};cat {configfile} |gzip|base64 -w0'",
                                                                                                                                ^
SyntaxError: invalid syntax


I, [2024-09-03T03:13:18.483787 #1]  INFO -- : Skipping file ./ansible_collections/simonkowallik/tmconfpy/plugins/module_utils/parser.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 31
    def __init__(self, tmconf: str, is_filepath: bool = False, sort: bool = False):
                             ^
SyntaxError: invalid syntax


I, [2024-09-03T03:13:18.495159 #1]  INFO -- : Skipping file ./ansible_collections/simonkowallik/tmconfpy/plugins/modules/tmconf_get.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 154
    error_details=f"The specified file '{module.params['configfile']}' does not exist or is not a file.",
                                                                                                       ^
SyntaxError: invalid syntax
7
bandit
bandit engine documentation
View output
[main]	INFO	profile include tests: None
[main]	INFO	profile exclude tests: None
[main]	INFO	cli include tests: None
[main]	INFO	cli exclude tests: None
8
black
black engine documentation
9
fixme
fixme engine documentation
10
radon
radon engine documentation
View output
Running radon3...
11
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: 30 files indexed
ERROR: Unable to parse file: /code/tmconfpy/parser.py
ERROR: Parse error at line 69 column 28:

   66:             self._tmconf_dict = self._sort_dict(self._tmconf_dict)
   67:         self._tmconf_json = ""
   68:         self._tmconf_jsonl = ""
  -->          self._tmconf_tabular: list[tabularTmconf] = []
   70:         self._tmconf_tabular_kv: list[dict] = []
   71:         self._tmconf_tabular_json = ""
   72:         self._tmconf_tabular_json_kv

ERROR: Unable to parse file: /code/tmconfpy/apiserver.py
ERROR: Parse error at line 147 column 12:

  136: """Response format of parsed tmconf data."""
  137: 
  138:     object = "object"
  139:     tabular = "tabular"
  140:     tabular_kv = "tabular_kv"
  141:     jsonl = "jsonl"
  142: 
  143: 
  144: class FileParserResult(BaseModel):
  145:     """Result model for the fileparser endpoint."""
  146: 
  -->      filename: str
  148:     output: dict
  149: 
  150: 
  151: @app.post(
  152:     "/fileparser/",
  153:     tags=[__projectname__],
  154:     response_model=list[FileParserResult],
  155:     responses=

ERROR: Unable to parse file: /code/ansible_collections/simonkowallik/tmconfpy/plugins/module_utils/parser.py
ERROR: Parse error at line 69 column 28:

   66:             self._tmconf_dict = self._sort_dict(self._tmconf_dict)
   67:         self._tmconf_json = ""
   68:         self._tmconf_jsonl = ""
  -->          self._tmconf_tabular: list[tabularTmconf] = []
   70:         self._tmconf_tabular_kv: list[dict] = []
   71:         self._tmconf_tabular_json = ""
   72:         self._tmconf_tabular_json_kv

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