3 ms·
I would suggest invest more time in configuration and developing cops where missing. Almost/all cops can be turned on or off as per the configuration[0], many h
by hi-v-rocknroll 2y ago
I would suggest invest more time in configuration and developing cops where missing. Almost/all cops can be turned on or off as per the configuration[0], many have several alternative choices, and numerous options. It takes time and diligence to configure it for a particular coding standard, environment, or for personal preferences. You can make it enforce whatever coding style you want, and with a great deal of nuance and to including codemod transformations. This later bit was used extensively for large scale codemods.
Furthermore, writing a cop is surprisingly painless.
0: https://docs.rubocop.org/rubocop/configuration.html https://docs.rubocop.org/rubocop/configuration.html
- baweaver 2y agoThe testing utilities are also great. The difficulty, I'd say, is inherit to working with ASTs and simplifying it is hard. They tried with Node Pattern, synvert tried with NQL, and I wanted to try with pattern matching and potentially more in-Ruby approaches. Nothing particularly wrong with any of them, but trying to sort out what's not matching and getting an answer for now "close" a node was is a bit involved. Go far enough down that hole and you hit tree edit distance and Zhang Sha Sha algorithms.