Open IanTrudel opened 7 years ago
I'm not a fan of enforced styles or running additional checkers for every build or telling anyone that might want to fix something that they have to do it 'our way' whatever that would be.
Clean and simple are things that will encourage people to fix something.
Coding style should be enforced through Rubocop possibly in Shoes Rakefile. We run it once in a while (or after a new release or all the time) rather than asking contributors to run it. People tend to follow existing coding style... but right now there is no consistency in Shoes. So in doubt people use what they already know or guesswork, isn't it?
Shoes needs some refactoring and simplification in order to make it easier to understand and maintain. This issue is meant as notes for a future release.
We should enforce a coding style on every Ruby/Shoes files using Rubocop. The default coding style is A community-driven Ruby coding style guide but it's customizable.
rubocop -a <filename>
There are several orphan constants such as
LIB_DIR
,CACHE_DIR
,GEM_CENTRAL_DIR
that would use some cleaning, better names and most likely be wrapped around Shoes class (i.e.Shoes::RELEASE_NAME
).Some Ruby code is written like a Makefile, such as
cache.rb
. There are some oddities such ascase RUBY_VERSION
.There is dead code or code that seems unused. For example,
setup.rb:Shoes::setup.install_source
. Useless? Unused? Should be removed.