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

業務のコード以外でRubyを書く/#write-ruby-other-than-busin...

 業務のコード以外でRubyを書く/#write-ruby-other-than-business-code

Masatoshi Moritsuka

May 28, 2020
Tweet

More Decks by Masatoshi Moritsuka

Other Decks in Programming

Transcript

  1. ࣗݾ঺հ ➤ ৿௩ ਅ೥ ➤ GitHub: @sanfrecce-osaka ➤ Twitter: @sanfrecce_osaka

    ➤ Qiita: @sanfrecce_osaka ➤ 2019೥9݄: େࡕ → ொా ➤ גࣜձࣾϥάβΠΞ ➤ ruby-jpͷॅਓ ➤ ίϛϡχςΟɾษڧձΦλΫ
  2. େྔͷ ES Lint ͷΤϥʔɾܯࠂͷूܭ yarn run v1.22.4 $ node_modules/eslint/bin/eslint.js --ext

    .ts,.tsx --cache . /xxx/xxx/Hoge.tsx 2:10 error 'XXXX' is defined but never used @typescript-eslint/ no-unused-vars … /xxx/xxx/Fuga.tsx 12:37 warning Unexpected any. Specify a different type @typescript- eslint/no-explicit-any 13:3 error 'children' is missing in props validation react/prop-types ✖ xxxxx problems (xxxxx errors, xxxxx warnings) τʔλϧܻ
  3. ूܭεΫϦϓτ File.open('errors.txt') do |f| pp f.readlines .map(&:strip)[3..] .reject(&method(:path?)) .map(&method(:extract)) .compact

    .reject(&:empty?) .tally .sort { _2[0] <=> _1[0] } .to_h end ๯಄ͷߦΛഉআ FOEMFTTSBOHF ʙ
  4. ࣮ߦεΫϦϓτ File.open('errors.txt') do |f| pp f.readlines .map(&:strip)[3..] .reject(&method(:path?)) .map(&method(:extract)) .compact

    .reject(&:empty?) .tally .sort { _2[0] <=> _1[0] } .to_h end ϧʔϧ໊Λؚ·ͳ͍ߦΛഉআ ۭߦআ͘
  5. ࣮ߦεΫϦϓτ File.open('errors.txt') do |f| pp f.readlines .map(&:strip)[3..] .reject(&method(:path?)) .map(&method(:extract)) .compact

    .reject(&:empty?) .tally .sort { _2[0] <=> _1[0] } .to_h end &OVNFSBCMFUBMMZ ʙ Ͱूܭ
  6. ࣮ߦεΫϦϓτ File.open('errors.txt') do |f| pp f.readlines .map(&:strip)[3..] .reject(&method(:path?)) .map(&method(:extract)) .compact

    .reject(&:empty?) .tally .sort { _2[0] <=> _1[0] } .to_h end ιʔτॲཧ /VNCFSFE1BSBNFUFST ʙ Ͱঢ߱ॱɺ ΠϯσοΫεͰιʔτͷର৅ ϧʔϧ໊PS਺  ΛมߋͰ͖Δ
  7. ࣮ߦεΫϦϓτ File.open('errors.txt') do |f| pp f.readlines .map(&:strip)[3..] .reject(&method(:path?)) .map(&method(:extract)) .compact

    .reject(&:empty?) .tally .sort { _2[0] <=> _1[0] } .to_h end )BTITPSU͸"SSBZΛฦ͢ͷͰ )BTIʹ໭͢