mirror of
https://github.com/tailix/libkernaux.git
synced 2025-02-24 15:55:41 -05:00
mruby: initialize Bundler project and add RuboCop
This commit is contained in:
parent
0056a46bbb
commit
605a7634df
5 changed files with 97 additions and 0 deletions
6
pkgs/mruby/.gitignore
vendored
6
pkgs/mruby/.gitignore
vendored
|
@ -1 +1,7 @@
|
|||
/build_config.rb.lock
|
||||
|
||||
# For a library or gem, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in.
|
||||
/Gemfile.lock
|
||||
/.ruby-version
|
||||
/.ruby-gemset
|
||||
|
|
56
pkgs/mruby/.rubocop.yml
Normal file
56
pkgs/mruby/.rubocop.yml
Normal file
|
@ -0,0 +1,56 @@
|
|||
require:
|
||||
- rubocop-performance
|
||||
- rubocop-rake
|
||||
|
||||
AllCops:
|
||||
TargetRubyVersion: 3.0
|
||||
DisplayCopNames: true
|
||||
NewCops: enable
|
||||
|
||||
Layout/AccessModifierIndentation:
|
||||
EnforcedStyle: outdent
|
||||
|
||||
Layout/LineLength:
|
||||
Max: 80
|
||||
|
||||
Lint/AmbiguousOperatorPrecedence:
|
||||
Enabled: false
|
||||
|
||||
Lint/ReturnInVoidContext:
|
||||
Enabled: false
|
||||
|
||||
Metrics/BlockLength:
|
||||
Exclude:
|
||||
- 'Rakefile'
|
||||
- 'test/**/*.rb'
|
||||
|
||||
Style/AndOr:
|
||||
EnforcedStyle: conditionals
|
||||
|
||||
Style/Documentation:
|
||||
Exclude:
|
||||
- 'Rakefile'
|
||||
|
||||
Style/DoubleNegation:
|
||||
Enabled: false
|
||||
|
||||
Style/FrozenStringLiteralComment:
|
||||
Enabled: false
|
||||
|
||||
Style/HashAsLastArrayItem:
|
||||
Enabled: false
|
||||
|
||||
Style/PerlBackrefs:
|
||||
Enabled: false
|
||||
|
||||
Style/TrailingCommaInArguments:
|
||||
EnforcedStyleForMultiline: comma
|
||||
|
||||
Style/TrailingCommaInArrayLiteral:
|
||||
EnforcedStyleForMultiline: comma
|
||||
|
||||
Style/TrailingCommaInHashLiteral:
|
||||
EnforcedStyleForMultiline: comma
|
||||
|
||||
Style/VariableInterpolation:
|
||||
Enabled: false
|
9
pkgs/mruby/Gemfile
Normal file
9
pkgs/mruby/Gemfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'bundler', '~> 2.2'
|
||||
gem 'rake', '~> 13.0'
|
||||
gem 'rubocop', '~> 1.25'
|
||||
gem 'rubocop-performance', '~> 1.13'
|
||||
gem 'rubocop-rake', '~> 0.6'
|
17
pkgs/mruby/Rakefile
Normal file
17
pkgs/mruby/Rakefile
Normal file
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
desc 'Run default checks'
|
||||
task default: :lint
|
||||
|
||||
desc 'Run code analysis tools'
|
||||
task lint: :rubocop
|
||||
|
||||
desc 'Fix code style (rubocop --auto-correct)'
|
||||
task fix: 'rubocop:auto_correct'
|
||||
|
||||
begin
|
||||
require 'rubocop/rake_task'
|
||||
RuboCop::RakeTask.new
|
||||
rescue LoadError
|
||||
nil
|
||||
end
|
9
pkgs/mruby/bin/setup
Executable file
9
pkgs/mruby/bin/setup
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
set -vx
|
||||
|
||||
bundle install
|
||||
|
||||
# Do any other automated setup that you need to do here
|
Loading…
Add table
Reference in a new issue