Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tackle rubocop todo list #336

Open
BuonOmo opened this issue Oct 11, 2022 · 4 comments
Open

Tackle rubocop todo list #336

BuonOmo opened this issue Oct 11, 2022 · 4 comments

Comments

@BuonOmo
Copy link
Member

BuonOmo commented Oct 11, 2022

The .rubocop_todo.yml file needs to be taken care of. Any PR in that regard is welcome!

@thestelz
Copy link
Contributor

So I was going to take a stab at this, but I either have an issue with my environment or something is wrong with the gemspec.

I ran rubocop and got:

Error: unrecognized cop or department Layout/LineContinuationLeadingSpace found in .rubocop.yml
Did you mean `Layout/MultilineOperationIndentation`?

I then wanted to confirm the right version of rubocop that was installed:

rubocop -v
1.28.2

That is when I realized that in the gemspec, it has spec.add_development_dependency "rubocop", "~> 1.36.0", so I ran a bundle install. Then got:

bundle install
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Bundler could not find compatible versions for gem "ruby":
  In Gemfile:
    ruby

    rgeo was resolved to 3.0.0.pre.rc.3, which depends on
      ruby (>= 2.5.0)

    rubocop (~> 1.36.0) was resolved to 1.36.0, which depends on
      ruby (>= 2.6.0)

In the gemspec it has spec.required_ruby_version = ">= 2.5.0", so should that be bumped up or am I doing something incorrectly?

On a side note, it doesn't appear I can install 2.6.0 either, but that might be an issue with my system.

rbenv install 2.6.0
Downloading ruby-2.6.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.0.tar.bz2
Installing ruby-2.6.0...

BUILD FAILED (macOS 12.6 using ruby-build 20211227)

Inspect or clean up the working tree at /var/folders/s7/ghx09h6s7j7flwp1hvjmqsp00000gn/T/ruby-build.20221014122627.85939.xRPfVh
Results logged to /var/folders/s7/ghx09h6s7j7flwp1hvjmqsp00000gn/T/ruby-build.20221014122627.85939.log

Last 10 log lines:
transform_mjit_header: SKIPPED to transform __inline_isfinitel
transform_mjit_header: SKIPPED to transform __inline_isfinited
transform_mjit_header: SKIPPED to transform __inline_isfinitef
transform_mjit_header: SKIPPED to transform __darwin_fd_clr
transform_mjit_header: SKIPPED to transform __darwin_fd_set
transform_mjit_header: SKIPPED to transform __darwin_fd_isset
transform_mjit_header: SKIPPED to transform __darwin_check_fd_set
transform_mjit_header: SKIPPED to transform __sputc
transdb.h updated
ln -sf ../../../.ext/include/-darwin21/rb_mjit_min_header-2.6.0.h include/ruby-2.6.0/-darwin21/rb_mjit_min_header-2.6.0.h

@BuonOmo
Copy link
Member Author

BuonOmo commented Oct 14, 2022

Thank you very much for working on that!

In the gemspec it has spec.required_ruby_version = ">= 2.5.0", so should that be bumped up or am I doing something incorrectly?

You can definitely bump that to 2.6.0, maybe even 2.7.0 since 2.6 is now past EOL. @keithdoggett would that be good for you ?

On a side note, it doesn't appear I can install 2.6.0 either, but that might be an issue with my system.

You should hopefully be good with at least ruby 2.7. But you're making a good case here, I think you should try ruby 2.7, 3.0, 3.1 and 3.2 with rubocop when doing the PR to ensure that it is always fine. Although, this is not mandatory at all.

@thestelz
Copy link
Contributor

It appears something might be wrong with my setup

ruby -v
dyld[18069]: Library not loaded: '/usr/local/opt/gmp/lib/libgmp.10.dylib'
  Referenced from: '/Users/andrew/.rbenv/versions/2.7.2/bin/ruby'
  Reason: tried: '/usr/local/opt/gmp/lib/libgmp.10.dylib' (no such file), '/usr/local/lib/libgmp.10.dylib' (no such file), '/usr/lib/libgmp.10.dylib' (no such file)
zsh: abort      ruby -v

I'll see if I can figure out what is going on here and hopefully be able to get this issue taken care of.

@keithdoggett
Copy link
Member

Thanks for taking a look at this!

@BuonOmo I agree if it's past EOL we shouldn't worry about supporting it IMO.

thestelz added a commit to thestelz/rgeo that referenced this issue Oct 14, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 14, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 14, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 14, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 14, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 14, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 14, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 14, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 14, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 17, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 17, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 17, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 17, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 17, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 17, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 17, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 17, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 17, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 17, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 17, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 17, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 17, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 17, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 24, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 24, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 25, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 26, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 26, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 26, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 26, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 27, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Oct 31, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Nov 1, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Nov 1, 2022
* fix `Layout/ArgumentAlignment`

* fix `Layout/EmptyLineBetweenDefs`

* fix `Layout/ExtraSpacing`

* fix `Layout/FirstArrayElementIndentation`

* fix `Layout/MultilineMethodCallBraceLayout`

* fix `Layout/MultilineMethodCallIndentation`

* fix `Layout/SpaceAroundOperators`

* fix `Layout/SpaceBeforeBlockBraces`

* fix `Lint/EmptyWhen`

* fix `Lint/LiteralAsCondition`

* fix `Lint/UnusedBlockArgument`

* fix `Style/BlockDelimiters`

* fix `Style/CaseLikeIf`

* fix `Style/ClassEqualityComparison`

* fix `Style/ConditionalAssignment`

* fix `Style/EmptyMethod`

* fix `Style/IfInsideElse`

* fix `Style/MultilineTernaryOperator`

* fix `Style/OrAssignment`

* fix `Style/RedundantConditional`

* fix `Style/RedundantRegexpEscape`

* fix `Style/StringConcatenation`

* fix `Style/StringLiterals`

* fix `Style/SymbolArray`

* fix `Style/PerlBackrefs`

* fix `Naming/AccessorMethodName`

* fix `Naming/MemoizedInstanceVariableName`

* fix `Style/NegatedIfElseCondition`

* fix `Style/NestedTernaryOperator`

* fix `Lint/FloatComparison`

* fix `Lint/DuplicateBranch`

* fix `Lint/UnusedMethodArgument`

* fix `Naming/BinaryOperatorParameterName`

* fix `Style/AccessorGrouping`

* fix `Style/InverseMethods`

* fix `Style/IfUnlessModifier`

* fix `Style/MultilineIfModifier`

* fix `Style/MultipleComparison`

* fix `Style/SoleNestedConditional`

* fix `Style/UnpackFirst`

* fix `Security/MarshalLoad`

* fix `Style/GuardClause`

* fix `Style/Documentation`

* fix `Style/MultilineBlockChain`

* partially fix `Metrics/BlockNesting`

* fix `Layout/LineLength`

* fix `Style/GlobalVars`

updates rgeo#336
thestelz added a commit to thestelz/rgeo that referenced this issue Nov 2, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Nov 4, 2022
* Fix missed refactoring os similar method

* Revert changes to x, y, z, and m to `*_coords`. Add x, y, z, and m
to allowed vars.

* Revert some changes to get tests to pass (see 60deae0)

* Refactor linear `&&` short-circuit to be `if..else` for better
readability and reliability

updates rgeo#336, rgeo#338
thestelz added a commit to thestelz/rgeo that referenced this issue Nov 7, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Nov 14, 2022
* Add comment about ruby v2.6 in rubocop config file

* Change all `.size.zero?` calls to `.empty?`

* Convert any missed `CoordSys::CONFIG.default_coord_sys_class` calls
to new style

* Performance updates

* Reverted `# :nodoc:` changes from d6ad9fe

* Refactor window_test.rb

* Remove all heredocs and `format_wkt`

updates rgeo#336, rgeo#338
thestelz added a commit to thestelz/rgeo that referenced this issue Nov 14, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Nov 16, 2022
* Fix missed `x_point` & `y_point` back to `x` & `y`

* Update method to return if defined

* Fix missed tests to add `skip`s & reverted changed tests for further
instructions on how to fix properly

updates rgeo#336, rgeo#338
thestelz added a commit to thestelz/rgeo that referenced this issue Nov 16, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Nov 29, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Dec 5, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Dec 6, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Dec 6, 2022
* Lock jruby version to fix bug

* Add history line

updates rgeo#336, rgeo#338
thestelz added a commit to thestelz/rgeo that referenced this issue Dec 6, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Dec 6, 2022
thestelz added a commit to thestelz/rgeo that referenced this issue Dec 8, 2022
* fix `Layout/EmptyLineBetweenDefs`

* fix `Layout/ExtraSpacing`

* fix `Layout/FirstArrayElementIndentation`

* fix `Layout/MultilineMethodCallBraceLayout`

* fix `Layout/MultilineMethodCallIndentation`

* fix `Layout/SpaceAroundOperators`

* fix `Layout/SpaceBeforeBlockBraces`

* fix `Lint/EmptyWhen`

* fix `Lint/LiteralAsCondition`

* fix `Lint/UnusedBlockArgument`

* fix `Style/BlockDelimiters`

* fix `Style/CaseLikeIf`

* fix `Style/ClassEqualityComparison`

* fix `Style/ConditionalAssignment`

* fix `Style/EmptyMethod`

* fix `Style/IfInsideElse`

* fix `Style/MultilineTernaryOperator`

* fix `Style/OrAssignment`

* fix `Style/RedundantConditional`

* fix `Style/RedundantRegexpEscape`

* fix `Style/StringConcatenation`

* fix `Style/StringLiterals`

* fix `Style/SymbolArray`

* fix `Style/PerlBackrefs`

* fix `Naming/AccessorMethodName`

* fix `Naming/MemoizedInstanceVariableName`

* fix `Style/NegatedIfElseCondition`

* fix `Style/NestedTernaryOperator`

* fix `Lint/FloatComparison`

* fix `Lint/DuplicateBranch`

* fix `Lint/UnusedMethodArgument`

* fix `Naming/BinaryOperatorParameterName`

* fix `Style/AccessorGrouping`

* fix `Style/InverseMethods`

* fix `Style/IfUnlessModifier`

* fix `Style/MultilineIfModifier`

* fix `Style/MultipleComparison`

* fix `Style/SoleNestedConditional`

* fix `Style/UnpackFirst`

* fix `Security/MarshalLoad`

* fix `Style/GuardClause`

* fix `Style/MultilineBlockChain`

* partially fix `Metrics/BlockNesting`

* fix `Layout/LineLength`

* fix `Style/GlobalVars`

* Change head to 3.1 for Memcheck

* Lock jruby version to fix bug

* Add history line

updates rgeo#336
thestelz added a commit to thestelz/rgeo that referenced this issue Dec 8, 2022
* fix `Layout/ArgumentAlignment`

* fix `Layout/EmptyLineBetweenDefs`

* fix `Layout/ExtraSpacing`

* fix `Layout/FirstArrayElementIndentation`

* fix `Layout/MultilineMethodCallBraceLayout`

* fix `Layout/MultilineMethodCallIndentation`

* fix `Layout/SpaceAroundOperators`

* fix `Layout/SpaceBeforeBlockBraces`

* fix `Lint/EmptyWhen`

* fix `Lint/LiteralAsCondition`

* fix `Lint/UnusedBlockArgument`

* fix `Style/BlockDelimiters`

* fix `Style/CaseLikeIf`

* fix `Style/ClassEqualityComparison`

* fix `Style/ConditionalAssignment`

* fix `Style/EmptyMethod`

* fix `Style/IfInsideElse`

* fix `Style/MultilineTernaryOperator`

* fix `Style/OrAssignment`

* fix `Style/RedundantConditional`

* fix `Style/RedundantRegexpEscape`

* fix `Style/StringConcatenation`

* fix `Style/StringLiterals`

* fix `Style/SymbolArray`

* fix `Style/PerlBackrefs`

* fix `Naming/AccessorMethodName`

* fix `Naming/MemoizedInstanceVariableName`

* fix `Style/NegatedIfElseCondition`

* fix `Style/NestedTernaryOperator`

* fix `Lint/FloatComparison`

* fix `Lint/DuplicateBranch`

* fix `Lint/UnusedMethodArgument`

* fix `Naming/BinaryOperatorParameterName`

* fix `Style/AccessorGrouping`

* fix `Style/InverseMethods`

* fix `Style/IfUnlessModifier`

* fix `Style/MultilineIfModifier`

* fix `Style/MultipleComparison`

* fix `Style/SoleNestedConditional`

* fix `Style/UnpackFirst`

* fix `Security/MarshalLoad`

* fix `Style/GuardClause`

* fix `Style/MultilineBlockChain`

* partially fix `Metrics/BlockNesting`

* fix `Layout/LineLength`

* fix `Style/GlobalVars`

* Change head to 3.1 for Memcheck

* Lock jruby version to fix bug

* Add history line

updates rgeo#336
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants