warder 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/warder/version.rb +1 -1
- metadata +26 -214
- data/.gitignore +0 -20
- data/.travis.yml +0 -15
- data/Gemfile +0 -4
- data/LICENSE.txt +0 -22
- data/README.md +0 -130
- data/Rakefile +0 -53
- data/cucumber.yml +0 -4
- data/features/checks_for_all_issues.feature +0 -36
- data/features/checks_for_rails_best_practices.feature +0 -25
- data/features/checks_for_rails_related_issues.feature +0 -27
- data/features/checks_for_rails_security_issues.feature +0 -25
- data/features/checks_for_sandi_metz_rules.feature +0 -25
- data/features/checks_for_vulnerable_gems.feature +0 -25
- data/features/detects_code_complexity.feature +0 -29
- data/features/detects_code_duplication.feature +0 -32
- data/features/detects_code_smell.feature +0 -29
- data/features/detects_magick_numbers.feature +0 -29
- data/features/quiet.feature +0 -10
- data/features/run.feature +0 -9
- data/features/show_version.feature +0 -8
- data/features/statistics.feature +0 -22
- data/features/step_definitions/checks_for_rails_best_practices_steps.rb +0 -14
- data/features/step_definitions/checks_for_rails_security_issues_steps.rb +0 -24
- data/features/step_definitions/checks_for_sandi_metz_rules_step.rb +0 -7
- data/features/step_definitions/checks_for_vulnerable_gems_steps.rb +0 -15
- data/features/step_definitions/detects_code_complexity_steps.rb +0 -11
- data/features/step_definitions/detects_code_duplication_steps.rb +0 -7
- data/features/step_definitions/detects_code_smell_steps.rb +0 -7
- data/features/step_definitions/detects_magick_numbers_steps.rb +0 -7
- data/features/step_definitions/run_steps.rb +0 -38
- data/features/step_definitions/show_version_steps.rb +0 -3
- data/features/step_definitions/statistics_steps.rb +0 -4
- data/features/step_definitions/validates_coffeescript_style_guide_steps.rb +0 -12
- data/features/step_definitions/validates_ruby_style_guide_steps.rb +0 -7
- data/features/support/env.rb +0 -23
- data/features/validates_coffeescript_style_guide.feature +0 -29
- data/features/validates_ruby_style_guide.feature +0 -29
- data/spec/fixtures/invalid_code_complexity.rb +0 -13
- data/spec/fixtures/invalid_code_duplication.rb +0 -40
- data/spec/fixtures/invalid_code_smell.rb +0 -4
- data/spec/fixtures/invalid_coffee_lint.coffee +0 -6
- data/spec/fixtures/invalid_magick_numbers.rb +0 -1
- data/spec/fixtures/invalid_rails_app/Gemfile +0 -4
- data/spec/fixtures/invalid_rails_app/Gemfile_lock +0 -82
- data/spec/fixtures/invalid_rails_app/Rakefile +0 -6
- data/spec/fixtures/invalid_rails_app/app/assets/javascripts/invalid_coffee_lint.coffee +0 -6
- data/spec/fixtures/invalid_rails_app/app/controllers/application_controller.rb +0 -19
- data/spec/fixtures/invalid_rails_app/app/models/user.rb +0 -5
- data/spec/fixtures/invalid_rails_app/app/views/layouts/application.html.erb +0 -14
- data/spec/fixtures/invalid_rails_app/config.ru +0 -4
- data/spec/fixtures/invalid_rails_app/config/application.rb +0 -24
- data/spec/fixtures/invalid_rails_app/config/boot.rb +0 -4
- data/spec/fixtures/invalid_rails_app/config/database.yml +0 -25
- data/spec/fixtures/invalid_rails_app/config/environment.rb +0 -5
- data/spec/fixtures/invalid_rails_app/config/environments/development.rb +0 -29
- data/spec/fixtures/invalid_rails_app/config/environments/production.rb +0 -80
- data/spec/fixtures/invalid_rails_app/config/environments/test.rb +0 -36
- data/spec/fixtures/invalid_rails_app/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/fixtures/invalid_rails_app/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/fixtures/invalid_rails_app/config/initializers/inflections.rb +0 -16
- data/spec/fixtures/invalid_rails_app/config/initializers/mime_types.rb +0 -5
- data/spec/fixtures/invalid_rails_app/config/initializers/secret_token.rb +0 -12
- data/spec/fixtures/invalid_rails_app/config/initializers/session_store.rb +0 -3
- data/spec/fixtures/invalid_rails_app/config/initializers/wrap_parameters.rb +0 -14
- data/spec/fixtures/invalid_rails_app/config/locales/en.yml +0 -23
- data/spec/fixtures/invalid_rails_app/config/routes.rb +0 -5
- data/spec/fixtures/invalid_rails_app/lib/invalid_code_complexity.rb +0 -13
- data/spec/fixtures/invalid_rails_app/lib/invalid_code_duplication.rb +0 -40
- data/spec/fixtures/invalid_style_guide.rb +0 -3
- data/spec/fixtures/strictly_invalid_style_guide.rb +0 -3
- data/spec/fixtures/valid.rb +0 -1
- data/spec/fixtures/valid_coffee_lint.coffee +0 -6
- data/spec/fixtures/valid_rails_app/Gemfile +0 -5
- data/spec/fixtures/valid_rails_app/Gemfile_lock +0 -105
- data/spec/fixtures/valid_rails_app/Rakefile +0 -7
- data/spec/fixtures/valid_rails_app/app/assets/javascripts/valid.coffee +0 -6
- data/spec/fixtures/valid_rails_app/app/controllers/application_controller.rb +0 -6
- data/spec/fixtures/valid_rails_app/app/views/layouts/application.html.erb +0 -14
- data/spec/fixtures/valid_rails_app/config.ru +0 -4
- data/spec/fixtures/valid_rails_app/config/application.rb +0 -29
- data/spec/fixtures/valid_rails_app/config/boot.rb +0 -4
- data/spec/fixtures/valid_rails_app/config/database.yml +0 -25
- data/spec/fixtures/valid_rails_app/config/environment.rb +0 -5
- data/spec/fixtures/valid_rails_app/config/environments/development.rb +0 -30
- data/spec/fixtures/valid_rails_app/config/environments/production.rb +0 -86
- data/spec/fixtures/valid_rails_app/config/environments/test.rb +0 -37
- data/spec/fixtures/valid_rails_app/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/fixtures/valid_rails_app/config/initializers/mime_types.rb +0 -5
- data/spec/fixtures/valid_rails_app/config/initializers/secret_token.rb +0 -13
- data/spec/fixtures/valid_rails_app/config/initializers/session_store.rb +0 -3
- data/spec/fixtures/valid_rails_app/config/initializers/wrap_parameters.rb +0 -15
- data/spec/fixtures/valid_rails_app/config/locales/en.yml +0 -23
- data/spec/fixtures/valid_rails_app/config/routes.rb +0 -2
- data/spec/spec_helper.rb +0 -8
- data/warder.gemspec +0 -38
data/Gemfile
DELETED
data/LICENSE.txt
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2013 Yura Tolstik
|
|
2
|
-
|
|
3
|
-
MIT License
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
a copy of this software and associated documentation files (the
|
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
included in all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
# Warder
|
|
2
|
-
|
|
3
|
-
[](https://travis-ci.org/yltsrc/warder)
|
|
4
|
-
[](https://codeclimate.com/github/yltsrc/warder)
|
|
5
|
-
[](https://gemnasium.com/yltsrc/warder)
|
|
6
|
-
|
|
7
|
-
## Getting started
|
|
8
|
-
|
|
9
|
-
Main goal of this project was to provide you tool, which will help make code
|
|
10
|
-
better. I used these tools for a while and can provide some tips.
|
|
11
|
-
|
|
12
|
-
Just to start with warder, it would be great to do something simple.
|
|
13
|
-
And I will recommend to start with checking your bundle for security issues
|
|
14
|
-
|
|
15
|
-
$ warder --bundle-audit
|
|
16
|
-
|
|
17
|
-
Sooner or later you will start with code cleanup. There are two main ways to
|
|
18
|
-
deal with it, depending what you plan to achieve. If you are interested in clean
|
|
19
|
-
code, according to style guides, you may want to use
|
|
20
|
-
|
|
21
|
-
$ warder --style-guide
|
|
22
|
-
|
|
23
|
-
But if you want to see you code OOP-friendly, then you need different approach
|
|
24
|
-
|
|
25
|
-
$ warder --code-smell
|
|
26
|
-
|
|
27
|
-
Next steps for stylish code are:
|
|
28
|
-
|
|
29
|
-
$ warder --magick-numbers
|
|
30
|
-
$ warder --code-duplication
|
|
31
|
-
|
|
32
|
-
And for OOP-style code next steps will be:
|
|
33
|
-
|
|
34
|
-
$ warder --code-complexity
|
|
35
|
-
|
|
36
|
-
Then you can apply everything is left. But I strongly recommend to add
|
|
37
|
-
validations one by one, right after all issues are fixed from previous one.
|
|
38
|
-
Now it is not possible to compare results on feature branches without scripting,
|
|
39
|
-
so you must be careful, if you want to use all suitable validators and results
|
|
40
|
-
are not as good as it can be.
|
|
41
|
-
|
|
42
|
-
There are few rails specific validators, but the rules are the same. Security is
|
|
43
|
-
the first priority:
|
|
44
|
-
|
|
45
|
-
$ warder --rails-security
|
|
46
|
-
|
|
47
|
-
You may also want to see some advice, regarding rails best practices:
|
|
48
|
-
|
|
49
|
-
$ warder --rails-advice
|
|
50
|
-
|
|
51
|
-
but be careful with it, some reported advices may conflict with another
|
|
52
|
-
validators.
|
|
53
|
-
|
|
54
|
-
You may also see, how your rails app meets Sandi Metz rules:
|
|
55
|
-
|
|
56
|
-
$ warder --sandi-rules
|
|
57
|
-
|
|
58
|
-
You can validate not only ruby files, but also coffeescript files:
|
|
59
|
-
|
|
60
|
-
$ warder --coffee-lint
|
|
61
|
-
|
|
62
|
-
## Installation
|
|
63
|
-
|
|
64
|
-
Add this line to your application's Gemfile:
|
|
65
|
-
|
|
66
|
-
gem 'warder'
|
|
67
|
-
|
|
68
|
-
And then execute:
|
|
69
|
-
|
|
70
|
-
$ bundle
|
|
71
|
-
|
|
72
|
-
Or install it yourself as:
|
|
73
|
-
|
|
74
|
-
$ gem install warder
|
|
75
|
-
|
|
76
|
-
## Usage
|
|
77
|
-
|
|
78
|
-
First of all, RTFM!
|
|
79
|
-
|
|
80
|
-
$ warder --help
|
|
81
|
-
|
|
82
|
-
to see all supported scanners.
|
|
83
|
-
If you are too lazy, you will be confused with results.
|
|
84
|
-
|
|
85
|
-
$ warder
|
|
86
|
-
|
|
87
|
-
to see that everything is good (actually no one validator used) and you don't
|
|
88
|
-
need to fix any issues :)
|
|
89
|
-
|
|
90
|
-
You also can use shortcuts:
|
|
91
|
-
|
|
92
|
-
$ warder --all
|
|
93
|
-
|
|
94
|
-
to run all validations, even ones you don't really need.
|
|
95
|
-
|
|
96
|
-
To run only rails related validations:
|
|
97
|
-
|
|
98
|
-
$ warder --rails
|
|
99
|
-
|
|
100
|
-
or to validate your ruby project:
|
|
101
|
-
|
|
102
|
-
$ warder --all --no-rails
|
|
103
|
-
|
|
104
|
-
if you so tired looking at your code issues, you can use silent mode
|
|
105
|
-
|
|
106
|
-
$ warder --quiet
|
|
107
|
-
|
|
108
|
-
and you just will get result by exit code.
|
|
109
|
-
|
|
110
|
-
But if you, or your CI is really interested in statistics, there is statistics
|
|
111
|
-
mode for you:
|
|
112
|
-
|
|
113
|
-
$ warder --quiet --stats
|
|
114
|
-
|
|
115
|
-
if you working on multiple projects, you can pass path to another project
|
|
116
|
-
as an argument:
|
|
117
|
-
|
|
118
|
-
$ warder --quiet /path/to/another/project
|
|
119
|
-
|
|
120
|
-
The best thing I can do with warder is validate project itself, so anyone can
|
|
121
|
-
see, that it is not so hard to write good ruby code. Just check build status on
|
|
122
|
-
[Travis CI](https://travis-ci.org/yltsrc/warder).
|
|
123
|
-
|
|
124
|
-
## Contributing
|
|
125
|
-
|
|
126
|
-
1. Fork it
|
|
127
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
128
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
129
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
|
130
|
-
5. Create new Pull Request
|
data/Rakefile
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
require 'bundler/gem_tasks'
|
|
2
|
-
require 'rspec/core/rake_task'
|
|
3
|
-
require 'cucumber/rake/task'
|
|
4
|
-
|
|
5
|
-
namespace :spec do
|
|
6
|
-
desc 'Run specs that should pass'
|
|
7
|
-
RSpec::Core::RakeTask.new(:ok) do |t|
|
|
8
|
-
t.rspec_opts = '--tag ~wip'
|
|
9
|
-
t.pattern = './spec/**/*_spec.rb'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
desc 'Run specs that are being worked on'
|
|
13
|
-
RSpec::Core::RakeTask.new(:wip) do |t|
|
|
14
|
-
t.rspec_opts = '--color --tag wip'
|
|
15
|
-
t.pattern = './spec/**/*_spec.rb'
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
desc 'Run all specs'
|
|
19
|
-
RSpec::Core::RakeTask.new(:all) do |t|
|
|
20
|
-
t.rspec_opts = '--color'
|
|
21
|
-
t.pattern = './spec/**/*_spec.rb'
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
namespace :cucumber do
|
|
26
|
-
desc 'Run features that should pass'
|
|
27
|
-
Cucumber::Rake::Task.new(:ok) do |t|
|
|
28
|
-
t.fork = true # You may get faster startup if you set this to false
|
|
29
|
-
t.profile = 'ok'
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
desc 'Run features that are being worked on'
|
|
33
|
-
Cucumber::Rake::Task.new(:wip) do |t|
|
|
34
|
-
t.fork = true # You may get faster startup if you set this to false
|
|
35
|
-
t.profile = 'wip'
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
desc 'Run all features'
|
|
39
|
-
Cucumber::Rake::Task.new(:all) do |t|
|
|
40
|
-
t.fork = true # You may get faster startup if you set this to false
|
|
41
|
-
t.profile = 'default'
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
desc 'Alias for cucumber:ok'
|
|
46
|
-
task cucumber: 'cucumber:ok'
|
|
47
|
-
|
|
48
|
-
desc 'Alias for spec:ok'
|
|
49
|
-
task spec: 'spec:ok'
|
|
50
|
-
|
|
51
|
-
task wip: %w(spec:wip cucumber:wip)
|
|
52
|
-
task all: %w(spec:all cucumber:all)
|
|
53
|
-
task default: %w(spec cucumber)
|
data/cucumber.yml
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
Feature: checks for all issues
|
|
2
|
-
In order to find all issues
|
|
3
|
-
As a ruby developer
|
|
4
|
-
I want to run warder with --all option
|
|
5
|
-
|
|
6
|
-
Scenario: run warder with enabled all option
|
|
7
|
-
Given I have valid_rails_app project in directory
|
|
8
|
-
And I am on project directory
|
|
9
|
-
When I run `warder --all`
|
|
10
|
-
Then warder detects style guide issues
|
|
11
|
-
Then warder detects magick numbers issues
|
|
12
|
-
Then warder detects code complexity issues
|
|
13
|
-
Then warder detects code duplication issues
|
|
14
|
-
Then warder detects code smell issues
|
|
15
|
-
Then warder detects sandi rules violations
|
|
16
|
-
Then warder detects rails best practices issues
|
|
17
|
-
Then warder detects rails security issues
|
|
18
|
-
Then warder detects gem freshness issues
|
|
19
|
-
Then warder detects coffee lint issues
|
|
20
|
-
Then the exit status should be 0
|
|
21
|
-
|
|
22
|
-
Scenario: run warder with enabled rails option on invalid project
|
|
23
|
-
Given I have invalid_rails_app project in directory
|
|
24
|
-
And I am on project directory
|
|
25
|
-
When I run `warder --all`
|
|
26
|
-
Then warder detects style guide issues
|
|
27
|
-
Then warder detects magick numbers issues
|
|
28
|
-
Then warder detects code complexity issues
|
|
29
|
-
Then warder detects code duplication issues
|
|
30
|
-
Then warder detects code smell issues
|
|
31
|
-
Then warder detects sandi rules violations
|
|
32
|
-
Then warder detects rails best practices issues
|
|
33
|
-
Then warder detects rails security issues
|
|
34
|
-
Then warder detects gem freshness issues
|
|
35
|
-
Then warder detects coffee lint issues
|
|
36
|
-
Then the exit status should be 10
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
Feature: checks for rails best practices advices
|
|
2
|
-
In order to get rails advices
|
|
3
|
-
As a ruby developer
|
|
4
|
-
I want to run warder with --rails-advice option
|
|
5
|
-
|
|
6
|
-
Scenario: run warder with enabled rails advice option
|
|
7
|
-
Given I have valid_rails_app project in directory
|
|
8
|
-
And I am on project directory
|
|
9
|
-
When I run `warder --rails-advice`
|
|
10
|
-
Then warder detects rails best practices issues
|
|
11
|
-
Then the exit status should be 0
|
|
12
|
-
|
|
13
|
-
Scenario: run warder with enabled rails advice option on invalid project
|
|
14
|
-
Given I have invalid_rails_app project in directory
|
|
15
|
-
And I am on project directory
|
|
16
|
-
When I run `warder --rails-advice`
|
|
17
|
-
Then warder detects rails best practices issues
|
|
18
|
-
Then the exit status should be 1
|
|
19
|
-
|
|
20
|
-
Scenario: run warder with disabled rails advice option on invalid project
|
|
21
|
-
Given I have invalid_rails_app project in directory
|
|
22
|
-
And I am on project directory
|
|
23
|
-
When I run `warder --no-rails-advice`
|
|
24
|
-
Then warder does nothing
|
|
25
|
-
Then the exit status should be 0
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
Feature: checks for rails related issues
|
|
2
|
-
In order to find rails related issues
|
|
3
|
-
As a ruby developer
|
|
4
|
-
I want to run warder with --rails option
|
|
5
|
-
|
|
6
|
-
Scenario: run warder with enabled rails option
|
|
7
|
-
Given I have valid_rails_app project in directory
|
|
8
|
-
And I am on project directory
|
|
9
|
-
When I run `warder --rails`
|
|
10
|
-
Then warder detects rails best practices issues
|
|
11
|
-
Then warder detects rails security issues
|
|
12
|
-
Then the exit status should be 0
|
|
13
|
-
|
|
14
|
-
Scenario: run warder with enabled rails option on invalid project
|
|
15
|
-
Given I have invalid_rails_app project in directory
|
|
16
|
-
And I am on project directory
|
|
17
|
-
When I run `warder --rails`
|
|
18
|
-
Then warder detects rails best practices issues
|
|
19
|
-
Then warder detects rails security issues
|
|
20
|
-
Then the exit status should be 2
|
|
21
|
-
|
|
22
|
-
Scenario: run warder with disabled rails option on invalid project
|
|
23
|
-
Given I have invalid_rails_app project in directory
|
|
24
|
-
And I am on project directory
|
|
25
|
-
When I run `warder --no-rails`
|
|
26
|
-
Then warder does nothing
|
|
27
|
-
Then the exit status should be 0
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
Feature: checks for rails related security issues
|
|
2
|
-
In order to find security issues
|
|
3
|
-
As a ruby developer
|
|
4
|
-
I want to run warder with --rails-security option
|
|
5
|
-
|
|
6
|
-
Scenario: run warder with enabled rails security option
|
|
7
|
-
Given I have valid_rails_app project in directory
|
|
8
|
-
And I am on project directory
|
|
9
|
-
When I run `warder --rails-security`
|
|
10
|
-
Then warder detects rails security issues
|
|
11
|
-
Then the exit status should be 0
|
|
12
|
-
|
|
13
|
-
Scenario: run warder with enabled rails security option on invalid project
|
|
14
|
-
Given I have invalid_rails_app project in directory
|
|
15
|
-
And I am on project directory
|
|
16
|
-
When I run `warder --rails-security`
|
|
17
|
-
Then warder detects rails security issues
|
|
18
|
-
Then the exit status should be 1
|
|
19
|
-
|
|
20
|
-
Scenario: run warder with disabled rails security option on invalid project
|
|
21
|
-
Given I have invalid_rails_app project in directory
|
|
22
|
-
And I am on project directory
|
|
23
|
-
When I run `warder --no-rails-security`
|
|
24
|
-
Then warder does nothing
|
|
25
|
-
Then the exit status should be 0
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
Feature: checks for Sandi Metz rules violations
|
|
2
|
-
In order to find Sandi Metz rules violations
|
|
3
|
-
As a ruby developer
|
|
4
|
-
I want to run warder with --sandi-rules option
|
|
5
|
-
|
|
6
|
-
Scenario: run warder with enabled sandi rules option
|
|
7
|
-
Given I have valid_rails_app project in directory
|
|
8
|
-
And I am on project directory
|
|
9
|
-
When I run `warder --sandi-rules`
|
|
10
|
-
Then warder detects sandi rules violations
|
|
11
|
-
Then the exit status should be 0
|
|
12
|
-
|
|
13
|
-
Scenario: run warder with enabled sandi rules option on invalid project
|
|
14
|
-
Given I have invalid_rails_app project in directory
|
|
15
|
-
And I am on project directory
|
|
16
|
-
When I run `warder --sandi-rules`
|
|
17
|
-
Then warder detects sandi rules violations
|
|
18
|
-
Then the exit status should be 1
|
|
19
|
-
|
|
20
|
-
Scenario: run warder with disabled sandi rules option on invalid project
|
|
21
|
-
Given I have invalid_rails_app project in directory
|
|
22
|
-
And I am on project directory
|
|
23
|
-
When I run `warder --no-sandi-rules`
|
|
24
|
-
Then warder does nothing
|
|
25
|
-
Then the exit status should be 0
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
Feature: checks for vulnerable gems
|
|
2
|
-
In order to find vulnerable gems
|
|
3
|
-
As a ruby developer
|
|
4
|
-
I want to run warder with --bundle-audit option
|
|
5
|
-
|
|
6
|
-
Scenario: run warder with enabled bundle audit option
|
|
7
|
-
Given I have valid_rails_app project in directory
|
|
8
|
-
And I am on project directory
|
|
9
|
-
When I run `warder --bundle-audit`
|
|
10
|
-
Then warder detects gem freshness issues
|
|
11
|
-
Then the exit status should be 0
|
|
12
|
-
|
|
13
|
-
Scenario: run warder with enabled bundle audit option on invalid file
|
|
14
|
-
Given I have invalid_rails_app project in directory
|
|
15
|
-
And I am on project directory
|
|
16
|
-
When I run `warder --bundle-audit`
|
|
17
|
-
Then warder detects gem freshness issues
|
|
18
|
-
Then the exit status should be 1
|
|
19
|
-
|
|
20
|
-
Scenario: run warder with disabled bundle audit option on invalid file
|
|
21
|
-
Given I have invalid_rails_app project in directory
|
|
22
|
-
And I am on project directory
|
|
23
|
-
When I run `warder --no-bundle-audit`
|
|
24
|
-
Then warder does nothing
|
|
25
|
-
Then the exit status should be 0
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
Feature: detects code complexity
|
|
2
|
-
In order to find code complexity
|
|
3
|
-
As a ruby developer
|
|
4
|
-
I want to run warder with --code-complexity option
|
|
5
|
-
|
|
6
|
-
Scenario: run warder with enabled code complexity option
|
|
7
|
-
Given I have valid file in directory
|
|
8
|
-
When I run `warder --code-complexity`
|
|
9
|
-
Then warder detects code complexity issues
|
|
10
|
-
Then the exit status should be 0
|
|
11
|
-
|
|
12
|
-
Scenario: run warder with enabled code complexity option on invalid file
|
|
13
|
-
Given I have invalid_code_complexity file in directory
|
|
14
|
-
When I run `warder --code-complexity`
|
|
15
|
-
Then warder detects code complexity issues
|
|
16
|
-
Then the exit status should be 1
|
|
17
|
-
|
|
18
|
-
Scenario: run warder with enabled code complexity option on valid file only
|
|
19
|
-
Given I have valid file in directory
|
|
20
|
-
And I have invalid_code_complexity file in directory
|
|
21
|
-
When I run `warder --code-complexity valid.rb`
|
|
22
|
-
Then warder does nothing
|
|
23
|
-
Then the exit status should be 0
|
|
24
|
-
|
|
25
|
-
Scenario: run warder with disabled code complexity option on invalid file
|
|
26
|
-
Given I have invalid_code_complexity file in directory
|
|
27
|
-
When I run `warder --no-code-complexity`
|
|
28
|
-
Then warder does nothing
|
|
29
|
-
Then the exit status should be 0
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
Feature: detects code duplication
|
|
2
|
-
In order to find code duplication
|
|
3
|
-
As a ruby developer
|
|
4
|
-
I want to run warder with --code-duplication option
|
|
5
|
-
|
|
6
|
-
Scenario: run warder with enabled code duplication option
|
|
7
|
-
Given I have valid file in directory
|
|
8
|
-
When I run `warder --code-duplication`
|
|
9
|
-
Then warder detects code duplication issues
|
|
10
|
-
Then the exit status should be 0
|
|
11
|
-
|
|
12
|
-
Scenario: run warder with enabled code duplication option on invalid file
|
|
13
|
-
Given I have invalid_code_duplication file in directory
|
|
14
|
-
When I set the environment variables to:
|
|
15
|
-
| variable | value |
|
|
16
|
-
| FLAY_SCORE | 15 |
|
|
17
|
-
And I run `warder --code-duplication`
|
|
18
|
-
Then warder detects code duplication issues
|
|
19
|
-
Then the exit status should be 1
|
|
20
|
-
|
|
21
|
-
Scenario: run warder with enabled code duplication option on valid file only
|
|
22
|
-
Given I have valid file in directory
|
|
23
|
-
And I have invalid_code_duplication file in directory
|
|
24
|
-
When I run `warder --code-duplication valid.rb`
|
|
25
|
-
Then warder does nothing
|
|
26
|
-
Then the exit status should be 0
|
|
27
|
-
|
|
28
|
-
Scenario: run warder with disabled code duplication option on invalid file
|
|
29
|
-
Given I have invalid_code_duplication file in directory
|
|
30
|
-
When I run `warder --no-code-duplication`
|
|
31
|
-
Then warder does nothing
|
|
32
|
-
Then the exit status should be 0
|