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

Revise links #381

Merged
merged 1 commit into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Performance:

Performance/AncestorsInclude:
Description: 'Use `A <= B` instead of `A.ancestors.include?(B)`.'
Reference: 'https://github.com/JuanitoFatas/fast-ruby#ancestorsinclude-vs--code'
Reference: 'https://github.com/fastruby/fast-ruby#ancestorsinclude-vs--code'
Enabled: 'pending'
Safe: false
VersionAdded: '1.7'
Expand Down Expand Up @@ -54,7 +54,7 @@ Performance/CaseWhenSplat:
Performance/Casecmp:
Description: >-
Use `casecmp` rather than `downcase ==`, `upcase ==`, `== downcase`, or `== upcase`..
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringcasecmp-vs-stringdowncase---code'
Reference: 'https://github.com/fastruby/fast-ruby#stringcasecmp-vs--stringcasecmp-vs-stringdowncase---code'
Enabled: true
Safe: false
VersionAdded: '0.36'
Expand Down Expand Up @@ -122,7 +122,7 @@ Performance/Detect:
Description: >-
Use `detect` instead of `select.first`, `find_all.first`, `filter.first`,
`select.last`, `find_all.last`, and `filter.last`.
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
Reference: 'https://github.com/fastruby/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
# This cop has known compatibility issues with `ActiveRecord` and other
# frameworks. `ActiveRecord` does not implement a `detect` method and `find`
# has its own meaning. Correcting `ActiveRecord` methods with this cop
Expand All @@ -145,7 +145,7 @@ Performance/DoubleStartEndWith:

Performance/EndWith:
Description: 'Use `end_with?` instead of a regex match anchored to the end of a string.'
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
Reference: 'https://github.com/fastruby/fast-ruby#stringmatch-vs-stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
# This will change to a new method call which isn't guaranteed to be on the
# object. Switching these methods has to be done with knowledge of the types
# of the variables which rubocop doesn't have.
Expand All @@ -165,7 +165,7 @@ Performance/FlatMap:
Use `Enumerable#flat_map`
instead of `Enumerable#map...Array#flatten(1)`
or `Enumerable#collect..Array#flatten(1)`.
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
Reference: 'https://github.com/fastruby/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
Enabled: true
VersionAdded: '0.30'
EnabledForFlattenWithoutParams: false
Expand All @@ -176,7 +176,7 @@ Performance/FlatMap:

Performance/InefficientHashSearch:
Description: 'Use `key?` or `value?` instead of `keys.include?` or `values.include?`.'
Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashkey-instead-of-hashkeysinclude-code'
Reference: 'https://github.com/fastruby/fast-ruby#hashkey-instead-of-hashkeysinclude-code'
Enabled: true
VersionAdded: '0.56'
Safe: false
Expand All @@ -201,7 +201,7 @@ Performance/MapMethodChain:

Performance/MethodObjectAsBlock:
Description: 'Use block explicitly instead of block-passing a method object.'
Reference: 'https://github.com/JuanitoFatas/fast-ruby#normal-way-to-apply-method-vs-method-code'
Reference: 'https://github.com/fastruby/fast-ruby#normal-way-to-apply-method-vs-method-code'
Enabled: pending
VersionAdded: '1.9'

Expand All @@ -213,15 +213,15 @@ Performance/OpenStruct:

Performance/RangeInclude:
Description: 'Use `Range#cover?` instead of `Range#include?` (or `Range#member?`).'
Reference: 'https://github.com/JuanitoFatas/fast-ruby#cover-vs-include-code'
Reference: 'https://github.com/fastruby/fast-ruby#cover-vs-include-code'
Enabled: true
VersionAdded: '0.36'
VersionChanged: '1.7'
Safe: false

Performance/RedundantBlockCall:
Description: 'Use `yield` instead of `block.call`.'
Reference: 'https://github.com/JuanitoFatas/fast-ruby#proccall-and-block-arguments-vs-yieldcode'
Reference: 'https://github.com/fastruby/fast-ruby#proccall-and-block-arguments-vs-yieldcode'
Enabled: true
VersionAdded: '0.36'

Expand All @@ -244,7 +244,7 @@ Performance/RedundantMatch:

Performance/RedundantMerge:
Description: 'Use Hash#[]=, rather than Hash#merge! with a single key-value pair.'
Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashmerge-vs-hash-code'
Reference: 'https://github.com/fastruby/fast-ruby#hashmerge-vs-hash-code'
Enabled: true
Safe: false
VersionAdded: '0.36'
Expand All @@ -271,13 +271,13 @@ Performance/RegexpMatch:
Description: >-
Use `match?` instead of `Regexp#match`, `String#match`, `Symbol#match`,
`Regexp#===`, or `=~` when `MatchData` is not used.
Reference: 'https://github.com/JuanitoFatas/fast-ruby#regexp-vs-stringmatch-vs-string-vs-stringmatch-code-'
Reference: 'https://github.com/fastruby/fast-ruby#regexp-vs-regexpmatch-vs-regexpmatch-vs-stringmatch-vs-string-vs-stringmatch-code-'
Enabled: true
VersionAdded: '0.47'

Performance/ReverseEach:
Description: 'Use `reverse_each` instead of `reverse.each`.'
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
Reference: 'https://github.com/fastruby/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
Enabled: true
VersionAdded: '0.30'

Expand All @@ -295,7 +295,7 @@ Performance/Size:
Description: >-
Use `size` instead of `count` for counting
the number of elements in `Array` and `Hash`.
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraylength-vs-arraysize-vs-arraycount-code'
Reference: 'https://github.com/fastruby/fast-ruby#arraylength-vs-arraysize-vs-arraycount-code'
Enabled: true
VersionAdded: '0.30'

Expand All @@ -306,13 +306,13 @@ Performance/SortReverse:

Performance/Squeeze:
Description: "Use `squeeze('a')` instead of `gsub(/a+/, 'a')`."
Reference: 'https://github.com/JuanitoFatas/fast-ruby#remove-extra-spaces-or-other-contiguous-characters-code'
Reference: 'https://github.com/fastruby/fast-ruby#remove-extra-spaces-or-other-contiguous-characters-code'
Enabled: 'pending'
VersionAdded: '1.7'

Performance/StartWith:
Description: 'Use `start_with?` instead of a regex match anchored to the beginning of a string.'
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
Reference: 'https://github.com/fastruby/fast-ruby#stringmatch-vs-stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
# This will change to a new method call which isn't guaranteed to be on the
# object. Switching these methods has to be done with knowledge of the types
# of the variables which rubocop doesn't have.
Expand All @@ -339,7 +339,7 @@ Performance/StringReplacement:
Use `tr` instead of `gsub` when you are replacing the same
number of characters. Use `delete` instead of `gsub` when
you are deleting characters.
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
Reference: 'https://github.com/fastruby/fast-ruby#stringgsub-vs-stringtr-code'
Enabled: true
VersionAdded: '0.33'

Expand Down
32 changes: 16 additions & 16 deletions docs/modules/ROOT/pages/cops_performance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ A <= B

=== References

* https://github.com/JuanitoFatas/fast-ruby#ancestorsinclude-vs--code
* https://github.com/fastruby/fast-ruby#ancestorsinclude-vs--code

== Performance/ArraySemiInfiniteRangeSlice

Expand Down Expand Up @@ -319,7 +319,7 @@ str.casecmp('ABC').zero?

=== References

* https://github.com/JuanitoFatas/fast-ruby#stringcasecmp-vs-stringdowncase---code
* https://github.com/fastruby/fast-ruby#stringcasecmp-vs--stringcasecmp-vs-stringdowncase---code

== Performance/ChainArrayAllocation

Expand Down Expand Up @@ -783,7 +783,7 @@ if the receiver is a `Hash`, it may report a false positive.

=== References

* https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code
* https://github.com/fastruby/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code

== Performance/DoubleStartEndWith

Expand Down Expand Up @@ -932,7 +932,7 @@ of the variables which rubocop doesn't have.

=== References

* https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end
* https://github.com/fastruby/fast-ruby#stringmatch-vs-stringmatch-vs-stringstart_withstringend_with-code-start-code-end

== Performance/FixedSize

Expand Down Expand Up @@ -1033,7 +1033,7 @@ change them to use `flat_map { ... }` instead.

=== References

* https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code
* https://github.com/fastruby/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code

== Performance/InefficientHashSearch

Expand Down Expand Up @@ -1090,7 +1090,7 @@ h = { a: 1, b: 2 }; h.value?(nil)

=== References

* https://github.com/JuanitoFatas/fast-ruby#hashkey-instead-of-hashkeysinclude-code
* https://github.com/fastruby/fast-ruby#hashkey-instead-of-hashkeysinclude-code

== Performance/IoReadlines

Expand Down Expand Up @@ -1259,7 +1259,7 @@ array.map { |x| do_something(x) }

=== References

* https://github.com/JuanitoFatas/fast-ruby#normal-way-to-apply-method-vs-method-code
* https://github.com/fastruby/fast-ruby#normal-way-to-apply-method-vs-method-code

== Performance/OpenStruct

Expand Down Expand Up @@ -1349,7 +1349,7 @@ Example of a case where `Range#cover?` may not provide the desired result:

=== References

* https://github.com/JuanitoFatas/fast-ruby#cover-vs-include-code
* https://github.com/fastruby/fast-ruby#cover-vs-include-code

== Performance/RedundantBlockCall

Expand Down Expand Up @@ -1389,7 +1389,7 @@ end

=== References

* https://github.com/JuanitoFatas/fast-ruby#proccall-and-block-arguments-vs-yieldcode
* https://github.com/fastruby/fast-ruby#proccall-and-block-arguments-vs-yieldcode

== Performance/RedundantEqualityComparisonBlock

Expand Down Expand Up @@ -1562,7 +1562,7 @@ hash[:b] = 2

=== References

* https://github.com/JuanitoFatas/fast-ruby#hashmerge-vs-hash-code
* https://github.com/fastruby/fast-ruby#hashmerge-vs-hash-code

== Performance/RedundantSortBlock

Expand Down Expand Up @@ -1758,7 +1758,7 @@ end

=== References

* https://github.com/JuanitoFatas/fast-ruby#regexp-vs-stringmatch-vs-string-vs-stringmatch-code-
* https://github.com/fastruby/fast-ruby#regexp-vs-regexpmatch-vs-regexpmatch-vs-stringmatch-vs-string-vs-stringmatch-code-

== Performance/ReverseEach

Expand Down Expand Up @@ -1795,7 +1795,7 @@ items.reverse_each

=== References

* https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code
* https://github.com/fastruby/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code

== Performance/ReverseFirst

Expand Down Expand Up @@ -1906,7 +1906,7 @@ Hash(key: :value).size

=== References

* https://github.com/JuanitoFatas/fast-ruby#arraylength-vs-arraysize-vs-arraycount-code
* https://github.com/fastruby/fast-ruby#arraylength-vs-arraysize-vs-arraycount-code

== Performance/SortReverse

Expand Down Expand Up @@ -1966,7 +1966,7 @@ str.squeeze!('a')

=== References

* https://github.com/JuanitoFatas/fast-ruby#remove-extra-spaces-or-other-contiguous-characters-code
* https://github.com/fastruby/fast-ruby#remove-extra-spaces-or-other-contiguous-characters-code

== Performance/StartWith

Expand Down Expand Up @@ -2046,7 +2046,7 @@ of the variables which rubocop doesn't have.

=== References

* https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end
* https://github.com/fastruby/fast-ruby#stringmatch-vs-stringmatch-vs-stringstart_withstringend_with-code-start-code-end

== Performance/StringIdentifierArgument

Expand Down Expand Up @@ -2149,7 +2149,7 @@ Identifies places where `gsub` can be replaced by `tr` or `delete`.

=== References

* https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code
* https://github.com/fastruby/fast-ruby#stringgsub-vs-stringtr-code

== Performance/Sum

Expand Down