Sha256: 09868b5d5cd60b84a8be1a785d810a8c8a6e49fd6320e1707f8f8d6136cf52ed
Contents?: true
Size: 1.79 KB
Versions: 1
Compression:
Stored size: 1.79 KB
Contents
Feature: Offer different ways how to load configuration Reek can be configured in two ways: - Using the cli "-c" switch to pass a configuration file on the command line. - Having a Reek configuration file that is automatically found. Reek will look for a file ending in .reek in the following places, in order: - The current working directory - The working directory's ancestor directories, traversing all the way up to the root. - Your HOME directory Reek will check these in order and stop after the first file found. Scenario: Default configuration Given the smelly file 'smelly.rb' When I run reek smelly.rb Then the exit status indicates smells And it reports: """ smelly.rb -- 2 warnings: [4]:UncommunicativeMethodName: Smelly#x has the name 'x' [5]:UncommunicativeVariableName: Smelly#x has the variable name 'y' """ Scenario: Configuration via CLI Given the smelly file 'smelly.rb' And a configuration file 'full_mask.reek' When I run reek -c full_mask.reek smelly.rb Then it reports no errors And it succeeds Scenario: Configuration file in working directory Given the smelly file 'smelly.rb' And a configuration file 'full_mask.reek' When I run reek smelly.rb Then it reports no errors And it succeeds Scenario: Two opposing configuration files and we stop after the first one Given the smelly file 'smelly.rb' in a subdirectory And a configuration file 'partial_mask.reek' in a subdirectory And a configuration file 'full_mask.reek' When I run "reek smelly.rb" in a subdirectory Then the exit status indicates smells And it reports: """ smelly.rb -- 1 warning: [5]:UncommunicativeVariableName: Smelly#x has the variable name 'y' """
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
reek-4.8.2 | features/configuration_loading.feature |