All Projects → codeclimate → Codeclimate

codeclimate / Codeclimate

Licence: agpl-3.0
Code Climate CLI

Programming Languages

ruby
36898 projects - #4 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to Codeclimate

codeclimate-phpcodesniffer
Code Climate Engine for PHP Code Sniffer
Stars: ✭ 27 (-98.81%)
Mutual labels:  quality, static-code-analysis, static-analysis, code-quality, codeclimate, codeclimate-engine
codeclimate-duplication
Code Climate engine for code duplication analysis
Stars: ✭ 96 (-95.78%)
Mutual labels:  quality, static-code-analysis, static-analysis, code-quality, codeclimate, codeclimate-engine
codeclimate-eslint
Code Climate Engine for ESLint
Stars: ✭ 86 (-96.22%)
Mutual labels:  quality, static-code-analysis, static-analysis, code-quality, codeclimate, codeclimate-engine
Reviewdog
🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+99.78%)
Mutual labels:  static-analysis, static-code-analysis, code-quality
qodana-action
⚙️ Scan your Java, Kotlin, PHP, Python, JavaScript, TypeScript projects at GitHub with Qodana
Stars: ✭ 112 (-95.07%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
Sonar Php
🐘 SonarPHP: PHP static analyzer for SonarQube & SonarLint
Stars: ✭ 288 (-87.33%)
Mutual labels:  static-analysis, static-code-analysis, code-quality
Sonar Dotnet
Code analyzer for C# and VB.NET projects https://redirect.sonarsource.com/plugins/vbnet.html
Stars: ✭ 466 (-79.5%)
Mutual labels:  static-analysis, static-code-analysis, code-quality
Pylint
It's not just a linter that annoys you!
Stars: ✭ 3,733 (+64.23%)
Mutual labels:  static-analysis, static-code-analysis, code-quality
Cflint
Static code analysis for CFML (a linter)
Stars: ✭ 156 (-93.14%)
Mutual labels:  static-analysis, static-code-analysis, code-quality
Checkstyle
Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program.
Stars: ✭ 6,481 (+185.13%)
Mutual labels:  static-analysis, static-code-analysis, code-quality
Sonarjs
SonarSource Static Analyzer for JavaScript and TypeScript
Stars: ✭ 696 (-69.38%)
Mutual labels:  static-analysis, static-code-analysis, code-quality
Coveragechecker
Allows old code to use new standards
Stars: ✭ 159 (-93%)
Mutual labels:  quality, hacktoberfest, static-code-analysis
Abaplint
Standalone linter for ABAP
Stars: ✭ 111 (-95.12%)
Mutual labels:  static-analysis, hacktoberfest, static-code-analysis
static-code-analysis-plugin
A plugin to simplify Static Code Analysis on Gradle. Not restricted to, but specially useful, in Android projects, by making sure all analysis can access the SDK classes.
Stars: ✭ 36 (-98.42%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
Infer
A static analyzer for Java, C, C++, and Objective-C
Stars: ✭ 12,823 (+464.14%)
Mutual labels:  static-analysis, static-code-analysis, code-quality
Pmd
An extensible multilanguage static code analyzer.
Stars: ✭ 3,667 (+61.33%)
Mutual labels:  static-analysis, static-code-analysis, code-quality
elm-review
Analyzes Elm projects, to help find mistakes before your users find them.
Stars: ✭ 195 (-91.42%)
Mutual labels:  quality, static-code-analysis, code-quality
python-test-reporter
DEPRECATED Uploads Python test coverage data to Code Climate
Stars: ✭ 18 (-99.21%)
Mutual labels:  quality, code-quality, codeclimate
Pep8speaks
A GitHub app to automatically review Python code style over Pull Requests
Stars: ✭ 546 (-75.98%)
Mutual labels:  static-analysis, static-code-analysis, code-quality
Sonar Java
☕️ SonarSource Static Analyzer for Java Code Quality and Security
Stars: ✭ 745 (-67.22%)
Mutual labels:  static-analysis, quality, static-code-analysis

Code Climate CLI

Code Climate CircleCI

Overview

codeclimate is a command line interface for the Code Climate analysis platform. It allows you to run Code Climate engines on your local machine inside of Docker containers.

Prerequisites

The Code Climate CLI is distributed and run as a Docker image. The engines that perform the actual analyses are also Docker images. To support this, you must have Docker installed and running locally. We also require that the Docker daemon supports connections on the default Unix socket /var/run/docker.sock.

On macOS, we recommend using Docker for Mac.

Installation

macOS

brew tap codeclimate/formulae
brew install codeclimate

To update the brew package, use brew update first:

brew update
brew upgrade codeclimate

Anywhere

curl -L https://github.com/codeclimate/codeclimate/archive/master.tar.gz | tar xvz
cd codeclimate-* && sudo make install

To upgrade to a newer version, just run those steps again.

Manual Docker invocation

The above packages pull the docker image and install a shell script wrapper. In some cases you may want to run the docker image directly.

To pull the docker image:

docker pull codeclimate/codeclimate

To invoke the CLI via Docker:

docker run \
  --interactive --tty --rm \
  --env CODECLIMATE_CODE="$PWD" \
  --volume "$PWD":/code \
  --volume /var/run/docker.sock:/var/run/docker.sock \
  --volume /tmp/cc:/tmp/cc \
  codeclimate/codeclimate help

Project setup

Configuration

No explicit configuration is needed: by default codeclimate analyze will evaluate supported source files in your repository using our maintainability checks. To change default configuration to customize how the maintainability checks are evaluated, or to turn on open source plugins, see our documentation on advanced configuration.

Plugin installation

Plugins, or "engines", are the docker images that run analysis tools. We support many different plugins, and will only install the ones necessary to run analysis. As part of setting up your project, we recommend running codeclimate engines:install from within your repository before running codeclimate analyze, and after adding any new plugins to your configuration file.

Running analysis

Once you've installed plugins and made any necessary changes to your configuration, run codeclimate analyze to run analysis and see a report on any issues in your repository.

Commands

A list of available commands is accessible by running codeclimate or codeclimate help.

$ codeclimate help

Available commands:
    analyze [-f format] [-e engine[:channel]] [--dev] [path]
    console
    engines:install
    engines:list
    help [command]
    prepare [--allow-internal-ips]
    validate-config
    version

The following is a brief explanation of each available command.

  • analyze Analyze all relevant files in the current working directory. All engines that are enabled in your .codeclimate.yml file will run, one after another. The -f (or format) argument allows you to set the output format of the analysis (using json, text, or html). The --dev flag lets you run engines not known to the CLI, for example if you're an engine author developing your own, unreleased image.

    You can optionally provide a specific path to analyze. If not provided, the CLI will analyze your entire repository, except for your configured exclude_paths. When you do provide an explicit path to analyze, your configured exclude_paths are ignored, and normally excluded files will be analyzed.

    You can also pipe in source in combination with a path to analyze code that is not yet written to disk. This is useful when you want to check if your source code style matches the project's. This is also a good way to implement integration with an editor to check style on the fly.

  • console start an interactive session providing access to the classes within the CLI. Useful for engine developers and maintainers.

  • engines:install Compares the list of engines in your .codeclimate.yml file to those that are currently installed, then installs any missing engines and checks for new images available for existing engines.

  • engines:list Lists all available engines in the Code Climate Docker Hub .

  • help Displays a list of commands that can be passed to the Code Climate CLI.

  • validate-config Validates the .codeclimate.yml file in the current working directory.

  • version Displays the current version of the Code Climate CLI.

Environment Variables

  • To run codeclimate in debug mode:

    CODECLIMATE_DEBUG=1 codeclimate analyze
    

    Prints additional information about the analysis steps, including any stderr produced by engines.

  • To increase the amount of time each engine container may run (default 15 min):

    # 30 minutes
    CONTAINER_TIMEOUT_SECONDS=1800 codeclimate analyze
    
  • You can also configure the default alotted memory with which each engine runs (default is 1,024,000,000 bytes):

    # 2,000,000,000 bytes
    ENGINE_MEMORY_LIMIT_BYTES=2000000000 codeclimate analyze
    

Releasing a new version

CLI's new versions are released automatically when updating VERSION on master.

The releasing process includes;

  1. Push new version to rubygems.
  2. Create a new release on Github and an associated tag.
  3. Update docker images:
  • Push new latest image.
  • Push new image with latest version as tag.

Ideally someone will open a pull request against master updating only VERSION.

There is script in place, which assumes hub is installed, to facilitate that. Check the current VERSION (cat VERSION) and upgrade accordingly running:

./bin/prep-release <VERSION>

Copyright

See LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].