rubocop-trailblazer 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9baf0c0785abd0b96e2edcce56751ef2a2b124a0a4995d16452b038ad73e4ee4
4
- data.tar.gz: 80287fb65c32a9924855307d8f8ab59d2829d2308a7edbb3df61bebf97739b3e
3
+ metadata.gz: e1b68e3a03fa2569ab795512045cc6d73eb2419dee1767584a97967bcfa38bf3
4
+ data.tar.gz: aa7704167b8b0e06feb88578446ee78484a8ed6ad3ebfbad35b02cfffb01069b
5
5
  SHA512:
6
- metadata.gz: a1f0c37d1516461865211e1e870563e2e4066aecb3e736d905a85ac1344c0431daf4729d56ffa2dddac714f5528593b2c3adbaee439f73fba68011b60f0a95c5
7
- data.tar.gz: 46b9cc5f9cc7add3430f0939eb545f215db8a64c1b497fbc80f697480d6e1dca60bf9eda77c88a51fa70965294eb0d91e62d252ebed6414057749361a267fd03
6
+ metadata.gz: ec7601a2f252a674407c64779da7e6b30e2856b12dd751f662238651a64f2a25257e2f88f978a92a13e388ad592789a52df0a97fc0d95f221fb60d5d9d2eb51d
7
+ data.tar.gz: 3f0e81ce3fb3d99b78dc032e9e3be7205e337b707b714021d6153b1fdf7eb00d699378859abf71e49673cac7b1551f5295ea04748824e07a0a98c5e92c1df621
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 Abdelkader Boudih
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # Rubocop::Trailblazer
2
+
3
+ `Rubocop::Trailblazer` is a Ruby gem that provides additional RuboCop rules that are specifically useful for enforcing best practices and coding styles within projects using the [Trailblazer](http://trailblazer.to/) architecture.
4
+
5
+ ## Installation
6
+
7
+ Install `rubocop-trailblazer` gem via the following command:
8
+
9
+ ```sh
10
+ $ gem install rubocop-trailblazer
11
+ ```
12
+
13
+ If you are using this gem within a project, add the following line in your `Gemfile` or `gems.rb` under the development and test groups:
14
+ ```ruby
15
+ group :development, :test do
16
+ gem 'rubocop-trailblazer', require: false
17
+ end
18
+ ```
19
+ Then run `bundle install` to install the gem.
20
+
21
+ ## Usage
22
+
23
+ Instruct RuboCop to load the `Rubocop::Trailblazer` extension. Specify this in your `.rubocop.yml`:
24
+ ```yaml
25
+ require:
26
+ rubocop-other-extension
27
+ rubocop-trailblazer
28
+ ```
29
+
30
+ Alternatively, you can specify this in the command line:
31
+ ```sh
32
+ $ rubocop --require rubocop-trailblazer
33
+ ```
34
+
35
+ Or in a Rake task:
36
+ ```ruby
37
+ require 'rubocop/rake_task'
38
+
39
+ RuboCop::RakeTask.new do |task|
40
+ task.requires << 'rubocop-trailblazer'
41
+ end
42
+ ```
43
+
44
+ ## Contributing
45
+
46
+ We welcome contributions! For bug reports, feature requests, and pull requests, please feel free to visit our GitHub at https://github.com/seuros/rubocop-trailblazer.
47
+
48
+ When submitting a pull request, please ensure your changes are on a separate branch specific to the feature or issue. All updates should include tests.
49
+
50
+ ## License
51
+
52
+ This gem is open-source, available under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,6 @@
1
+ Minitest/VariableAsActualArgument:
2
+ Description: 'This cop enforces correct order of `expected` and `actual` arguments for `assert_equal`.'
3
+ Enabled: false
4
+ VersionAdded: '0.1.0'
5
+
6
+
@@ -3,8 +3,8 @@
3
3
  module RuboCop
4
4
  module Cop
5
5
  module Minitest
6
- # Checks for `assert_equal` method calls where the actual
7
- # argument is a variable and the expected argument is a literal.
6
+ # Checks for `assert_equal` method calls where the first argument is a actual variable,
7
+ # and the second argument is an expected literal.
8
8
  #
9
9
  # @example
10
10
  # # bad
@@ -14,7 +14,9 @@ module RuboCop
14
14
  # assert_equal my_var, 3
15
15
  class VariableAsActualArgument < LiteralAsActualArgument
16
16
  MSG = 'Replace the literal with the second argument.'
17
-
17
+ def self.autocorrect_incompatible_with
18
+ [LiteralAsActualArgument]
19
+ end
18
20
  def on_send(node)
19
21
  return unless node.method?(:assert_equal)
20
22
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Trailblazer
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-trailblazer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-09 00:00:00.000000000 Z
11
+ date: 2024-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -57,6 +57,9 @@ executables: []
57
57
  extensions: []
58
58
  extra_rdoc_files: []
59
59
  files:
60
+ - LICENSE.txt
61
+ - README.md
62
+ - config/default.yml
60
63
  - lib/rubocop-trailblazer.rb
61
64
  - lib/rubocop/cop/minitest/variable_as_actual_argument.rb
62
65
  - lib/rubocop/cop/trailblazer_cops.rb