问题标签 [code-climate]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ruby-on-rails - Rails code quality tools that I can run in development mode without sharing my code
I came across https://codeclimate.com. Super awesome, but I'm working on a project whose code I cannot share with others or Code Climate.
Now I would like to be able to improve my code quality and wonder if anyone can suggest tools that do what codeclimate.com does but locally in development mode, without me having to share my code.
travis-ci - Integrating codeclimate with travis-ci, travis keeps failing to load codeclimate-test-reporter
Here's the public repo in question: https://travis-ci.org/agerwick/raw-sinatra-boilerplate
I integrated codeclimate's test reporter gem as advised here: http://docs.travis-ci.com/user/code-climate/
The error I keep getting is: /home/travis/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in 'require': cannot load such file -- codeclimate-test-reporter (LoadError)
As you can see from the log below, the codeclimate-test-reporter gem is being installed by Travis CI. I tried running the tests from my local computer with the CODECLIMATE_REPO_TOKEN environment variable set, and here it worked perfectly, updating the code climate test coverage status. Hence, the issue is only on travis.
Any advice on what to try next in order to get Travis CI to require codeclimate-test-reporter properly?
For historical purposes, here's the log from Travis CI:
ruby - CodeClimate::TestReporter::InvalidPayload
我面临以下问题,试图在 .travis.yml 上执行代码气候报告:
Code Climate 遇到异常:CodeClimate::TestReporter::InvalidPayload No source files were found in the test report payload
这里有人可以帮助我吗?
ruby - CodeClimate Coverage 错误:致命:不是 git 存储库 - 这是一个 git 存储库
完整输出:
我的代码在这里:https ://github.com/NullVoxPopuli/authorizable
这是我的spec_helper:
需要“rubygems”需要“捆绑器/设置”
这里发生了什么?问题的根源是什么,为什么报道记者甚至关心我的 spec/ 目录中的内容(当文件不以 _spec 结尾时)。
我需要添加某种过滤器吗?
ruby-on-rails - rails 重复代码 user_attributes
我有一个主管理员,他可以创建两个不同的管理员 [property, content_contributor]。在主管理员的要求参数中,我有这个
在主管理员属性中我有这个
我在代码环境中发现了重复项。如何避免用户属性重复?
travis-ci - 为什么 Travis CI 不为我的 Node 应用程序运行 CodeClimate 脚本?
我已按照说明将 CodeClimate 添加到我的.travis.yml
文件中:
我的构建中的所有内容都可以正常运行,除了最后的codeclimate
脚本:
我错过了什么?
ruby - Travis CI 上的 CodeClimate 覆盖率分析错误
我在我的新项目中遇到了 codeclimate-test-reporter 和 Travis CI 的问题。Travis CI 的覆盖率分析与本地的完全不同。具体来说,本地的 LOC 是 56(这是准确的),但是当我在 Travis CI 上构建项目时,它被列为 10,333。
代码和输出
本地输出(56 / 56 LOC)
Travis CI 输出(4954 / 10333 LOC?!)
spec_helper.rb(与 codeclimate-test-reporter 相关的位)
我试过的
我已经确认代码完全相同,并且这些结果对于每个测试的 ruby 都是相同的(在本地和 Travis CI 上,>=1.9.3 MRI)。我尝试将其限制为仅适用于 Travis 的一个 ruby 版本,但结果是相同的。我试过搜索类似的问题,但到目前为止,我只在他们的 repo 上发现了一个未解决的 GitHub 问题。
老实说,我什至不确定接下来要尝试什么来调试它,因为我无法在本地重现它。知道接下来要尝试什么吗?
r - 在 R 中使用 rWBclimate 获取历史数据
我能够使以下代码工作:
但我想将其更改为历史并从 1920、1939 年(甚至更早)开始。不幸的是,它一直在说未使用的论点
我基本上想创建一个显示历史温度的世界地图。任何帮助将不胜感激。谢谢!
php - How to install phpcodesniffer engine to work with CodeClimate CLI?
I'm just trying to use codeclimate cli to analyze my code locally. I'm using Mac OS X 10.10.3 and, as recommended here, I'm using boot2docker.
Everything good so far. I run codeclimate init
to generate .codeclimate.yml file and tweaked it. It looks like this:
After that I run codeclimate engines:install
and this is my output:
Finally, codeclimate engines:list
outputs:
Available engines:
- bundler-audit: Patch-level verification for Bundler
- coffeelint: A style checker for CoffeeScript
- csslint: Automated linting of Cascading Stylesheets
- eslint: A JavaScript/JSX linting utility
- gofmt: gofmt
- golint: golint
- govet: govet
- rubocop: A Ruby static code analyzer, based on the community Ruby style guide.
- rubymotion: Rubymotion-specific rubocop checks
- watson: A young Ember Doctor to help you fix your code.
What am I doing wrong? How should I install this engine?
Many thanks in advance