? ɹRuboCopΛͬͨ͜ͱͷ͋Δํ✋ 2. Do you love RuboCop ? ɹRuboCop͕େ͖ͳํ✋ 3. Have you felt uncomfortable with RuboCop ? ɹRuboCopʹۤखײΛײͨ͜͡ͱͷ͋Δํ✋ 4. Have you written .rubocop.yml by yourself ? ɹRuboCopͷઃఆϑΝΠϧʢ.rubocop.ymlʣΛ࡞ΓࠐΜͩ͜ͱͷ͋Δํ✋
mutable objects assigned to constants Layout/FirstArrayElementIndentation: Indent the right bracket the same as the start of the line where the left bracket is. VALUES = [ 'foo'.freeze, 'bar'.freeze ].freeze Very Useful !!
The good thing about Ruby is that you can write in the best way for your situation ঢ়گʹ͋Θͤͯ࠷దͳॻ͖ํ͕Ͱ͖Δͷ͕Rubyͷ͍͍ͱ͜Ζ • In my opinion, the style guide in “Ruby Way” should be dynamic RubyͬΆ͍ελΠϧΨΠυɺಈతͳͷͰͳ͍͔ʁ
ɹRuboCopΛ͏ඞཁੑڧ͘ͳ͍ͬͯΔ • My concern is not about “(static) style guide preferences" ʮͲͷ(੩తͳ) Style GuideΛΉ͔ʯͰࡁ·ͳ͍ͩͱࢥ͍ͬͯΔ • People may be forced to follow rules that do not fi t their situation ɹঢ়گʹ߹Θͳ͍ϧʔϧΛڧ੍͞ΕΔϦεΫ͕͋Δ • Con fi guration fl exibility is not enough to avoid the risk ɹઃఆͷॊೈ͚ͩ͞ͰͦͷϦεΫΛճආͰ͖ͳ͍
worse ɹίʔυ͕վѱ͞ΕΔϦεΫ 2. Avoid opposite values ɹਅٯͷՁ؍ 3. Protect freedom of expression ɹදݱͷࣗ༝ΛकΔ 4. Don't discourage DSL ɹDSLԽʹྫྷਫΛ͔͚ͳ͍ I will write the rest part in our ‘ສ༿note' ଓ͖ສ༿noteʹͰ ॻ͍͍͖͍ͯͨͱࢥ͍·͢
right reason to want to break the rule ɹϧʔϧʹҧ͍ͨ͠ਖ਼ͳཧ༝Λ૾ • Consider the frequency of that cases ɹҧͨ͘͠ͳΔέʔεͷසΛݕ౼ • Compare the advantages and disadvantages of adopting the rule ɹϧʔϧΛద༻͢ΔϝϦοτͱσϝϦοτΛൺֱ • Continue to make judgments as new rules coming ɹࠓޙ৽͍͠ϧʔϧ͕Ճ͞ΕΔͨͼʹܧଓతʹબผ࡞ۀ
use other people's settings is that there are a wide range of options for how to compromise ideals and reality. ɹଞਓͷઃఆͷ׆༻͕͍͠ҰҼɺ ɹཧͱݱ࣮ͷંΓ߹͍ͷ͚ํ͕෯͍͔Β • Splitting the levels into lower and upper limits increases the chances of a match ɹൣғͷ্ݶɾԼݶΛ͚ΕɺҰக͘͢͠ͳΔ • Easier and safer to borrow ɹ҆৺ͯ͠ഈआͰ͖Δ 1.Hardness to tune .rubocop.yml ɹઃఆ͕େม