mutest 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +38 -0
- data/{config/rubocop.yml → .rubocop.yml} +80 -183
- data/CHANGELOG.md +8 -0
- data/Gemfile +2 -3
- data/Gemfile.lock +41 -52
- data/README.md +16 -0
- data/Rakefile +1 -1
- data/lib/mutest.rb +5 -4
- data/lib/mutest/actor.rb +7 -6
- data/lib/mutest/actor/env.rb +3 -3
- data/lib/mutest/actor/mailbox.rb +5 -4
- data/lib/mutest/actor/receiver.rb +6 -5
- data/lib/mutest/actor/sender.rb +5 -4
- data/lib/mutest/ast.rb +4 -3
- data/lib/mutest/ast/meta.rb +3 -3
- data/lib/mutest/ast/meta/const.rb +7 -5
- data/lib/mutest/ast/meta/optarg.rb +6 -5
- data/lib/mutest/ast/meta/resbody.rb +6 -5
- data/lib/mutest/ast/meta/restarg.rb +6 -5
- data/lib/mutest/ast/meta/send.rb +8 -20
- data/lib/mutest/ast/meta/symbol.rb +6 -5
- data/lib/mutest/ast/named_children.rb +5 -5
- data/lib/mutest/ast/node_predicates.rb +4 -4
- data/lib/mutest/ast/nodes.rb +3 -3
- data/lib/mutest/ast/regexp.rb +3 -3
- data/lib/mutest/ast/regexp/transformer.rb +19 -11
- data/lib/mutest/ast/regexp/transformer/alternative.rb +6 -6
- data/lib/mutest/ast/regexp/transformer/character_set.rb +7 -7
- data/lib/mutest/ast/regexp/transformer/direct.rb +7 -7
- data/lib/mutest/ast/regexp/transformer/options_group.rb +7 -7
- data/lib/mutest/ast/regexp/transformer/quantifier.rb +11 -13
- data/lib/mutest/ast/regexp/transformer/recursive.rb +7 -7
- data/lib/mutest/ast/regexp/transformer/root.rb +6 -6
- data/lib/mutest/ast/regexp/transformer/text.rb +7 -7
- data/lib/mutest/ast/sexp.rb +3 -3
- data/lib/mutest/ast/types.rb +8 -6
- data/lib/mutest/cli.rb +5 -3
- data/lib/mutest/color.rb +4 -3
- data/lib/mutest/config.rb +4 -3
- data/lib/mutest/context.rb +4 -3
- data/lib/mutest/diff.rb +5 -3
- data/lib/mutest/env.rb +5 -5
- data/lib/mutest/env/bootstrap.rb +7 -5
- data/lib/mutest/expression.rb +7 -5
- data/lib/mutest/expression/method.rb +4 -4
- data/lib/mutest/expression/methods.rb +4 -4
- data/lib/mutest/expression/namespace.rb +9 -8
- data/lib/mutest/expression/parser.rb +9 -8
- data/lib/mutest/integration.rb +5 -3
- data/lib/mutest/integration/null.rb +3 -3
- data/lib/mutest/isolation.rb +2 -2
- data/lib/mutest/isolation/fork.rb +4 -4
- data/lib/mutest/isolation/none.rb +4 -4
- data/lib/mutest/loader.rb +2 -2
- data/lib/mutest/matcher.rb +4 -3
- data/lib/mutest/matcher/chain.rb +3 -3
- data/lib/mutest/matcher/compiler.rb +7 -5
- data/lib/mutest/matcher/config.rb +5 -4
- data/lib/mutest/matcher/filter.rb +3 -3
- data/lib/mutest/matcher/method.rb +13 -13
- data/lib/mutest/matcher/method/instance.rb +6 -6
- data/lib/mutest/matcher/method/singleton.rb +5 -5
- data/lib/mutest/matcher/methods.rb +7 -6
- data/lib/mutest/matcher/namespace.rb +3 -3
- data/lib/mutest/matcher/null.rb +3 -3
- data/lib/mutest/matcher/scope.rb +3 -3
- data/lib/mutest/matcher/static.rb +3 -3
- data/lib/mutest/meta.rb +4 -4
- data/lib/mutest/meta/example.rb +5 -4
- data/lib/mutest/meta/example/dsl.rb +12 -11
- data/lib/mutest/meta/example/verification.rb +7 -6
- data/lib/mutest/mutation.rb +7 -6
- data/lib/mutest/mutator.rb +6 -6
- data/lib/mutest/mutator/node.rb +19 -7
- data/lib/mutest/mutator/node/and_asgn.rb +4 -4
- data/lib/mutest/mutator/node/argument.rb +6 -5
- data/lib/mutest/mutator/node/arguments.rb +18 -5
- data/lib/mutest/mutator/node/begin.rb +4 -4
- data/lib/mutest/mutator/node/binary.rb +4 -4
- data/lib/mutest/mutator/node/block.rb +6 -5
- data/lib/mutest/mutator/node/block_pass.rb +4 -4
- data/lib/mutest/mutator/node/break.rb +4 -4
- data/lib/mutest/mutator/node/case.rb +6 -4
- data/lib/mutest/mutator/node/class.rb +4 -4
- data/lib/mutest/mutator/node/conditional_loop.rb +4 -4
- data/lib/mutest/mutator/node/const.rb +4 -4
- data/lib/mutest/mutator/node/define.rb +6 -6
- data/lib/mutest/mutator/node/defined.rb +4 -4
- data/lib/mutest/mutator/node/dstr.rb +4 -4
- data/lib/mutest/mutator/node/dsym.rb +4 -4
- data/lib/mutest/mutator/node/generic.rb +5 -4
- data/lib/mutest/mutator/node/if.rb +6 -4
- data/lib/mutest/mutator/node/index.rb +128 -0
- data/lib/mutest/mutator/node/kwbegin.rb +4 -4
- data/lib/mutest/mutator/node/literal.rb +4 -4
- data/lib/mutest/mutator/node/literal/array.rb +8 -6
- data/lib/mutest/mutator/node/literal/boolean.rb +5 -5
- data/lib/mutest/mutator/node/literal/fixnum.rb +5 -5
- data/lib/mutest/mutator/node/literal/float.rb +5 -5
- data/lib/mutest/mutator/node/literal/hash.rb +6 -6
- data/lib/mutest/mutator/node/literal/nil.rb +5 -5
- data/lib/mutest/mutator/node/literal/range.rb +5 -5
- data/lib/mutest/mutator/node/literal/regex.rb +5 -5
- data/lib/mutest/mutator/node/literal/string.rb +5 -5
- data/lib/mutest/mutator/node/literal/symbol.rb +5 -5
- data/lib/mutest/mutator/node/masgn.rb +4 -4
- data/lib/mutest/mutator/node/match_current_line.rb +4 -4
- data/lib/mutest/mutator/node/mlhs.rb +4 -4
- data/lib/mutest/mutator/node/named_value/access.rb +6 -6
- data/lib/mutest/mutator/node/named_value/constant_assignment.rb +6 -5
- data/lib/mutest/mutator/node/named_value/variable_assignment.rb +5 -5
- data/lib/mutest/mutator/node/next.rb +4 -4
- data/lib/mutest/mutator/node/nthref.rb +4 -4
- data/lib/mutest/mutator/node/op_asgn.rb +4 -4
- data/lib/mutest/mutator/node/or_asgn.rb +5 -4
- data/lib/mutest/mutator/node/procarg_zero.rb +45 -0
- data/lib/mutest/mutator/node/regexp.rb +6 -6
- data/lib/mutest/mutator/node/regexp/alternation_meta.rb +5 -5
- data/lib/mutest/mutator/node/regexp/capture_group.rb +5 -5
- data/lib/mutest/mutator/node/regexp/character_type.rb +5 -5
- data/lib/mutest/mutator/node/regexp/end_of_line_anchor.rb +5 -5
- data/lib/mutest/mutator/node/regexp/end_of_string_or_before_end_of_line_anchor.rb +5 -5
- data/lib/mutest/mutator/node/regexp/one_or_more.rb +5 -5
- data/lib/mutest/mutator/node/regexp/zero_or_more.rb +5 -5
- data/lib/mutest/mutator/node/regopt.rb +4 -4
- data/lib/mutest/mutator/node/resbody.rb +6 -4
- data/lib/mutest/mutator/node/rescue.rb +6 -4
- data/lib/mutest/mutator/node/return.rb +5 -4
- data/lib/mutest/mutator/node/send.rb +6 -34
- data/lib/mutest/mutator/node/send/attribute_assignment.rb +5 -5
- data/lib/mutest/mutator/node/send/binary.rb +5 -5
- data/lib/mutest/mutator/node/send/conditional.rb +5 -5
- data/lib/mutest/mutator/node/splat.rb +4 -4
- data/lib/mutest/mutator/node/super.rb +4 -4
- data/lib/mutest/mutator/node/when.rb +4 -4
- data/lib/mutest/mutator/node/yield.rb +4 -4
- data/lib/mutest/mutator/node/zsuper.rb +4 -4
- data/lib/mutest/mutator/util.rb +3 -3
- data/lib/mutest/mutator/util/array.rb +6 -6
- data/lib/mutest/mutator/util/symbol.rb +4 -4
- data/lib/mutest/parallel.rb +16 -12
- data/lib/mutest/parallel/master.rb +4 -4
- data/lib/mutest/parallel/source.rb +6 -5
- data/lib/mutest/parallel/worker.rb +6 -5
- data/lib/mutest/parser.rb +4 -3
- data/lib/mutest/registry.rb +6 -5
- data/lib/mutest/reporter.rb +2 -2
- data/lib/mutest/reporter/cli.rb +3 -3
- data/lib/mutest/reporter/cli/format.rb +9 -8
- data/lib/mutest/reporter/cli/printer.rb +8 -8
- data/lib/mutest/reporter/cli/printer/config.rb +5 -5
- data/lib/mutest/reporter/cli/printer/env_progress.rb +16 -16
- data/lib/mutest/reporter/cli/printer/env_result.rb +5 -5
- data/lib/mutest/reporter/cli/printer/mutation_progress_result.rb +5 -5
- data/lib/mutest/reporter/cli/printer/mutation_result.rb +5 -5
- data/lib/mutest/reporter/cli/printer/status.rb +6 -5
- data/lib/mutest/reporter/cli/printer/status_progressive.rb +5 -5
- data/lib/mutest/reporter/cli/printer/subject_progress.rb +5 -5
- data/lib/mutest/reporter/cli/printer/subject_result.rb +5 -5
- data/lib/mutest/reporter/cli/printer/test_result.rb +5 -5
- data/lib/mutest/reporter/cli/tput.rb +6 -5
- data/lib/mutest/reporter/null.rb +3 -3
- data/lib/mutest/reporter/sequence.rb +3 -3
- data/lib/mutest/repository.rb +9 -7
- data/lib/mutest/require_highjack.rb +2 -2
- data/lib/mutest/requirer.rb +2 -2
- data/lib/mutest/result.rb +18 -12
- data/lib/mutest/runner.rb +6 -3
- data/lib/mutest/runner/sink.rb +3 -3
- data/lib/mutest/scope.rb +2 -2
- data/lib/mutest/selector.rb +4 -3
- data/lib/mutest/selector/expression.rb +3 -3
- data/lib/mutest/source_file.rb +6 -5
- data/lib/mutest/subject.rb +5 -3
- data/lib/mutest/subject/method.rb +3 -3
- data/lib/mutest/subject/method/instance.rb +5 -5
- data/lib/mutest/subject/method/singleton.rb +4 -4
- data/lib/mutest/test.rb +4 -3
- data/lib/mutest/util.rb +3 -3
- data/lib/mutest/version.rb +2 -2
- data/lib/mutest/warning_filter.rb +3 -3
- data/lib/mutest/zombifier.rb +5 -4
- data/meta/block.rb +22 -3
- data/meta/case.rb +29 -1
- data/meta/index.rb +132 -0
- data/meta/indexasgn.rb +42 -0
- data/meta/lambda.rb +17 -0
- data/meta/send.rb +5 -139
- data/mutest-rspec.gemspec +1 -1
- data/mutest.gemspec +11 -12
- data/spec/integration/mutest/rspec_spec.rb +1 -1
- data/spec/shared/framework_integration_behavior.rb +1 -1
- data/spec/shared/idempotent_method_behavior.rb +2 -1
- data/spec/spec_helper.rb +5 -5
- data/spec/support/compress_helper.rb +2 -1
- data/spec/support/corpus.rb +12 -8
- data/spec/support/fake_actor.rb +19 -14
- data/spec/support/file_system.rb +10 -7
- data/spec/support/ice_nine_config.rb +3 -3
- data/spec/support/ruby_vm.rb +10 -11
- data/spec/support/shared_context.rb +1 -1
- data/spec/support/test_app.rb +1 -1
- data/spec/support/warning.rb +8 -7
- data/spec/support/xspec.rb +18 -17
- data/spec/unit/mutest/actor/binding_spec.rb +1 -0
- data/spec/unit/mutest/ast/meta/optarg_spec.rb +1 -0
- data/spec/unit/mutest/ast/meta/send/proc_predicate_spec.rb +1 -1
- data/spec/unit/mutest/ast/meta/send/receiver_possible_top_level_const_predicate_spec.rb +1 -1
- data/spec/unit/mutest/ast/meta/send_spec.rb +14 -18
- data/spec/unit/mutest/ast/regexp_spec.rb +4 -3
- data/spec/unit/mutest/ast_spec.rb +1 -1
- data/spec/unit/mutest/cli_spec.rb +15 -15
- data/spec/unit/mutest/env/bootstrap_spec.rb +1 -1
- data/spec/unit/mutest/integration_spec.rb +1 -0
- data/spec/unit/mutest/isolation/none_spec.rb +1 -1
- data/spec/unit/mutest/matcher/config_spec.rb +1 -0
- data/spec/unit/mutest/mutator/node_spec.rb +1 -1
- data/spec/unit/mutest/parallel/master_spec.rb +3 -3
- data/spec/unit/mutest/reporter/cli/printer_spec.rb +2 -0
- data/spec/unit/mutest/reporter/cli/tput_spec.rb +2 -0
- data/spec/unit/mutest/reporter/cli_spec.rb +2 -0
- data/spec/unit/mutest/repository/diff_spec.rb +1 -1
- data/spec/unit/mutest/runner_spec.rb +1 -1
- data/spec/unit/mutest/subject_spec.rb +1 -1
- data/spec/unit/mutest/warning_filter_spec.rb +2 -3
- data/spec/unit/mutest/zombifier_spec.rb +1 -1
- data/test_app/Gemfile.rspec3.8 +7 -0
- metadata +67 -68
- data/.buildkite/hooks/pre-command +0 -3
- data/.buildkite/pipeline.yml +0 -38
- data/.gitmodules +0 -3
- data/circle.yml +0 -10
- data/config/triage.yml +0 -2
- data/config/yardstick.yml +0 -2
- data/lib/mutest/mutator/node/send/index.rb +0 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2d20005e53a54387ff8a502e7e4b88614e7831e373988407455cb6300add4796
|
4
|
+
data.tar.gz: 2d801c64f6f629b38c12a2b1842c5f32658bbce2ae6eac43ca3ca59730e888b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 804d11952cb1c4ed31d50c82c266cf1da28eadae6879778b175a9fda81195e082ffcb8ad6a8aa4d5c93aa0c072790c9409991b98adf0c661be74e03f6981ddbe
|
7
|
+
data.tar.gz: c5d8ce49b93973e2ab81a3543acb10a7ac429d48e5d12550aefe8712a0ece3da7f06faf96439e3483ea33ac6d39063d5e10437a674a124ec730b5f53bdb0ccf5
|
@@ -0,0 +1,38 @@
|
|
1
|
+
defaults: &defaults
|
2
|
+
working_directory: ~/mutant
|
3
|
+
docker:
|
4
|
+
- image: circleci/ruby:2.3.3
|
5
|
+
version: 2
|
6
|
+
jobs:
|
7
|
+
unit_specs:
|
8
|
+
<<: *defaults
|
9
|
+
steps:
|
10
|
+
- checkout
|
11
|
+
- run: bundle install
|
12
|
+
- run: COVERAGE=true bundle exec rspec spec/unit
|
13
|
+
integration_specs:
|
14
|
+
<<: *defaults
|
15
|
+
steps:
|
16
|
+
- checkout
|
17
|
+
- run: bundle install
|
18
|
+
- run: bundle exec rspec spec/integration
|
19
|
+
metrics:
|
20
|
+
<<: *defaults
|
21
|
+
steps:
|
22
|
+
- checkout
|
23
|
+
- run: bundle install
|
24
|
+
- run: bundle exec rubocop
|
25
|
+
mutest:
|
26
|
+
<<: *defaults
|
27
|
+
steps:
|
28
|
+
- checkout
|
29
|
+
- run: bundle install
|
30
|
+
- run: bundle exec rake metrics:mutest
|
31
|
+
workflows:
|
32
|
+
version: 2
|
33
|
+
test:
|
34
|
+
jobs:
|
35
|
+
- unit_specs
|
36
|
+
- integration_specs
|
37
|
+
- metrics
|
38
|
+
- mutest
|
@@ -1,31 +1,55 @@
|
|
1
1
|
---
|
2
2
|
require:
|
3
3
|
- rubocop-rspec
|
4
|
-
- rubocop/devtools
|
5
4
|
AllCops:
|
6
5
|
Exclude:
|
7
6
|
- 'test_app/**/*'
|
8
7
|
- 'tmp/**/*'
|
9
8
|
- vendor/**/*
|
10
9
|
DisplayCopNames: true
|
11
|
-
TargetRubyVersion: 2.
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
TargetRubyVersion: 2.3
|
11
|
+
Layout/AlignHash:
|
12
|
+
EnforcedColonStyle: table
|
13
|
+
EnforcedHashRocketStyle: table
|
14
|
+
Layout/ExtraSpacing:
|
16
15
|
AllowForAlignment: true
|
16
|
+
Layout/FirstArrayElementLineBreak:
|
17
|
+
Enabled: true
|
18
|
+
Layout/FirstHashElementLineBreak:
|
19
|
+
Enabled: true
|
20
|
+
Layout/FirstMethodArgumentLineBreak:
|
21
|
+
Enabled: true
|
22
|
+
Layout/FirstMethodParameterLineBreak:
|
23
|
+
Enabled: true
|
24
|
+
Layout/IndentArray:
|
25
|
+
EnforcedStyle: consistent
|
26
|
+
Layout/IndentHash:
|
27
|
+
EnforcedStyle: consistent
|
28
|
+
Layout/MultilineArrayBraceLayout:
|
29
|
+
Enabled: true
|
30
|
+
Layout/MultilineAssignmentLayout:
|
31
|
+
EnforcedStyle: new_line
|
32
|
+
Enabled: true
|
33
|
+
Layout/MultilineHashBraceLayout:
|
34
|
+
Enabled: true
|
35
|
+
Layout/MultilineMethodCallBraceLayout:
|
36
|
+
Enabled: true
|
37
|
+
Layout/MultilineMethodDefinitionBraceLayout:
|
38
|
+
Enabled: true
|
39
|
+
Layout/MultilineMethodCallIndentation:
|
40
|
+
EnforcedStyle: indented
|
41
|
+
Lint/AmbiguousBlockAssociation:
|
42
|
+
Enabled: false
|
17
43
|
Metrics/LineLength:
|
18
44
|
Max: 100
|
19
45
|
Metrics/BlockLength:
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
Style/IfUnlessModifier:
|
28
|
-
MaxLineLength: 100
|
46
|
+
Enabled: false
|
47
|
+
Naming/UncommunicativeMethodParamName:
|
48
|
+
Enabled: false
|
49
|
+
Style/AccessModifierDeclarations:
|
50
|
+
Enabled: false
|
51
|
+
Style/Documentation:
|
52
|
+
Enabled: false
|
29
53
|
Style/Next:
|
30
54
|
EnforcedStyle: always
|
31
55
|
Style/PercentLiteralDelimiters:
|
@@ -51,187 +75,28 @@ Style/Send:
|
|
51
75
|
Enabled: true
|
52
76
|
Style/AutoResourceCleanup:
|
53
77
|
Enabled: true
|
54
|
-
Style/FirstArrayElementLineBreak:
|
55
|
-
Enabled: true
|
56
|
-
Style/FirstHashElementLineBreak:
|
57
|
-
Enabled: true
|
58
|
-
Style/FirstMethodArgumentLineBreak:
|
59
|
-
Enabled: true
|
60
|
-
Style/FirstMethodParameterLineBreak:
|
61
|
-
Enabled: true
|
62
|
-
Style/MultilineArrayBraceLayout:
|
63
|
-
Enabled: true
|
64
|
-
Style/MultilineAssignmentLayout:
|
65
|
-
EnforcedStyle: new_line
|
66
|
-
Enabled: true
|
67
|
-
Style/MultilineHashBraceLayout:
|
68
|
-
Enabled: true
|
69
|
-
Style/MultilineMethodCallBraceLayout:
|
70
|
-
Enabled: true
|
71
|
-
Style/MultilineMethodDefinitionBraceLayout:
|
72
|
-
Enabled: true
|
73
78
|
Style/OptionHash:
|
74
79
|
Enabled: true
|
75
80
|
Style/StringMethods:
|
76
81
|
Enabled: true
|
77
|
-
Style/IndentArray:
|
78
|
-
EnforcedStyle: consistent
|
79
|
-
Style/IndentHash:
|
80
|
-
EnforcedStyle: consistent
|
81
|
-
MultilineMethodCallIndentation:
|
82
|
-
EnforcedStyle: indented
|
83
82
|
Style/Alias:
|
84
83
|
EnforcedStyle: prefer_alias_method
|
85
|
-
Style/AlignHash:
|
86
|
-
EnforcedColonStyle: table
|
87
|
-
Style/SignalException:
|
88
|
-
EnforcedStyle: semantic
|
89
84
|
Style/SingleLineBlockParams:
|
90
85
|
Enabled: false
|
91
|
-
# We prefer being able to write
|
92
|
-
#
|
93
|
-
# foo(*%w[bar baz qux norf hello goodbye])
|
94
|
-
#
|
95
|
-
# over
|
96
|
-
#
|
97
|
-
# foo('bar', 'baz', 'qux', 'norf', 'hello', 'goodbye')
|
98
|
-
#
|
99
|
-
# because
|
100
|
-
#
|
101
|
-
# 1. the `%w` signals that all elements are strings without interpolation
|
102
|
-
# 2. the `%w` case is more compact
|
103
|
-
#
|
104
|
-
# The only exception is method invocations with a single argument. These
|
105
|
-
# cases should be `foo('bar')` and never `foo(*%w[bar])`
|
106
|
-
#
|
107
|
-
Lint/UnneededSplatExpansion:
|
108
|
-
Enabled: false
|
109
|
-
# We only use guard clauses when it guards two or more statements:
|
110
|
-
#
|
111
|
-
# # bad
|
112
|
-
# def foo
|
113
|
-
# return if bar
|
114
|
-
#
|
115
|
-
# baz
|
116
|
-
# end
|
117
|
-
#
|
118
|
-
# # good
|
119
|
-
# def foo
|
120
|
-
# baz if bar
|
121
|
-
# end
|
122
|
-
#
|
123
|
-
# This includes conditionals with an `else` branch:
|
124
|
-
#
|
125
|
-
# # bad
|
126
|
-
# def foo
|
127
|
-
# return qux if bar
|
128
|
-
#
|
129
|
-
# baz
|
130
|
-
# end
|
131
|
-
#
|
132
|
-
# # good
|
133
|
-
# def foo
|
134
|
-
# if bar
|
135
|
-
# qux
|
136
|
-
# else
|
137
|
-
# baz
|
138
|
-
# end
|
139
|
-
# end
|
140
|
-
#
|
141
|
-
# It is up to the author of the code in question if the condition concerns
|
142
|
-
# exactly two statements
|
143
|
-
#
|
144
|
-
# # ok
|
145
|
-
# def foo
|
146
|
-
# return if bar
|
147
|
-
#
|
148
|
-
# baz
|
149
|
-
# qux
|
150
|
-
# end
|
151
|
-
#
|
152
|
-
# # also ok
|
153
|
-
# def foo
|
154
|
-
# if bar
|
155
|
-
# baz
|
156
|
-
# qux
|
157
|
-
# end
|
158
|
-
# end
|
159
|
-
#
|
160
|
-
# Use a guard clause if more than two statements are being guarded by the conditional
|
161
|
-
#
|
162
|
-
# # bad
|
163
|
-
# def foo
|
164
|
-
# if bar
|
165
|
-
# baz
|
166
|
-
# qux
|
167
|
-
# norf
|
168
|
-
# end
|
169
|
-
# end
|
170
|
-
#
|
171
|
-
# # good
|
172
|
-
# def foo
|
173
|
-
# return if bar
|
174
|
-
#
|
175
|
-
# baz
|
176
|
-
# qux
|
177
|
-
# norf
|
178
|
-
# end
|
179
86
|
Style/GuardClause:
|
180
87
|
Enabled: false
|
181
|
-
# Prefer writing an empty method on two lines
|
182
|
-
#
|
183
|
-
# # good
|
184
|
-
# def foo
|
185
|
-
# end
|
186
|
-
#
|
187
|
-
# # bar
|
188
|
-
# def foo; end
|
189
|
-
#
|
190
88
|
Style/EmptyMethod:
|
191
89
|
EnforcedStyle: expanded
|
192
|
-
# RuboCop disables end alignment by default. Explanation:
|
193
|
-
#
|
194
|
-
# The end alignment cops are in the Lint category because the bad
|
195
|
-
# indentation could be something more serious than just a style issue.
|
196
|
-
# It could be a mistake in which keyword you think you're matching with the end.
|
197
|
-
# (ruby -w warns for these too, by the way.) So for this reason I don't think
|
198
|
-
# we can add auto-correct for these cops.
|
199
|
-
#
|
200
|
-
# From https://github.com/bbatsov/rubocop/pull/1789#issuecomment-92308357
|
201
|
-
#
|
202
|
-
# I think we have more than enough tools that sound the alarms if we have
|
203
|
-
# such an obvious mistake like mismatched tokens.
|
204
|
-
#
|
205
|
-
# - Our specs are likely to fail
|
206
|
-
# - RuboCop will flag it regardless, it just doesn't autocorrect it by default
|
207
|
-
# - Ruby will emit a warning which we configure to fail our specs
|
208
|
-
#
|
209
|
-
# So I think it is safe to enable autocorrect for end alignment cops because it
|
210
|
-
# does not seem unsafe and it improves workflow to be able to autocorrect alignment
|
211
|
-
Lint/DefEndAlignment:
|
212
|
-
AutoCorrect: true
|
213
|
-
# See explanation for `Lint/DefEndAlignment`
|
214
|
-
Lint/EndAlignment:
|
215
|
-
AutoCorrect: true
|
216
90
|
|
217
91
|
# TODO is inlined so that it takes precedence.
|
218
92
|
|
219
|
-
|
220
|
-
|
221
|
-
# on 2017-01-27 00:08:49 -0800 using RuboCop version 0.47.1.
|
222
|
-
# The point is for the user to remove these configuration records
|
223
|
-
# one by one as the offenses are removed from the code base.
|
224
|
-
# Note that changes in the inspected code, or installation of new
|
225
|
-
# versions of RuboCop, may require this file to be generated again.
|
93
|
+
Lint/BooleanSymbol:
|
94
|
+
Enabled: false
|
226
95
|
|
227
|
-
|
228
|
-
|
229
|
-
# Configuration parameters: EnforcedStyleAlignWith, SupportedStylesAlignWith, AutoCorrect.
|
230
|
-
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
96
|
+
Lint/InterpolationCheck:
|
97
|
+
Enabled: false
|
231
98
|
|
232
|
-
|
233
|
-
# Cop supports --auto-correct.
|
234
|
-
Lint/UnifiedInteger:
|
99
|
+
Lint/MissingCopEnableDirective:
|
235
100
|
Enabled: false
|
236
101
|
|
237
102
|
# Offense count: 10
|
@@ -251,16 +116,25 @@ Metrics/LineLength:
|
|
251
116
|
Style/AndOr:
|
252
117
|
Enabled: false
|
253
118
|
|
119
|
+
Style/EvalWithLocation:
|
120
|
+
Enabled: false
|
121
|
+
|
122
|
+
Style/ExpandPathArguments:
|
123
|
+
Enabled: false
|
124
|
+
|
254
125
|
# Offense count: 150
|
255
126
|
# Cop supports --auto-correct.
|
256
|
-
|
127
|
+
Layout/FirstMethodArgumentLineBreak:
|
128
|
+
Enabled: false
|
129
|
+
|
130
|
+
Style/FrozenStringLiteralComment:
|
257
131
|
Enabled: false
|
258
132
|
|
259
133
|
# Offense count: 2
|
260
134
|
# Cop supports --auto-correct.
|
261
135
|
# Configuration parameters: SupportedStyles, IndentationWidth.
|
262
136
|
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
263
|
-
|
137
|
+
Layout/IndentHash:
|
264
138
|
EnforcedStyle: special_inside_parentheses
|
265
139
|
|
266
140
|
# Offense count: 21
|
@@ -277,8 +151,7 @@ Style/LambdaCall:
|
|
277
151
|
Style/Next:
|
278
152
|
Enabled: false
|
279
153
|
|
280
|
-
|
281
|
-
Devtools/GroupSingleLineLet:
|
154
|
+
Style/StderrPuts:
|
282
155
|
Enabled: false
|
283
156
|
|
284
157
|
# RSpec Cops
|
@@ -303,6 +176,15 @@ RSpec/DescribeClass:
|
|
303
176
|
# Note that changes in the inspected code, or installation of new
|
304
177
|
# versions of RuboCop, may require this file to be generated again.
|
305
178
|
|
179
|
+
RSpec/ContextWording:
|
180
|
+
Enabled: false
|
181
|
+
|
182
|
+
RSpec/ExpectChange:
|
183
|
+
Enabled: false
|
184
|
+
|
185
|
+
RSpec/ExpectInHook:
|
186
|
+
Enabled: false
|
187
|
+
|
306
188
|
# Offense count: 89
|
307
189
|
# Configuration parameters: CustomIncludeMethods.
|
308
190
|
RSpec/EmptyExampleGroup:
|
@@ -339,12 +221,21 @@ RSpec/FilePath:
|
|
339
221
|
- 'spec/unit/mutest/matcher/scope_spec.rb'
|
340
222
|
- 'spec/unit/mutest/matcher/static_spec.rb'
|
341
223
|
|
224
|
+
RSpec/ImplicitSubject:
|
225
|
+
Enabled: false
|
226
|
+
|
342
227
|
# Offense count: 5
|
343
228
|
# Configuration parameters: AssignmentOnly.
|
344
229
|
RSpec/InstanceVariable:
|
345
230
|
Exclude:
|
346
231
|
- 'spec/unit/mutest/parallel/master_spec.rb'
|
347
232
|
|
233
|
+
RSpec/IteratedExpectation:
|
234
|
+
Enabled: false
|
235
|
+
|
236
|
+
RSpec/LetBeforeExamples:
|
237
|
+
Enabled: false
|
238
|
+
|
348
239
|
# Offense count: 93
|
349
240
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
350
241
|
# SupportedStyles: allow, expect
|
@@ -382,6 +273,12 @@ RSpec/NestedGroups:
|
|
382
273
|
- 'spec/unit/mutest/repository/diff_spec.rb'
|
383
274
|
- 'spec/unit/mutest/runner/sink_spec.rb'
|
384
275
|
|
276
|
+
RSpec/ScatteredLet:
|
277
|
+
Enabled: false
|
278
|
+
|
279
|
+
RSpec/VoidExpect:
|
280
|
+
Enabled: false
|
281
|
+
|
385
282
|
# Offense count: 18
|
386
283
|
# Configuration parameters: IgnoreSymbolicNames.
|
387
284
|
RSpec/VerifiedDoubles:
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|
6
6
|
|
7
7
|
## [Master (Unreleased)]
|
8
8
|
|
9
|
+
## [0.0.10] - 2019-02-10
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
- Fix ruby 2.5 inline rescue/ensure/else support (and probably other invalid mutations) [[#102](https://github.com/dgollahon/mutest/pull/102/files)] ([@dgollahon][])]
|
13
|
+
|
14
|
+
### Changed
|
15
|
+
- Drop support for ruby 2.1 and 2.2. [[#100](https://github.com/dgollahon/mutest/pull/100/files)] ([@dgollahon][])]
|
16
|
+
|
9
17
|
## [0.0.9] - 2018-04-22
|
10
18
|
|
11
19
|
### Changed
|
data/Gemfile
CHANGED
@@ -9,9 +9,8 @@ gem 'pry-byebug', '~> 3.4'
|
|
9
9
|
gem 'rake', '~> 12'
|
10
10
|
gem 'rspec', '~> 3.6'
|
11
11
|
gem 'rspec-its', '~> 1.2.0'
|
12
|
-
gem 'rubocop', '~> 0.
|
13
|
-
gem 'rubocop-
|
14
|
-
gem 'rubocop-rspec', '~> 1.10.0'
|
12
|
+
gem 'rubocop', '~> 0.63'
|
13
|
+
gem 'rubocop-rspec', '~> 1.32'
|
15
14
|
gem 'simplecov', '~> 0.13.0'
|
16
15
|
|
17
16
|
# Lock to 1.10 in tests until https://git.io/vHjug is released
|
data/Gemfile.lock
CHANGED
@@ -1,17 +1,7 @@
|
|
1
|
-
GIT
|
2
|
-
remote: https://github.com/backus/rubocop-devtools.git
|
3
|
-
revision: cafba9afd1e014a4b14c7ce06982960643823148
|
4
|
-
specs:
|
5
|
-
rubocop-devtools (0.0.1)
|
6
|
-
adamantium (~> 0.2.0)
|
7
|
-
anima (~> 0.3.0)
|
8
|
-
concord (~> 0.1.5)
|
9
|
-
ice_nine (~> 0.11.1)
|
10
|
-
|
11
1
|
PATH
|
12
2
|
remote: .
|
13
3
|
specs:
|
14
|
-
mutest (0.0.
|
4
|
+
mutest (0.0.9)
|
15
5
|
abstract_type (~> 0.0.7)
|
16
6
|
adamantium (~> 0.2.0)
|
17
7
|
anima (~> 0.3.0)
|
@@ -26,7 +16,7 @@ PATH
|
|
26
16
|
parser (>= 2.5.0.1, < 2.6)
|
27
17
|
procto (~> 0.0.2)
|
28
18
|
regexp_parser (~> 0.4.9)
|
29
|
-
unparser (~> 0.2
|
19
|
+
unparser (~> 0.4.2)
|
30
20
|
|
31
21
|
GEM
|
32
22
|
remote: https://rubygems.org/
|
@@ -40,8 +30,8 @@ GEM
|
|
40
30
|
adamantium (~> 0.2)
|
41
31
|
equalizer (~> 0.0.11)
|
42
32
|
ast (2.4.0)
|
43
|
-
byebug (
|
44
|
-
coderay (1.1.
|
33
|
+
byebug (10.0.2)
|
34
|
+
coderay (1.1.2)
|
45
35
|
concord (0.1.5)
|
46
36
|
adamantium (~> 0.2.0)
|
47
37
|
equalizer (~> 0.0.9)
|
@@ -49,10 +39,11 @@ GEM
|
|
49
39
|
docile (1.1.5)
|
50
40
|
equalizer (0.0.11)
|
51
41
|
ice_nine (0.11.2)
|
42
|
+
jaro_winkler (1.5.2)
|
52
43
|
json (2.1.0)
|
53
44
|
memoizable (0.4.2)
|
54
45
|
thread_safe (~> 0.3, >= 0.3.1)
|
55
|
-
method_source (0.
|
46
|
+
method_source (0.9.2)
|
56
47
|
morpher (0.2.6)
|
57
48
|
abstract_type (~> 0.0.7)
|
58
49
|
adamantium (~> 0.2.0)
|
@@ -63,55 +54,54 @@ GEM
|
|
63
54
|
ice_nine (~> 0.11.0)
|
64
55
|
procto (~> 0.0.2)
|
65
56
|
parallel (1.10.0)
|
66
|
-
parser (2.5.
|
57
|
+
parser (2.5.3.0)
|
67
58
|
ast (~> 2.4.0)
|
68
|
-
powerpack (0.1.
|
59
|
+
powerpack (0.1.2)
|
69
60
|
procto (0.0.3)
|
70
|
-
pry (0.
|
61
|
+
pry (0.12.2)
|
71
62
|
coderay (~> 1.1.0)
|
72
|
-
method_source (~> 0.
|
73
|
-
|
74
|
-
|
75
|
-
byebug (~> 9.0)
|
63
|
+
method_source (~> 0.9.0)
|
64
|
+
pry-byebug (3.6.0)
|
65
|
+
byebug (~> 10.0)
|
76
66
|
pry (~> 0.10)
|
77
|
-
rainbow (
|
78
|
-
|
79
|
-
rake (12.0.0)
|
67
|
+
rainbow (3.0.0)
|
68
|
+
rake (12.3.2)
|
80
69
|
regexp_parser (0.4.13)
|
81
|
-
rspec (3.
|
82
|
-
rspec-core (~> 3.
|
83
|
-
rspec-expectations (~> 3.
|
84
|
-
rspec-mocks (~> 3.
|
85
|
-
rspec-core (3.
|
86
|
-
rspec-support (~> 3.
|
87
|
-
rspec-expectations (3.
|
70
|
+
rspec (3.8.0)
|
71
|
+
rspec-core (~> 3.8.0)
|
72
|
+
rspec-expectations (~> 3.8.0)
|
73
|
+
rspec-mocks (~> 3.8.0)
|
74
|
+
rspec-core (3.8.0)
|
75
|
+
rspec-support (~> 3.8.0)
|
76
|
+
rspec-expectations (3.8.2)
|
88
77
|
diff-lcs (>= 1.2.0, < 2.0)
|
89
|
-
rspec-support (~> 3.
|
78
|
+
rspec-support (~> 3.8.0)
|
90
79
|
rspec-its (1.2.0)
|
91
80
|
rspec-core (>= 3.0.0)
|
92
81
|
rspec-expectations (>= 3.0.0)
|
93
|
-
rspec-mocks (3.
|
82
|
+
rspec-mocks (3.8.0)
|
94
83
|
diff-lcs (>= 1.2.0, < 2.0)
|
95
|
-
rspec-support (~> 3.
|
96
|
-
rspec-support (3.
|
97
|
-
rubocop (0.
|
98
|
-
|
84
|
+
rspec-support (~> 3.8.0)
|
85
|
+
rspec-support (3.8.0)
|
86
|
+
rubocop (0.64.0)
|
87
|
+
jaro_winkler (~> 1.5.1)
|
88
|
+
parallel (~> 1.10)
|
89
|
+
parser (>= 2.5, != 2.5.1.1)
|
99
90
|
powerpack (~> 0.1)
|
100
|
-
rainbow (>=
|
91
|
+
rainbow (>= 2.2.2, < 4.0)
|
101
92
|
ruby-progressbar (~> 1.7)
|
102
|
-
unicode-display_width (~> 1.
|
103
|
-
rubocop-rspec (1.
|
104
|
-
rubocop (>= 0.
|
105
|
-
ruby-progressbar (1.
|
93
|
+
unicode-display_width (~> 1.4.0)
|
94
|
+
rubocop-rspec (1.32.0)
|
95
|
+
rubocop (>= 0.60.0)
|
96
|
+
ruby-progressbar (1.10.0)
|
106
97
|
simplecov (0.13.0)
|
107
98
|
docile (~> 1.1.0)
|
108
99
|
json (>= 1.8, < 3)
|
109
100
|
simplecov-html (~> 0.10.0)
|
110
|
-
simplecov-html (0.10.
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
unparser (0.2.7)
|
101
|
+
simplecov-html (0.10.2)
|
102
|
+
thread_safe (0.3.6)
|
103
|
+
unicode-display_width (1.4.1)
|
104
|
+
unparser (0.4.2)
|
115
105
|
abstract_type (~> 0.0.7)
|
116
106
|
adamantium (~> 0.2.0)
|
117
107
|
concord (~> 0.1.5)
|
@@ -131,10 +121,9 @@ DEPENDENCIES
|
|
131
121
|
rake (~> 12)
|
132
122
|
rspec (~> 3.6)
|
133
123
|
rspec-its (~> 1.2.0)
|
134
|
-
rubocop (~> 0.
|
135
|
-
rubocop-
|
136
|
-
rubocop-rspec (~> 1.10.0)
|
124
|
+
rubocop (~> 0.63)
|
125
|
+
rubocop-rspec (~> 1.32)
|
137
126
|
simplecov (~> 0.13.0)
|
138
127
|
|
139
128
|
BUNDLED WITH
|
140
|
-
1.
|
129
|
+
1.17.2
|