Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Contribution Hatching: By RuboCop

Contribution Hatching: By RuboCop

iCARE Dev Meetup #32 (2022-04-20)

Koichi ITO

April 20, 2022
Tweet

More Decks by Koichi ITO

Other Decks in Programming

Transcript

  1. ,PJDIJ*50 !LPJD w 044QSPHSBNNFS w 3VCP$PQDPSFUFBN w )FBENBJOUBJOFSPG3VCP$PQ3BJMT  3VCP$PQ1FSGPSNBODF

    BOE 3VCP$PQ.JOJUFTU w &OHJOFFSJOH.BOBHFSBOE %JTUJOHVJTIFE&OHJOFFSPG&4. *OD
  2. 5IFpSTUDPNNJU % git log -p --reverse commit afbead34db54506c12a21dbd4ce04fada0f8b9a4 Author: Bozhidar

    Batsov <[email protected]> Date: Sat Apr 21 13:06:42 2012 +0300 Initial commit to rubocop. --- .document | 5 +++++ .gitignore | 49 +++++++++++++++++++++++++++++++++++++++ ++++++++++ .rspec | 1 + Gemfile | 16 ++++++++++++++++ LICENSE.txt | 20 ++++++++++++++++++++ README.rdoc | 19 +++++++++++++++++++ Rakefile | 45 +++++++++++++++++++++++++++++++++++++++ ++++++ features/rubocop.feature | 9 +++++++++ features/step_definitions/rubocop_steps.rb | 0 features/support/env.rb | 13 +++++++++++++
  3. 5IFpSTUDPNNJU % git log -p --reverse commit afbead34db54506c12a21dbd4ce04fada0f8b9a4 Author: Bozhidar

    Batsov <[email protected]> Date: Sat Apr 21 13:06:42 2012 +0300 Initial commit to rubocop. --- .document | 5 +++++ .gitignore | 49 +++++++++++++++++++++++++++++++++++++++ ++++++++++ .rspec | 1 + Gemfile | 16 ++++++++++++++++ LICENSE.txt | 20 ++++++++++++++++++++ README.rdoc | 19 +++++++++++++++++++ Rakefile | 45 +++++++++++++++++++++++++++++++++++++++ ++++++ features/rubocop.feature | 9 +++++++++ features/step_definitions/rubocop_steps.rb | 0 features/support/env.rb | 13 +++++++++++++ 👈
  4. .F

  5. w "SCFOWQMVHJO w (FUTPVSDFDPEFXJUIgit cloneBMPOH XJUIUIFSVOUJNFHFNXJUIgem install  bundle install

    w (FUEFQFOEFODZDPEF BTWBSJFUZDPEF  w #ZMJOLJOHXJUIghq SFQPTJUPSZ NBOBHFNFOUDBOCFDFOUSBMJ[FE HFNTSD
  6. %FNP % gem install solargraph Fetching solargraph-0.43.0.gem Fetching reverse_markdown-2.0.0.gem Fetching

    kramdown-parser-gfm-1.1.0.gem Fetching jaro_winkler-1.5.4.gem Fetching e2mmap-0.1.0.gem Fetching backport-1.2.0.gem clone http://github.com/xijo/reverse_markdown -> /Users/koic/src/ github.com/xijo/reverse_markdown git clone --recursive http://github.com/xijo/reverse_markdown /Users/koic/src/github.com/xijo/reverse_markdown Cloning into '/Users/koic/src/github.com/xijo/reverse_markdown'... warning: redirecting to https://github.com/xijo/reverse_markdown/ remote: Enumerating objects: 1377, done. remote: Total 1377 (delta 0), reused 0 (delta 0), pack-reused 1377 Receiving objects: 100% (1377/1377), 203.40 KiB | 749.00 KiB/s, done. Resolving deltas: 100% (796/796), done.
  7. SFQP(FNpMF # frozen_string_literal: true source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git"

    } gemspec # Use the latest RuboCop with the path option # (my local RuboCop code is mostly up to date 😀). # And it will be convenient to manage with ghq because # you do not have to worry about the value of path. gem 'rubocop', path: '/Users/koic/src/github.com/rubocop/rubocop'
  8. SFQPSVCPDPQZNM AllCops: # Include pending cop. EnabledByDefault: true # Include

    cop that works only with new Ruby syntax. TargetRubyVersion: 3.2 # Suppress `An AutocorrectNotice must be defined in your RuboCop config` warn. Style/Copyright: Enabled: false
  9. PSJHJOBOEVQTUSFBN PSJHJO %BZUJNFXPSL MPDBM PSJHJO MPDBM 044 VQTUSFBN 1VMM 3FRVFTU

    1VMM 3FRVFTU HJUQVMM HJUQVTI HJUQVMM HJUQVTI 'PSL HJUQVMMPSJHJONBTUFS HJUQVTIPSJHJOIFBE HJUQVMMPSJHJONBTUFS HJUQVTIVQTUSFBNIFBE git pushPQFSBUJPODBOCFDPOTJTUFOUCZTQFDJGZJOHheadJOTUFBEPGcurrent-branchOBNF
  10. PSJHJOBOEVQTUSFBN PSJHJO %BZUJNFXPSL MPDBM PSJHJO MPDBM 044 VQTUSFBN 1VMM 3FRVFTU

    1VMM 3FRVFTU HJUQVMM HJUQVTI HJUQVMM HJUQVTI 'PSL HJUQVMMPSJHJONBTUFS HJUQVTIPSJHJOIFBE HJUQVMMPSJHJONBTUFS HJUQVTIVQTUSFBNIFBE git pushPQFSBUJPODBOCFDPOTJTUFOUCZTQFDJGZJOHheadJOTUFBEPGcurrent-branchOBNF
  11. PSJHJOBOEVQTUSFBN PSJHJO VQTUSFBN %BZUJNFXPSL MPDBM PSJHJO MPDBM 044 VQTUSFBN 1VMM

    3FRVFTU 1VMM 3FRVFTU HJUQVMM HJUQVTI HJUQVMM HJUQVTI 'PSL HJUQVMMPSJHJONBTUFS HJUQVTIVQTUSFBNIFBE HJUQVMMPSJHJONBTUFS HJUQVTIVQTUSFBNIFBE "EESFTTUIFTBNF63-BTPSJHJO HJUSFNPUFBEEVQTUSFBNAHJUDPOpHHFUSFNPUFPSJHJOVSMA 👈5JQ
  12. .BLFUIFTBNFqPX PSJHJO VQTUSFBN %BZUJNFXPSL MPDBM PSJHJO MPDBM 044 VQTUSFBN 1VMM

    3FRVFTU 1VMM 3FRVFTU HJUQVMM HJUQVTI HJUQVMM HJUQVTI 'PSL HJUQVMMPSJHJONBTUFS HJUQVTIVQTUSFBNIFBE HJUQVMMPSJHJONBTUFS HJUQVTIVQTUSFBNIFBE "EESFTTUIFTBNF63-BTPSJHJO HJUSFNPUFBEEVQTUSFBNAHJUDPOpHHFUSFNPUFPSJHJOVSMA 👈5JQ QSJWBUFSFQP QVCMJDSFQP