Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rubocop-parse_int

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rubocop-parse_int

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Rubocop ParseInt

RuboCop plugin to check for unsafe integer parsings

This plugin is composed of:

  • Lint/KernelIntegerWithoutBase
  • Lint/StringToInt (See the 'Note' section below)

Installation

Just install the rubocop-parse_int gem

gem install rubocop-parse_int

or if you use bundler plt this in your Gemfile

gem 'rubocop-rspec'

Usage

RuboCop configuration file

Put this into your .rubocop.yml.

require: rubocop-parse_int

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

Command line

rubocop --require rubocop-parse_int

Rake task

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

Note

Currently, Lint/StringToInt responds to calls to #to_i on a non-String variable too.

Contributing

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

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 24 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc