Commit graph

13 commits

Author SHA1 Message Date
Samuel Beaulieu
c846e41780
fix rubocoop offences 2022-07-25 09:06:11 -05:00
John O'Connor
ab92eb366d (MAINT) Change Rubocop Screening
Screen out redundant begin block rubocop compliance checks as these
are causing vsphere.rb and pool_manager.rb to fail with differing
ruby version checks.
2020-06-26 21:36:50 +01:00
Brandon High
7657ec127c
Rubocop rule updates
This commit:
* explicitly defines some short variable names that
generally make sense in the codebase.
* set numeric comparisons to be enforced instead of the predicate style
2020-03-05 16:53:07 -08:00
Brandon High
9201a0befb
Rubocop 0.80 updates to rubocop configs
Arbitrary annoying name changes to cops and new cops that I don't think
we would care about:
https://rubocop.readthedocs.io/en/latest/cops_style/#stylehasheachmethods
https://rubocop.readthedocs.io/en/latest/cops_style/#stylehashtransformkeys
https://rubocop.readthedocs.io/en/latest/cops_style/#stylehashtransformvalues
2020-03-04 12:06:54 -08:00
Brandon High
35475546ef
Update rubocop configs
Previously, there were some rubocop rule names that were causing rubocop
to fail to run entirely.
This commit updates the rubocop configs to match the new rubocop rule
names so that we can see all the issues that need correcting.
2019-11-04 14:57:53 -08:00
Glenn Sarti
9c93d2534f (maint) Fix rubocop offenses
This commit fixes the many rubocop offenses.  Also modifies the rubocop
settings:

- Set max method params higher than the default of 5
- Ignore Style/GuardClause. In some cases it's eaiser to read without the guard
- Renamed a cop
2017-07-18 15:26:27 -07:00
Glenn Sarti
5e0aefc629 (maint) Fix minor rubocop violations
Fix minor rubocop violations
2017-07-12 17:13:21 -07:00
Glenn Sarti
ba686e3c0a (maint) Update VMPooler files with fixes for Rubocop violations
This commit updates vmpooler.rb, api.rb and providers.rb with style changes as
per rubocop style violations.

This commit also updates the rubocop configuration to always use LF line endings
even on Windows as rubocop was expecting CRLF even though git is configured
for LF.
2017-05-17 13:52:28 -07:00
Glenn Sarti
d94b5e6896 (maint) Update rubocop.yml to ignore 2 cops
This commit updates the rubocop_todo.yml file for all of the new code that has
been introduced.

This commit adds two cops to the ignore list
- Style/ConditionalAssignment
- Next

In some cases the readability of code is better even when the cops are raised.
This commit disables the cops so they will not be flagged as violations
2017-04-03 11:30:02 -07:00
Glenn Sarti
a276542098 (maint) Ignore the crashing WordArray cop in rubocop
Previously the Style/WordArray cop was crashing in the following fil:
lib/vmpooler/api/helpers.rb

This commit disables this cop until the root cause can be determined.
2017-03-16 16:00:32 -07:00
Glenn Sarti
885d8d2b1c (maint) Add additional rubocop exceptions
This commit adds the following exceptions:

- Style/EmptyMethod
  Methods which are empty are typically supposed to not spread over two lines
  however this is a matter of readability and should not be considered a
  violation
- Metrics/BlockNesting
  Due to a legacy codebase there are instances where the block depth is quite
  high.  Ignore these violations for the time being.
2017-03-16 15:41:02 -07:00
Glenn Sarti
c14403682a (maint) Fix rubocop offenses
This commit updates VM Pooler to fix any existing rubocop offenses and also
fixes any offenses in the lib/vmpooler.rb file.  This commit also regenerates
the Todo file.
2017-03-07 20:17:32 -08:00
Glenn Sarti
85a2fa4f20 (maint) Add rubocop for testing
This commit adds the rubocop gem, a rubocop rake task and an initial rubocop
configuration file in prepartion for using rubocop in CI.

This commit also adds a rubocop todo file that exempts existing files from
violations.
2017-02-10 13:33:36 -08:00