Simplify argparse usage #1123
William-Brown5515 authored 94ec96b4
complete00:00:35
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-git-legal:b626
b626: Pulling from codeclimate/codeclimate-git-legal
90f4dba627d6: Already exists
98c1a7514ba6: Pulling fs layer
e970acb20b34: Pulling fs layer
37b763b54c24: Pulling fs layer
fda57ec1751e: Pulling fs layer
4c6564efa402: Pulling fs layer
d9d2999a61cb: Pulling fs layer
580a7c85932d: Pulling fs layer
14042ef0ceb7: Pulling fs layer
a176c29021cd: Pulling fs layer
fb61bdd6c9e5: Pulling fs layer
fda57ec1751e: Waiting
5902f4e6bfdf: Pulling fs layer
4c6564efa402: Waiting
01d61cd90194: Pulling fs layer
d9d2999a61cb: Waiting
bfd3418a31a7: Pulling fs layer
580a7c85932d: Waiting
14042ef0ceb7: Waiting
a176c29021cd: Waiting
fb61bdd6c9e5: Waiting
5902f4e6bfdf: Waiting
01d61cd90194: Waiting
bfd3418a31a7: Waiting
98c1a7514ba6: Download complete
37b763b54c24: Verifying Checksum
37b763b54c24: Download complete
98c1a7514ba6: Pull complete
fda57ec1751e: Verifying Checksum
fda57ec1751e: Download complete
4c6564efa402: Verifying Checksum
4c6564efa402: Download complete
e970acb20b34: Verifying Checksum
e970acb20b34: Download complete
d9d2999a61cb: Verifying Checksum
d9d2999a61cb: Download complete
580a7c85932d: Verifying Checksum
580a7c85932d: Download complete
14042ef0ceb7: Verifying Checksum
14042ef0ceb7: Download complete
fb61bdd6c9e5: Verifying Checksum
fb61bdd6c9e5: Download complete
01d61cd90194: Verifying Checksum
01d61cd90194: Download complete
a176c29021cd: Verifying Checksum
a176c29021cd: Download complete
bfd3418a31a7: Verifying Checksum
bfd3418a31a7: Download complete
e970acb20b34: Pull complete
37b763b54c24: Pull complete
5902f4e6bfdf: Verifying Checksum
5902f4e6bfdf: Download complete
fda57ec1751e: Pull complete
4c6564efa402: Pull complete
d9d2999a61cb: Pull complete
580a7c85932d: Pull complete
14042ef0ceb7: Pull complete
a176c29021cd: Pull complete
fb61bdd6c9e5: Pull complete
5902f4e6bfdf: Pull complete
01d61cd90194: Pull complete
bfd3418a31a7: Pull complete
Digest: sha256:61138dd4b61200e7b5250841c2bccf3128018ff186d011cb1ee6041f41403c4d
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-git-legal:b626
docker pull codeclimate/codeclimate-pylint:b938
b938: Pulling from codeclimate/codeclimate-pylint
4fe2ade4980c: Already exists
7cf6a1d62200: Pulling fs layer
f0d690b9e495: Pulling fs layer
fac5d45ad062: Pulling fs layer
dd9b067ef6fd: Pulling fs layer
ae19c30bb075: Pulling fs layer
322fbb16ce3a: Pulling fs layer
064681c837fd: Pulling fs layer
4777c8135e2f: Pulling fs layer
c1cade1474ec: Pulling fs layer
9b2c73eee31e: Pulling fs layer
98b60db9dac2: Pulling fs layer
fdeb13433eb3: Pulling fs layer
dd9b067ef6fd: Waiting
ae19c30bb075: Waiting
322fbb16ce3a: Waiting
064681c837fd: Waiting
4777c8135e2f: Waiting
c1cade1474ec: Waiting
9b2c73eee31e: Waiting
98b60db9dac2: Waiting
fdeb13433eb3: Waiting
fac5d45ad062: Verifying Checksum
fac5d45ad062: Download complete
7cf6a1d62200: Download complete
7cf6a1d62200: Pull complete
dd9b067ef6fd: Download complete
322fbb16ce3a: Verifying Checksum
322fbb16ce3a: Download complete
f0d690b9e495: Download complete
064681c837fd: Verifying Checksum
064681c837fd: Download complete
c1cade1474ec: Verifying Checksum
c1cade1474ec: Download complete
9b2c73eee31e: Verifying Checksum
9b2c73eee31e: Download complete
98b60db9dac2: Download complete
fdeb13433eb3: Verifying Checksum
fdeb13433eb3: Download complete
ae19c30bb075: Verifying Checksum
ae19c30bb075: Download complete
f0d690b9e495: Pull complete
4777c8135e2f: Verifying Checksum
4777c8135e2f: Download complete
fac5d45ad062: Pull complete
dd9b067ef6fd: Pull complete
ae19c30bb075: Pull complete
322fbb16ce3a: Pull complete
064681c837fd: Pull complete
4777c8135e2f: Pull complete
c1cade1474ec: Pull complete
9b2c73eee31e: Pull complete
98b60db9dac2: Pull complete
fdeb13433eb3: Pull complete
Digest: sha256:a8e867713f52acba347e27ba8063b0eb27b701d7f952b5962d12a277d8710778
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-pylint:b938
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-11-20T16:11:54.586595 #1]  INFO -- : Skipping file ./bin/sender.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 50
    options: Namespace = arg_parser.parse_args()
           ^
SyntaxError: invalid syntax


I, [2024-11-20T16:11:54.586655 #1]  INFO -- : Skipping file ./bin/receiver.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 55
    options: Namespace = arg_parser.parse_args()
           ^
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
[node_visitor]	INFO	Unable to find qualified name for module: setup.py
8
fixme
fixme engine documentation
9
git-legal
git-legal engine documentation
10
markdownlint
markdownlint engine documentation
View output
/usr/local/bundle/gems/posix-spawn-0.3.11/lib/posix/spawn.rb:467: warning: constant ::Fixnum is deprecated
11
pep8
pep8 engine documentation
View output
conf/ .github/ scripts/ bin/ ssm/ setup.py
12
pylint
pylint engine documentation
13
radon
radon engine documentation
View output
Running radon3...
14
shellcheck
shellcheck engine documentation
15
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: 28 files indexed
ERROR: Unable to parse file: /code/bin/sender.py
ERROR: Parse error at line 50 column 11:

   42: , '--log_config',
   43:                             help='DEPRECATED - location of logging config file',
   44:                             default=None)
   45:     arg_parser.add_argument('-v', '--version',
   46:                             action='version',
   47:                             version=ver)
   48: 
   49: 
  -->      options: Namespace = arg_parser.parse_args()
   51: 
   52: 
   53:     old_log_config_default_path = '/etc/apel/logging.cfg'
   54:     if (os.path.exists(old_log_config_default_path) or options.log_config is not None

ERROR: Unable to parse file: /code/bin/receiver.py
ERROR: Parse error at line 55 column 11:

   47: help='location of the file containing valid DNs, '
   48:                                   'default path: %s' % default_dns_location,
   49:                             default=default_dns_location)
   50:     arg_parser.add_argument('-v', '--version',
   51:                             action='version',
   52:                             version=ver)
   53: 
   54: 
  -->      options: Namespace = arg_parser.parse_args()
   56: 
   57: 
   58:     old_log_config_default_path = '/etc/apel/logging.cfg'
   59:     if (os.path.exists(old_log_config_default_path) or options.log_config is not None

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