All Projects → DmitryTsepelev → rubocop-graphql

DmitryTsepelev / rubocop-graphql

Licence: MIT license
Rubocop extension for enforcing graphql-ruby best practices

Programming Languages

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

Projects that are alternatives of or similar to rubocop-graphql

Rubocop Packaging
A RuboCop extension focused on enforcing upstream best practices and coding conventions.
Stars: ✭ 29 (-79.72%)
Mutual labels:  rubocop, static-code-analysis, linter
Rubocop Performance
An extension of RuboCop focused on code performance checks.
Stars: ✭ 340 (+137.76%)
Mutual labels:  rubocop, static-code-analysis, linter
Rubocop Rails
A RuboCop extension focused on enforcing Rails best practices and coding conventions.
Stars: ✭ 433 (+202.8%)
Mutual labels:  rubocop, static-code-analysis, linter
Rubocop
A Ruby static code analyzer and formatter, based on the community Ruby style guide.
Stars: ✭ 11,593 (+8006.99%)
Mutual labels:  rubocop, static-code-analysis, linter
action-rubocop
Run rubocop with reviewdog 🐶
Stars: ✭ 83 (-41.96%)
Mutual labels:  rubocop, linter
rubocop-linter-action
Rubocop Linter Action: A GitHub Action to run Rubocop against your code!
Stars: ✭ 86 (-39.86%)
Mutual labels:  rubocop, linter
jetrockets-standard
Standard RuboCop configuration for JetRockets with cookies
Stars: ✭ 14 (-90.21%)
Mutual labels:  rubocop, linter
Spotbugs
SpotBugs is FindBugs' successor. A tool for static analysis to look for bugs in Java code.
Stars: ✭ 2,569 (+1696.5%)
Mutual labels:  static-code-analysis, linter
Lint Review
An automated code linting bot that integrates various code lint tools with github pull requests.
Stars: ✭ 279 (+95.1%)
Mutual labels:  rubocop, linter
Policial
Review pull requests for style guide violations
Stars: ✭ 36 (-74.83%)
Mutual labels:  rubocop, linter
vscode-linter
Extension for code linting, all in one package. New linters can be easily added through an extension framework.
Stars: ✭ 47 (-67.13%)
Mutual labels:  rubocop, linter
Eslint Plugin Markdown
Lint JavaScript code blocks in Markdown documents
Stars: ✭ 242 (+69.23%)
Mutual labels:  static-code-analysis, linter
Revive
🔥 ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint
Stars: ✭ 3,139 (+2095.1%)
Mutual labels:  static-code-analysis, linter
Whispers
Identify hardcoded secrets and dangerous behaviours
Stars: ✭ 66 (-53.85%)
Mutual labels:  static-code-analysis, linter
tryceratops
A linter to prevent exception handling antipatterns in Python (limited only for those who like dinosaurs).
Stars: ✭ 381 (+166.43%)
Mutual labels:  static-code-analysis, linter
healthier
🧘‍♀️ Healthier is an opinionated style agnostic code linter – a friendly companion to Prettier
Stars: ✭ 78 (-45.45%)
Mutual labels:  static-code-analysis, linter
Cflint
Static code analysis for CFML (a linter)
Stars: ✭ 156 (+9.09%)
Mutual labels:  static-code-analysis, linter
Eslint Config Standard
ESLint Config for JavaScript Standard Style
Stars: ✭ 2,229 (+1458.74%)
Mutual labels:  static-code-analysis, linter
mllint
`mllint` is a command-line utility to evaluate the technical quality of Python Machine Learning (ML) projects by means of static analysis of the project's repository.
Stars: ✭ 67 (-53.15%)
Mutual labels:  best-practices, linter
codeclimate-apexmetrics
ApexMetrics - Code Climate engine for Salesforce [DISCONTINUED use CC PMD instead)
Stars: ✭ 46 (-67.83%)
Mutual labels:  static-code-analysis, linter

RuboCop::GraphQL

Rubocop extension for enforcing graphql-ruby best practices.

Sponsored by Evil Martians

Installation

Install the gem:

gem install rubocop-graphql

If you use bundler put this in your Gemfile:

gem 'rubocop-graphql', require: false

Usage

You need to tell RuboCop to load the GraphQL extension. There are three ways to do this:

RuboCop configuration file

Put this into your .rubocop.yml.

require: rubocop-graphql

Alternatively, use the following array notation when specifying multiple extensions.

require:
  - rubocop-other-extension
  - rubocop-graphql

Now you can run rubocop and it will automatically load the RuboCop GraphQL cops together with the standard cops.

Command line

rubocop --require rubocop-graphql

Rake task

RuboCop::RakeTask.new do |task|
  task.requires << 'rubocop-graphql'
end

The Cops

All cops are located under lib/rubocop/cop/graphql, and contain examples and documentation.

In your .rubocop.yml, you may treat the GraphQL cops just like any other cop. For example:

GraphQL/ResolverMethodLength:
  Max: 3

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/DmitryTsepelev/rubocop-graphql.

License

The gem is available as open source under the terms of the MIT 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].