-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Config: prevent meaningless empty arrays override options in file
It fixes the impossibility that the 'rules' and 'skip' options specified in speccy.yaml config file are used when these options are not override from command line. The Commander.js configuration has an empty array as a default/initial value for 'rules' and 'skip'. If you execute the lint command from the command line without specifying those arguments, when the config is loaded those 'supplied' literal config values (empty arrays) overrides the ones defined in a speccy.yaml file (because they are not 'undefined'). There is a test validating the config hierarchy but, as the configuration passed to init() is handcrafted, it wasn't simulating the output of Commander.js read options. Now, a test simulating this case was added.
- Loading branch information
Martin D'Aloia
committed
May 19, 2019
1 parent
f7ba6d5
commit cc775db
Showing
3 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters