|
| 1 | +# This is our default .CodeClimate.yml, broken out by language. Uncomment the |
| 2 | +# sections at the bottom that apply to your project. ACTION comments indicate |
| 3 | +# places where config might need to be tweaked. |
| 4 | + |
| 5 | +version: "2" |
| 6 | + |
| 7 | +plugins: |
| 8 | + |
| 9 | +# --------------- |
| 10 | +# Cross-language plugins. Should always be on. |
| 11 | + |
| 12 | + duplication: # Looks for similar and identical code blocks |
| 13 | + enabled: true |
| 14 | + config: |
| 15 | + languages: |
| 16 | + go: |
| 17 | + java: |
| 18 | + javascript: |
| 19 | + php: |
| 20 | + python: |
| 21 | + python_version: 3 # ACTION Comment this out if using Python 2 |
| 22 | + ruby: |
| 23 | + swift: |
| 24 | + typescript: |
| 25 | + |
| 26 | + fixme: # Flags any FIXME, TODO, BUG, XXX, HACK comments so they can be fixed |
| 27 | + enabled: true |
| 28 | + issue_override: |
| 29 | + severity: info # Don't fail PRs for FIXME tags, but still flag them |
| 30 | + config: |
| 31 | + strings: |
| 32 | + - FIXME |
| 33 | + - TODO |
| 34 | + - HACK |
| 35 | + - XXX |
| 36 | + - BUG |
| 37 | + |
| 38 | +# --------------- |
| 39 | +# Commonly-used languages - run time is minimal and all of these will work |
| 40 | +# whether files of that language are found or not. In general, leave uncommented |
| 41 | + |
| 42 | + # Markdown |
| 43 | + markdownlint: |
| 44 | + enabled: true |
| 45 | + issue_override: |
| 46 | + severity: info # Should be redundant as CC says markdownlint defaults to |
| 47 | + # info already, but including it here to remind us it's so |
| 48 | + |
| 49 | + # Go |
| 50 | + gofmt: |
| 51 | + enabled: true |
| 52 | + golint: |
| 53 | + enabled: true |
| 54 | + govet: |
| 55 | + enabled: true |
| 56 | + |
| 57 | + # Ruby |
| 58 | + flog: |
| 59 | + enabled: true |
| 60 | + reek: |
| 61 | + enabled: true |
| 62 | + rubocop: |
| 63 | + enabled: true |
| 64 | + channel: rubocop-0-79 # As of March 10, 2020, rubocop 0.80.1 is the latest |
| 65 | + # However, it does not work with CodeClimate - throws |
| 66 | + # an Invalid JSON error. |
| 67 | + # ACTION uncomment bundler-audit below if using Gemfile/Gemfile.lock |
| 68 | + # ACTION uncomment brakeman below if using Rails |
| 69 | + |
| 70 | + # Shell scripts |
| 71 | + shellcheck: |
| 72 | + enabled: true |
| 73 | + |
| 74 | +# --------------- |
| 75 | +# Other languages - will work with or without language files present. Again, |
| 76 | +# runtime is minimal, so OK to leave uncommented. |
| 77 | + |
| 78 | + # CoffeeScript |
| 79 | + coffeelint: |
| 80 | + enabled: true |
| 81 | + |
| 82 | + # CSS |
| 83 | + csslint: |
| 84 | + enabled: true |
| 85 | + |
| 86 | + # Groovy |
| 87 | + codenarc: |
| 88 | + enabled: true |
| 89 | + |
| 90 | + # Java |
| 91 | + pmd: |
| 92 | + enabled: true |
| 93 | + sonar-java: |
| 94 | + enabled: true |
| 95 | + config: |
| 96 | + sonar.java.source: "7" # ACTION set this to the major version of Java used |
| 97 | + # ACTION uncomment checkstyle below if Java code exists in repo |
| 98 | + |
| 99 | + # Node.js |
| 100 | + nodesecurity: |
| 101 | + enabled: true |
| 102 | + # ACTION uncomment eslint below if JavaScript already exists and .eslintrc |
| 103 | + # file exists in repo |
| 104 | + |
| 105 | + # PHP |
| 106 | + phan: |
| 107 | + enabled: true |
| 108 | + config: |
| 109 | + file_extensions: "php" |
| 110 | + phpcodesniffer: |
| 111 | + enabled: true |
| 112 | + config: |
| 113 | + file_extensions: "php,inc,lib" |
| 114 | + # Using Wordpress standards as our one PHP repo is a Wordpress theme |
| 115 | + standards: "PSR1,PSR2,WordPress,WordPress-Core,WordPress-Extra" |
| 116 | + phpmd: |
| 117 | + enabled: true |
| 118 | + config: |
| 119 | + file_extensions: "php,inc,lib" |
| 120 | + rulesets: "cleancode,codesize,controversial,naming,unusedcode" |
| 121 | + sonar-php: |
| 122 | + enabled: true |
| 123 | + |
| 124 | + # Python |
| 125 | + bandit: |
| 126 | + enabled: true |
| 127 | + pep8: |
| 128 | + enabled: true |
| 129 | + radon: |
| 130 | + enabled: true |
| 131 | + # config: |
| 132 | + # python_version: 2 # ACTION Uncomment these 2 lines if using Python 2 |
| 133 | + sonar-python: |
| 134 | + enabled: true |
| 135 | + |
| 136 | +# --------------- |
| 137 | +# Configuration Required Language specific - these will error and abort the |
| 138 | +# codeclimate run if they are turned on and certain files or configuration are |
| 139 | +# missing. Should be commented out unless the project already includes the |
| 140 | +# necessary files that the linter looks at |
| 141 | + |
| 142 | + # Ruby - requires presence of Gemfile and Gemfile.lock |
| 143 | + # bundler-audit: |
| 144 | + # enabled: true |
| 145 | + |
| 146 | + # Rails - requires detecting a Rails application |
| 147 | + # brakeman: |
| 148 | + # enabled: true |
| 149 | + |
| 150 | + # Chef - requires detecting a cookbook |
| 151 | + # foodcritic: |
| 152 | + # enabled: true |
| 153 | + |
| 154 | + # Java - might require Java code? Errored when run without |
| 155 | + # checkstyle: |
| 156 | + # enabled: true |
| 157 | + |
| 158 | + # JavaScript - requires an eslintrc to be created and added to project |
| 159 | + # eslint: |
| 160 | + # enabled: true |
| 161 | + # channel: "eslint-6" |
| 162 | + |
| 163 | +# --------------- |
| 164 | +# List any files/folders to exclude from checking. Wildcards accepted. Leave |
| 165 | +# commented if no files to exclude as an empty array will error |
| 166 | +exclude_patterns: |
| 167 | + - ".gitignore" |
0 commit comments