t1gor/Robots.txt-Parser-Class

View on GitHub
Bump phpunit/phpunit from 9.5.11 to 9.5.13 (#95) #112
dependabot[bot] authored 531095ed
complete00:00:32
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-phpcodesniffer:b163
b163: Pulling from codeclimate/codeclimate-phpcodesniffer
a0710691c81a: Pulling fs layer
a3ed95caeb02: Pulling fs layer
f3c17b6c6935: Pulling fs layer
c3166a36a8d9: Pulling fs layer
83a051f0858f: Pulling fs layer
f0e9f15ec462: Pulling fs layer
034c114563b8: Pulling fs layer
5edc25e33d4e: Pulling fs layer
f0e9f15ec462: Waiting
034c114563b8: Waiting
5edc25e33d4e: Waiting
c3166a36a8d9: Waiting
83a051f0858f: Waiting
f3c17b6c6935: Verifying Checksum
f3c17b6c6935: Download complete
a3ed95caeb02: Verifying Checksum
a3ed95caeb02: Download complete
a0710691c81a: Verifying Checksum
a0710691c81a: Download complete
83a051f0858f: Verifying Checksum
83a051f0858f: Download complete
a0710691c81a: Pull complete
c3166a36a8d9: Verifying Checksum
c3166a36a8d9: Download complete
a3ed95caeb02: Pull complete
034c114563b8: Verifying Checksum
034c114563b8: Download complete
5edc25e33d4e: Download complete
f0e9f15ec462: Verifying Checksum
f0e9f15ec462: Download complete
f3c17b6c6935: Pull complete
c3166a36a8d9: Pull complete
83a051f0858f: Pull complete
f0e9f15ec462: Pull complete
034c114563b8: Pull complete
5edc25e33d4e: Pull complete
Digest: sha256:cab8fcc753b6ae0e309b899665b22b1b62c26c56dab9b3c6a938fa72ca7c0640
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-phpcodesniffer:b163
docker pull codeclimate/codeclimate-phpmd:b291
b291: Pulling from codeclimate/codeclimate-phpmd
41dcc117e123: Pulling fs layer
e7cb8c1bd7da: Pulling fs layer
382dd9e936d2: Pulling fs layer
01d3fd4ccf07: Pulling fs layer
d54cbc0233c4: Pulling fs layer
a01b3d804127: Pulling fs layer
02aaff91dfc2: Pulling fs layer
25d9a4b72163: Pulling fs layer
378b764b6ee5: Pulling fs layer
d8ae1ee899c7: Pulling fs layer
f11257bedacf: Pulling fs layer
40adf26d4529: Pulling fs layer
d54cbc0233c4: Waiting
a01b3d804127: Waiting
02aaff91dfc2: Waiting
01d3fd4ccf07: Waiting
25d9a4b72163: Waiting
d8ae1ee899c7: Waiting
378b764b6ee5: Waiting
f11257bedacf: Waiting
e7cb8c1bd7da: Verifying Checksum
e7cb8c1bd7da: Download complete
382dd9e936d2: Verifying Checksum
382dd9e936d2: Download complete
41dcc117e123: Verifying Checksum
41dcc117e123: Download complete
d54cbc0233c4: Verifying Checksum
d54cbc0233c4: Download complete
41dcc117e123: Pull complete
a01b3d804127: Download complete
01d3fd4ccf07: Verifying Checksum
01d3fd4ccf07: Download complete
e7cb8c1bd7da: Pull complete
382dd9e936d2: Pull complete
25d9a4b72163: Verifying Checksum
25d9a4b72163: Download complete
378b764b6ee5: Download complete
01d3fd4ccf07: Pull complete
40adf26d4529: Verifying Checksum
40adf26d4529: Download complete
d8ae1ee899c7: Download complete
f11257bedacf: Download complete
d54cbc0233c4: Pull complete
a01b3d804127: Pull complete
02aaff91dfc2: Pull complete
25d9a4b72163: Pull complete
378b764b6ee5: Pull complete
d8ae1ee899c7: Pull complete
f11257bedacf: Pull complete
40adf26d4529: Pull complete
Digest: sha256:100ad83154de1d7143edb4360753a5a3c2c35f8a0fd8f00352718003e2b63bfa
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-phpmd:b291
docker pull codeclimate/codeclimate-sonar-php:b23
b23: Pulling from codeclimate/codeclimate-sonar-php
97518928ae5f: Pulling fs layer
043df9f67e9a: Pulling fs layer
a42e650909d2: Pulling fs layer
0dff3d7a1a0e: Pulling fs layer
e109c25d106c: Pulling fs layer
b2fb00c172a9: Pulling fs layer
1519b1438731: Pulling fs layer
cfbd8af1af7a: Pulling fs layer
ea3b98fb78f4: Pulling fs layer
1c654bf89a09: Pulling fs layer
b2fb00c172a9: Waiting
1519b1438731: Waiting
cfbd8af1af7a: Waiting
ea3b98fb78f4: Waiting
1c654bf89a09: Waiting
0dff3d7a1a0e: Waiting
e109c25d106c: Waiting
a42e650909d2: Download complete
97518928ae5f: Verifying Checksum
e109c25d106c: Verifying Checksum
e109c25d106c: Download complete
97518928ae5f: Pull complete
b2fb00c172a9: Verifying Checksum
b2fb00c172a9: Download complete
043df9f67e9a: Verifying Checksum
043df9f67e9a: Download complete
0dff3d7a1a0e: Verifying Checksum
0dff3d7a1a0e: Download complete
cfbd8af1af7a: Verifying Checksum
cfbd8af1af7a: Download complete
1519b1438731: Verifying Checksum
1519b1438731: Download complete
043df9f67e9a: Pull complete
a42e650909d2: Pull complete
1c654bf89a09: Verifying Checksum
1c654bf89a09: Download complete
ea3b98fb78f4: Verifying Checksum
ea3b98fb78f4: Download complete
0dff3d7a1a0e: Pull complete
e109c25d106c: Pull complete
b2fb00c172a9: Pull complete
1519b1438731: Pull complete
cfbd8af1af7a: Pull complete
ea3b98fb78f4: Pull complete
1c654bf89a09: Pull complete
Digest: sha256:600639355d67f629857951762cd4d8d2bc9eb16a0496c67a3d6049830edcc87b
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-sonar-php:b23
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...
7
phpcodesniffer
phpcodesniffer engine documentation
8
phpmd
phpmd engine documentation
9
sonar-php
sonar-php engine documentation
View output
INFO: Java 1.8.0_322 Amazon.com Inc. (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/assets/components-graph.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/assets/schema.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 43 files indexed
INFO: 31 source files to be analyzed
ERROR: Unable to parse file: /code/source/Stream/GeneratorBasedReader.php
ERROR: Parse error at line 25 column 10:

15: 
16: class GeneratorBasedReader implements ReaderInterface {
17: 
18:  use LogsIfAvailableTrait;
19: 
20:  private $stream;
21: 
22:  /**
23:   * @var string[]
24:   */
25:  private array $filters;
             ^
26: 
27:  protected function __construct() {
28:   /** @note order matters */
29:   $this->filters = [
30:    SkipCommentedLinesFilter::class              => false,
31:    SkipEndOfCommentedLineFilter::class          => false,
32:    TrimSpacesLeftFilter::class                  => false,
33:    SkipUnsupportedDirectivesFilter::class       => false,
34:    SkipDirectivesWithInvalidValuesFilter::class => false,
35:    SkipEmptyLinesFilter::class                  => false,

ERROR: Unable to parse file: /code/source/Parser/TreeBuilder.php
ERROR: Parse error at line 17 column 12:

 7: use t1gor\RobotsTxtParser\LogsIfAvailableTrait;
 8: use t1gor\RobotsTxtParser\Parser\DirectiveProcessors\DirectiveProcessorInterface;
 9: 
10: class TreeBuilder implements TreeBuilderInterface {
11: 
12:  use LogsIfAvailableTrait;
13: 
14:  /**
15:   * @var DirectiveProcessorInterface[]
16:   */
17:  protected array     $processors;
               ^
18:  protected \Iterator $content;
19: 
20:  /**
21:   * @param DirectiveProcessorInterface[] $processors
22:   * @param LoggerInterface|null          $logger
23:   */
24:  public function __construct(array $processors, ?LoggerInterface $logger) {
25:   $this->logger = $logger;
26: 
27:   if (empty($processors)) {

ERROR: Unable to parse file: /code/source/Parser/Url.php
ERROR: Parse error at line 12 column 12:

 2: 
 3: namespace t1gor\RobotsTxtParser\Parser;
 4: 
 5: use Psr\Log\LoggerAwareInterface;
 6: use t1gor\RobotsTxtParser\LogsIfAvailableTrait;
 7: 
 8: class Url implements LoggerAwareInterface {
 9: 
10:  use LogsIfAvailableTrait;
11: 
12:  protected string $in = '';
               ^
13: 
14:  public function __construct(string $in) {
15:   $this->in = $this->encode(trim($in));
16:  }
17: 
18:  /**
19:   * URL encoder according to RFC 3986
20:   * Returns a string containing the encoded URL with disallowed characters converted to their percentage encodings.
21:   *
22:   * @link http://publicmind.in/blog/url-encoding/

ERROR: Unable to parse file: /code/source/LogsIfAvailableTrait.php
ERROR: Parse error at line 10 column 10:

 1: <?php declare(strict_types=1);
 2: 
 3: namespace t1gor\RobotsTxtParser;
 4: 
 5: use Psr\Log\LoggerInterface;
 6: use Psr\Log\LogLevel;
 7: 
 8: trait LogsIfAvailableTrait {
 9: 
10:  private ?LoggerInterface $logger = null;
             ^
11: 
12:  public function setLogger(LoggerInterface $logger): void {
13:   $this->logger = $logger;
14:  }
15: 
16:  protected function log(string $message, array $context = [], string $level = LogLevel::DEBUG) {
17:   if (!is_null($this->logger)) {
18:    $this->logger->log($level, $message, $context);
19:   }
20:  }

ERROR: Unable to parse file: /code/source/RobotsTxtParser.php
ERROR: Parse error at line 51 column 12:

41:  // default encoding
42:  const DEFAULT_ENCODING = 'UTF-8';
43: 
44:  // rules set
45:  protected $rules = [];
46: 
47:  // host set
48:  protected $host = null;
49: 
50:  // robots.txt http status code
51:  protected ?int $httpStatusCode;
               ^
52: 
53:  // url
54:  private $url = null;
55: 
56:  // UserAgent
57:  private $userAgent      = '*';
58: 
59:  // robots.txt file content
60:  private        $content  = '';
61:  private string $encoding = '';

INFO: 31/31 source files have been analyzed
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Stream/ReaderInterface.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Stream/CustomFilterInterface.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Stream/Filters/SkipDirectivesWithInvalidValuesFilter.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Stream/Filters/TrimSpacesLeftFilter.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Stream/Filters/SkipUnsupportedDirectivesFilter.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Stream/Filters/SkipEndOfCommentedLineFilter.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Stream/Filters/SkipEmptyLinesFilter.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Stream/Filters/SkipCommentedLinesFilter.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/WarmingMessages.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/DirectiveProcessors/UserAgentProcessor.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/DirectiveProcessors/AllowProcessor.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/DirectiveProcessors/AbstractAllowanceProcessor.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/DirectiveProcessors/DirectiveProcessorInterface.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/DirectiveProcessors/AbstractDirectiveProcessor.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/DirectiveProcessors/CleanParamProcessor.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/DirectiveProcessors/CrawlDelayProcessor.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/DirectiveProcessors/HostProcessor.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/DirectiveProcessors/CacheDelayProcessor.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/DirectiveProcessors/DisallowProcessor.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/DirectiveProcessors/SitemapProcessor.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/DirectiveProcessorsFactory.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/TreeBuilderInterface.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/HostName.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/UserAgent/UserAgentMatcherInterface.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Parser/UserAgent/UserAgentMatcher.php]
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/source/Directive.php]
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.677s
INFO: Final Memory: 11M/95M
INFO: ------------------------------------------------------------------------