diff --git a/config/default.yml b/config/default.yml index e2395d9045..a508a39827 100644 --- a/config/default.yml +++ b/config/default.yml @@ -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' @@ -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' @@ -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 @@ -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. @@ -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 @@ -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 @@ -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' @@ -213,7 +213,7 @@ 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' @@ -221,7 +221,7 @@ Performance/RangeInclude: 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' @@ -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' @@ -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' @@ -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' @@ -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. @@ -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' diff --git a/docs/modules/ROOT/pages/cops_performance.adoc b/docs/modules/ROOT/pages/cops_performance.adoc index dd15de7edb..29dd534556 100644 --- a/docs/modules/ROOT/pages/cops_performance.adoc +++ b/docs/modules/ROOT/pages/cops_performance.adoc @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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