From bc1f6efc407e3371a2c622d29f23c11bc7b80c24 Mon Sep 17 00:00:00 2001 From: Gerard Caulfield Date: Mon, 4 Jul 2016 16:57:23 +1000 Subject: [PATCH 1/3] Add rubycop checking to codeclimate According to the Contributing guide (https://github.com/awesome-print/awesome_print/blob/master/CONTRIBUTING.md) we encourage sticking to the Ruby style guide. However our code climate setup does not use the Rubocop engine to check against this style guide. This commit enables the Rubocop checking. I'm not 100% sure if this affects the code climate score, but even if it is I think this is for the best as currently we are just hiding the issues. --- .codeclimate | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .codeclimate diff --git a/.codeclimate b/.codeclimate new file mode 100644 index 0000000..789aa8b --- /dev/null +++ b/.codeclimate @@ -0,0 +1,3 @@ +engines: + rubocop: + enabled: true From 46e801b2b789272bde98442e186622350d4801f6 Mon Sep 17 00:00:00 2001 From: Gerard Caulfield Date: Mon, 4 Jul 2016 17:18:40 +1000 Subject: [PATCH 2/3] Add some codeclimate recommended config Codeclimate automatically generates a configuration and recommends applying it. I have applied some of the options they specify. The only thing I removed was the restriction of rubocop checks which we are currently failing (I'd prefer they fail) and additional languages such as php, python and javascript which had strangely been added to the config. --- .codeclimate.yml | 16 ++++++++++++++++ .rubocop.yml | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 .codeclimate.yml create mode 100644 .rubocop.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..b86b6ea --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,16 @@ +--- +engines: + duplication: + enabled: true + config: + languages: + - ruby + fixme: + enabled: true + rubocop: + enabled: true +ratings: + paths: + - "**.rb" +exclude_paths: +- spec/ diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..c96fa30 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,2 @@ +AllCops: + DisabledByDefault: false From 5d15c0097c31bc4c06d971e4a83387b945bee221 Mon Sep 17 00:00:00 2001 From: Gerard Caulfield Date: Tue, 5 Jul 2016 09:01:03 +1000 Subject: [PATCH 3/3] Add reek engine May as well add reek checks while I'm adding the rubocop engine --- .codeclimate | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.codeclimate b/.codeclimate index 789aa8b..a1233e7 100644 --- a/.codeclimate +++ b/.codeclimate @@ -1,3 +1,5 @@ engines: rubocop: enabled: true + reek: + enabled: true