Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Revertcodeclimate-parser, dependency bumps#384

Draft
larkinscott wants to merge2 commits intomaster
base:master
Choose a base branch
Loading
fromsl/revert-ruby-3x-bump
Draft
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionDockerfile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
FROM codeclimate/codeclimate-parser:b962
FROM codeclimate/codeclimate-parser:b946
LABEL maintainer="Code Climate <hello@codeclimate.com>"

# Reset from base image
Expand Down
4 changes: 2 additions & 2 deletionsGemfile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,8 +2,8 @@
source "https://rubygems.org"

gem "concurrent-ruby", "~> 1.0.0"
gem "flay", "~> 2.13.1"
gem "sexp_processor", "~> 4.17"
gem "flay", "~> 2.12"
gem "sexp_processor", "~> 4.11"

gem "codeclimate-parser-client",
path: "/home/app/codeclimate-parser-client"
Expand Down
66 changes: 34 additions & 32 deletionsGemfile.lock
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,56 +3,58 @@ PATH
specs:
codeclimate-parser-client (0.0.0)
ast (~> 2.3)
excon (~> 0.99.0)
excon (~> 0.57.0)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
coderay (1.1.3)
concurrent-ruby (1.0.5)
diff-lcs (1.5.0)
erubi (1.12.0)
excon (0.99.0)
flay (2.13.1)
erubi (~>1.10)
ast (2.3.0)
coderay (1.1.0)
concurrent-ruby (1.0.0)
diff-lcs (1.2.5)
erubis (2.7.0)
excon (0.57.1)
flay (2.12.0)
erubis (~>2.7.0)
path_expander (~> 1.0)
ruby_parser (~> 3.0)
sexp_processor (~> 4.0)
method_source (1.0.0)
path_expander (1.1.1)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
rake (13.1.0)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
method_source (0.8.2)
path_expander (1.0.3)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rake (10.4.2)
rspec (3.3.0)
rspec-core (~> 3.3.0)
rspec-expectations (~> 3.3.0)
rspec-mocks (~> 3.3.0)
rspec-core (3.3.2)
rspec-support (~> 3.3.0)
rspec-expectations (3.3.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.6)
rspec-support (~> 3.3.0)
rspec-mocks (3.3.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
ruby_parser (3.20.3)
sexp_processor (~> 4.16)
sexp_processor (4.17.0)
rspec-support (~> 3.3.0)
rspec-support (3.3.0)
ruby_parser (3.11.0)
sexp_processor (~> 4.9)
sexp_processor (4.11.0)
slop (3.6.0)

PLATFORMS
ruby

DEPENDENCIES
codeclimate-parser-client!
concurrent-ruby (~> 1.0.0)
flay (~> 2.13.1)
flay (~> 2.12)
pry
rake
rspec
sexp_processor (~> 4.17)
sexp_processor (~> 4.11)

BUNDLED WITH
2.4.22
2.3.12
46 changes: 0 additions & 46 deletionslib/cc/engine/analyzers/analyzer_base.rb
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,5 @@
# frozen_string_literal: true

# Monkey patch for Parser class
# used in language analyzers via Sexp::Matcher.parse
# https://github.com/seattlerb/sexp_processor/blob/master/lib/sexp_matcher.rb
class Sexp
class Matcher < Sexp
class Parser
def parse_sexp
token = next_token

case token
when "(" then
parse_list
when "[" then
parse_cmd
when "nil" then
nil
when /^\d+$/ then
token.to_i
when "___" then
Sexp.___
when "_" then
Sexp._
when %r%^/(.*)/$% then
re = $1
raise SyntaxError, "Not allowed: /%p/" % [re] unless
re =~ /\A([\w()|.*+^$]+)\z/
Regexp.new re
when /^"(.*)"$/ then
$1
when /^([A-Z]\w*)$/ then
if Object.const_defined?($1)
Object.const_get $1
else
# Handle as a symbol or string
$1.to_sym # or return $1 as a string
end
when /^:?([\w?!=~-]+)$/ then
$1.to_sym
else
raise SyntaxError, "unhandled token: %p" % [token]
end
end
end
end
end

require "cc/engine/analyzers/parser_error"
require "cc/engine/analyzers/parser_base"
require "cc/engine/analyzers/file_list"
Expand Down
4 changes: 2 additions & 2 deletionsspec/cc/engine/analyzers/ruby/main_spec.rb
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,10 +61,10 @@ def self.from_remediation_amount(amount)

expect(json["location"]).to eq({
"path" => "foo.rb",
"lines" => { "begin" => 2, "end" =>11 },
"lines" => { "begin" => 2, "end" =>12 },
})
expect(json["other_locations"]).to eq([
{"path" => "foo.rb", "lines" => { "begin" => 18, "end" =>27} },
{"path" => "foo.rb", "lines" => { "begin" => 18, "end" =>28} },
])
end

Expand Down
4 changes: 2 additions & 2 deletionsspec/cc/engine/analyzers/sexp_lines_spec.rb
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,9 +18,9 @@ module CC::Engine::Analyzers

expect(locations.count).to eq 2
expect(locations[0].begin_line).to eq(3)
expect(locations[0].end_line).to eq(4)
expect(locations[0].end_line).to eq(7)
expect(locations[1].begin_line).to eq(5)
expect(locations[1].end_line).to eq(6)
expect(locations[1].end_line).to eq(7)
end

it "gets appropriate locations for hashes" do
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp