From 2170d943a867b93994140ebbf33c6297abb33f0f Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Sun, 30 Apr 2017 11:45:20 -0700 Subject: [PATCH] adding cc --- .codeclimate.yml | 134 ++++++++++++++++++++++++++++++++++++ stanford_soe_regions.module | 10 +-- 2 files changed, 139 insertions(+), 5 deletions(-) create mode 100644 .codeclimate.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..3d65068 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,134 @@ + +engines: + # https://docs.codeclimate.com/docs/eslint + # ES Linting requires an .eslintrc file to tweak checks. + eslint: + enabled: false + csslint: + enabled: true + checks: + overqualified-elements: + enabled: false + # We don't lint our coffee. Eew. + coffeelint: + enabled: false + # SCSS Lint requires a .scss-lint.yml file in the repo in order to tweak settings. + # Withouth the .scss-lint.yml file it will run with the defaults. + # Defaults file: https://github.com/brigade/scss-lint/blob/master/config/default.yml + scss-lint: + enabled: true + checks: + IdSelector: + enabled: false + ColorVariable: + enabled: false + PropertySortOrder: + enabled: false + SelectorDepth: + enabled: false + QualifyingElement: + enabled: false + VendorPrefix: + enabled: false + LeadingZero: + enabled: false + phpcodesniffer: + enabled: true + checks: + Drupal Commenting FunctionComment TypeHintMissing: + enabled: false + Drupal Commenting FunctionComment IncorrectTypeHint: + enabled: false + DrupalPractice Commenting CommentEmptyLine SpacingAfter: + enabled: false + Drupal NamingConventions ValidFunctionName ScopeNotCamelCaps: + enabled: false + Drupal NamingConventions ValidClassName StartWithCaptial: + enabled: false + Drupal NamingConventions ValidFunctionName NotCamelCaps: + enabled: false + DrupalPractice General ClassName ClassPrefix: + enabled: false + Drupal NamingConventions ValidClassName NoUnderscores: + enabled: false + config: + file_extensions: "php,inc,install,module,profile" + standard: "Drupal,DrupalPractice" + phpmd: + enabled: true + checks: + Design/WeightedMethodCount: + enabled: false + CleanCode/StaticAccess: + enabled: false + CleanCode/ElseExpression: + enabled: false + CleanCode/BooleanArgumentFlag: + enabled: false + UnusedFormalParameter: + enabled: false + config: + # https://phpmd.org/rules/index.html + # The following sets include everything except the controversial set. + # We can configure these further through .xml files. See docs. + rulesets: "cleancode,codesize,design,naming,unusedcode" + # Include special Drupal file extensions. + file_extensions: "inc,module,profile,php,install" + # https://docs.codeclimate.com/docs/phan + phan: + enabled: true + config: + file_extensions: "php,module,profile,inc" + # minimum-severity: 1 + ignore-undeclared: true + # quick: true + # backward-compatiility-checks: true + # dead-code-detection: true + # https://docs.codeclimate.com/docs/duplication + duplication: + enabled: true + # exclude_paths: + # - examples/ + config: + languages: + javascript: + mass_threshold: 50 + # count_threshold: 3 + php: + mass_threshold: 60 + fixme: + enabled: true + config: + strings: + - FIXME + - BUG + - TODO + - todo + - dpm + - dsm +ratings: + paths: + - "**.inc" + - "**.module" + - "**.profile" + - "**.php" + - "**.install" + - "**.scss" + - "**.sass" + - "**.js" +# exclude these files/paths +exclude_paths: +- "**.features.**" +- "**.views_default.inc" +- "**.field_group.inc" +- "**.ds.inc" +- "**.bean.inc" +- "**.context.inc" +- "test/**/*" +- "**/vendor/**/*" +- "**.min.*" +- "tests/" +- "spec/" +- "**/vendor/" +- "**.api.php" +- "*.twig" diff --git a/stanford_soe_regions.module b/stanford_soe_regions.module index 12d67e1..0192019 100644 --- a/stanford_soe_regions.module +++ b/stanford_soe_regions.module @@ -43,7 +43,7 @@ function stanford_soe_regions_define_regions() { } /** - * Helper function for rendering the blocks in this region + * Helper function for rendering the blocks in this region. */ function _full_width_super_hero_render_region($block_html, $block) { $renderable_block = _block_get_renderable_array(array($block)); @@ -52,7 +52,7 @@ function _full_width_super_hero_render_region($block_html, $block) { } /** - * Helper function for rendering the blocks in this region + * Helper function for rendering the blocks in this region. */ function _content_body_lower_render_region($block_html, $block) { $renderable_block = _block_get_renderable_array(array($block)); @@ -61,7 +61,7 @@ function _content_body_lower_render_region($block_html, $block) { } /** - * Helper function for rendering the blocks in this region + * Helper function for rendering the blocks in this region. */ function _full_width_middle_render_region($block_html, $block) { $renderable_block = _block_get_renderable_array(array($block)); @@ -70,7 +70,7 @@ function _full_width_middle_render_region($block_html, $block) { } /** - * Helper function for rendering the blocks in this region + * Helper function for rendering the blocks in this region. */ function _content_body_bottom_render_region($block_html, $block) { $renderable_block = _block_get_renderable_array(array($block)); @@ -79,7 +79,7 @@ function _content_body_bottom_render_region($block_html, $block) { } /** - * Helper function for rendering the blocks in this region + * Helper function for rendering the blocks in this region. */ function _digital_magazine_megamenu_render_region($block_html, $block) { $renderable_block = _block_get_renderable_array(array($block));