You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 24, 2021. It is now read-only.
I started to work on #6 but found some things in repo
Rubocop plugins
I see rubocop-rspec in dependencies, but it's not required in rubocop.yml, so it's not in use. Also rubocop-performance gem is missing (I can submit PR for this too)
Rubocop report with enabled plugins
berubocopInspecting27files
.............C........CC...
Offenses:
lib/yavdb/sources/snyk_io.rb:69:54: C: Usematch? insteadof =~ whenMatchDatais not used..map{ |link| linkiflink =~ %r{\/vuln\/.+}}.compact
^^^^^^^^^^^^^^^^^^^^^^
spec/crawler_spec.rb:49:9: C: Examplehastoomanylines[25/5].it"all #{package_manager} package vulnerabilities should have one type of version"do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:22:1: C: Specpathshouldendwithyavdb/sources/snyk_io/client*_spec.rb.RSpec.describeYAVDB::Sources::SnykIO::Clientdo
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:36:23: C: Usedescribed_classinsteadofYAVDB::Sources::SnykIO::Client.advisory_page=YAVDB::Sources::SnykIO::Client.send(:get_page_html,test_url,false,nil)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:37:7: C: Usedescribed_classinsteadofYAVDB::Sources::SnykIO::Client.YAVDB::Sources::SnykIO::Client.send(:create,test_url,advisory_page)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:40:5: C: Examplehastoomanylines[12/5].it'should have the required properties'do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:40:5: C: Examplehastoomanyexpectations[12/1].it'should have the required properties'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:40:9: C: Donotuseshouldwhendescribingyourtests.it'should have the required properties'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:65:9: C: Donotuseshouldwhendescribingyourtests.it'should have valid properties'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:66:7: C: Preferusingbe_allmatcheroverall?.expect(advisories.all?{ |a| YAVDB::Constants::POSSIBLE_PACKAGE_MANAGERS.include?(a[:package_manager])}).tobe_truthy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:69:5: C: Examplehastoomanylines[15/5].it'should have correct properties for SNYK-JAVA-ORGJBPM-31602'do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:69:5: C: Examplehastoomanyexpectations[14/1].it'should have correct properties for SNYK-JAVA-ORGJBPM-31602'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:69:9: C: Donotuseshouldwhendescribingyourtests.it'should have correct properties for SNYK-JAVA-ORGJBPM-31602'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:70:25: C: Usefindinsteadofselect.first.vuln=advisories.select{ |v| v.id == 'snykio:maven:org.jbpm:jbpm-designer-client:31602'}.first
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:87:5: C: Examplehastoomanylines[15/5].it'should have correct properties for npm:xlsx:20180222'do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:87:5: C: Examplehastoomanyexpectations[14/1].it'should have correct properties for npm:xlsx:20180222'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:87:9: C: Donotuseshouldwhendescribingyourtests.it'should have correct properties for npm:xlsx:20180222'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:88:25: C: Usefindinsteadofselect.first.vuln=advisories.select{ |v| v.id == 'snykio:npm:xlsx:20180222'}.first
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:105:5: C: Examplehastoomanylines[15/5].it'should have correct properties for SNYK-PYTHON-SWAUTH-40766'do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:105:5: C: Examplehastoomanyexpectations[14/1].it'should have correct properties for SNYK-PYTHON-SWAUTH-40766'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:105:9: C: Donotuseshouldwhendescribingyourtests.it'should have correct properties for SNYK-PYTHON-SWAUTH-40766'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:106:25: C: Usefindinsteadofselect.first.vuln=advisories.select{ |v| v.id == 'snykio:pypi:swauth:40766'}.first
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:123:5: C: Examplehastoomanylines[15/5].it'should have correct properties for SNYK-RUBY-SORCERY-20425'do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:123:5: C: Examplehastoomanyexpectations[14/1].it'should have correct properties for SNYK-RUBY-SORCERY-20425'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:123:9: C: Donotuseshouldwhendescribingyourtests.it'should have correct properties for SNYK-RUBY-SORCERY-20425'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:124:25: C: Usefindinsteadofselect.first.vuln=advisories.select{ |v| v.id == 'snykio:rubygems:sorcery:20425'}.first
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:141:5: C: Examplehastoomanylines[15/5].it'should have correct properties for SNYK-GOLANG-GITHUBCOMBTCSUITEGOSOCKSSOCKS-50055'do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:141:5: C: Examplehastoomanyexpectations[14/1].it'should have correct properties for SNYK-GOLANG-GITHUBCOMBTCSUITEGOSOCKSSOCKS-50055'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:141:9: C: Donotuseshouldwhendescribingyourtests.it'should have correct properties for SNYK-GOLANG-GITHUBCOMBTCSUITEGOSOCKSSOCKS-50055'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:142:25: C: Usefindinsteadofselect.first.vuln=advisories.select{ |v| v.id == 'snykio:go:github.com/btcsuite/go-socks/socks:50055'}.first
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:159:5: C: Examplehastoomanylines[15/5].it'should have correct properties for SNYK-GOLANG-GITHUBCOMSNAPCORESNAPDDAEMON-50060'do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:159:5: C: Examplehastoomanyexpectations[14/1].it'should have correct properties for SNYK-GOLANG-GITHUBCOMSNAPCORESNAPDDAEMON-50060'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:159:9: C: Donotuseshouldwhendescribingyourtests.it'should have correct properties for SNYK-GOLANG-GITHUBCOMSNAPCORESNAPDDAEMON-50060'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:160:25: C: Usefindinsteadofselect.first.vuln=advisories.select{ |v| v.id == 'snykio:go:github.com/snapcore/snapd/daemon:50060'}.first
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:177:5: C: Examplehastoomanylines[15/5].it'should have correct properties for SNYK-PHP-CONTAOLISTINGBUNDLE-70371'do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:177:5: C: Examplehastoomanyexpectations[14/1].it'should have correct properties for SNYK-PHP-CONTAOLISTINGBUNDLE-70371'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:177:9: C: Donotuseshouldwhendescribingyourtests.it'should have correct properties for SNYK-PHP-CONTAOLISTINGBUNDLE-70371'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:178:25: C: Usefindinsteadofselect.first.vuln=advisories.select{ |v| v.id == 'snykio:packagist:contao/listing-bundle:70371'}.first
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:195:5: C: Examplehastoomanylines[15/5].it'should have correct properties for SNYK-DOTNET-MIME-60187'do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:195:5: C: Examplehastoomanyexpectations[14/1].it'should have correct properties for SNYK-DOTNET-MIME-60187'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:195:9: C: Donotuseshouldwhendescribingyourtests.it'should have correct properties for SNYK-DOTNET-MIME-60187'do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/snyk_io_spec.rb:196:25: C: Usefindinsteadofselect.first.vuln=advisories.select{ |v| v.id == 'snykio:nuget:mime:60187'}.first
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27filesinspected,42offensesdetected
The text was updated successfully, but these errors were encountered:
@artplan1 thanks for your report.
It is correct and this is something I would like to tackle it eventually.
In general I would like to keep a nice style in the code and catch most possible issues.
Feel free to send a PR with the improvements you noticed and also any extra plugins you find useful.
I started to work on #6 but found some things in repo
Rubocop plugins
I see
rubocop-rspec
in dependencies, but it's not required inrubocop.yml
, so it's not in use. Alsorubocop-performance
gem is missing (I can submit PR for this too)Rubocop report with enabled plugins
The text was updated successfully, but these errors were encountered: