Merged
Show file tree
Hide file tree
Changes from all commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Failed to load files.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
.git
Makefile
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ RUN apk --update add nodejs git ruby ruby-dev ruby-bundler less ruby-nokogiri bu
bundle install -j 4 && \
apk del build-base && rm -fr /usr/share/ri

RUN npm install -g codeclimate/csslint.git#27a21742
RUN npm install -g codeclimate/csslint.git#43d315c2

RUN adduser -u 9000 -D app
USER app
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,25 +7,21 @@ machine:
CODECLIMATE_DOCKER_REGISTRY_USERNAME: circleci
CODECLIMATE_DOCKER_REGISTRY_EMAIL: [email protected]

dependencies:
override:
- echo $gcloud_json_key_base64 | sed 's/ //g' | base64 -d > /tmp/gcloud_key.json
- curl https://sdk.cloud.google.com | bash
- bundle install
- npm install -g codeclimate/csslint.git#7a3a6be

test:
override:
- bundle exec rspec spec
- docker build -t=$registry_root/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM .
- make test

deployment:
registry:
branch: master
commands:
# GCR for .com
- echo $gcloud_json_key_base64 | sed 's/ //g' | base64 -d > /tmp/gcloud_key.json
- docker tag codeclimate/codeclimate-csslint $registry_root/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM
- gcloud auth activate-service-account --key-file /tmp/gcloud_key.json
- gcloud docker -a
- docker push $registry_root/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM
- gcloud docker push $registry_root/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM

# registry.codeclimate.net for CC:E
- docker login --username=$CODECLIMATE_DOCKER_REGISTRY_USERNAME --password=$CODECLIMATE_DOCKER_REGISTRY_PASSWORD --email=$CODECLIMATE_DOCKER_REGISTRY_EMAIL $CODECLIMATE_DOCKER_REGISTRY_HOSTNAME
- docker tag $registry_root/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM $CODECLIMATE_DOCKER_REGISTRY_HOSTNAME/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM
- docker push $CODECLIMATE_DOCKER_REGISTRY_HOSTNAME/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ def run
next unless node.name == "error"

lint = node.attributes
check_name = lint["source"].value
check_name = lint["identifier"].value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be prefixed in the resulting json?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. Any check-prefixing is meant to be done from the outside. RuboCop's current behavior notwithstanding, that's the future we want to build for -- so says @brynary anyway.

check_details = CheckDetails.fetch(check_name)

issue = {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@ class CC::Engine::CSSlint
describe CheckDetails do
describe ".fetch" do
it "returns details for customized checks" do
details = CheckDetails.fetch("net.csslint.Disallow@import")
details = CheckDetails.fetch("import")

expect(details.categories).to eq ["Bug Risk"]
expect(details.remediation_points).to eq 50_000
Expand Down