diff --git a/README.md b/README.md index 482efc0..66dbc19 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,20 @@ Run this command to enable the `Generate Test Coverage` and `Instrument Program ```sh $ slather setup path/to/project.xcodeproj ``` +## General Usage Notes +### Commandline Arguments Win +When using both a config file (`.slather.yml`) and providing arguments via the commandline, +the arguments will take precedence over the matching setting in the config file. +### `ignore` always wins over `source-files` +When defining both files that should be ignored (`--ignore`, ignore) and source files to include (`--source-files`, source_files), +the ignore list is checked first. If the file being scanned matches a glob in the ignore list, it will not be included. In this case, the +source_file list is not checked. + +If the file being scanned is not in the ignore list, and source_file has been defined, the source_file list is +checked. If the source file matches a glob, it will be included. + +## CI Integration ### Usage with Codecov Login to [Codecov](https://codecov.io/) (no need to activate a repository, this happens automatically). Right now, `slather` supports Codecov via **all** supported CI providers [listed here](https://github.com/codecov/codecov-bash#ci-providers). diff --git a/lib/slather/command/coverage_command.rb b/lib/slather/command/coverage_command.rb index a0e9306..fc3742f 100644 --- a/lib/slather/command/coverage_command.rb +++ b/lib/slather/command/coverage_command.rb @@ -174,7 +174,7 @@ def setup_arch end def setup_source_files - project.source_files = source_files if !source_files.empty? + project.source_files = source_files_list if !source_files_list.empty? end def setup_decimals diff --git a/lib/slather/project.rb b/lib/slather/project.rb index 4998dff..4f54545 100755 --- a/lib/slather/project.rb +++ b/lib/slather/project.rb @@ -383,7 +383,6 @@ def configure_ignore_list def configure_source_files self.source_files ||= [(self.class.yml["source_files"] || [])].flatten - puts self.source_files.to_json end def configure_ci_service