Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm support #6

Merged
merged 2 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion .codeclimate_diff.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
main_branch_name: main
threshold_to_run_on_all_files: 10
threshold_to_run_on_all_files: 10
# For ARM based processors, use linux/x86_64
docker_platform: linux/amd64
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
codeclimate_diff (0.1.9)
codeclimate_diff (0.1.10)
colorize
json
optparse
Expand Down
4 changes: 4 additions & 0 deletions lib/codeclimate_diff/codeclimate_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@

module CodeclimateDiff
class CodeclimateWrapper

def run_codeclimate(filename = "")
docker_platform = CodeclimateDiff.configuration["docker_platform"] || "linux/amd64"

`docker run \
--interactive --tty --rm \
--env CODECLIMATE_CODE="$PWD" \
--volume "$PWD":/code \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume /tmp/cc:/tmp/cc \
--platform #{docker_platform} \
codeclimate/codeclimate analyze -f json #{filename}`
end

Expand Down
2 changes: 1 addition & 1 deletion lib/codeclimate_diff/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module CodeclimateDiff
VERSION = "0.1.9"
VERSION = "0.1.10"
end
Loading