AtomLinter / linter-foodcritic

Atom linter provider for foodcritic
MIT License
1 stars 5 forks source link

linter-foodcritic fails if extra params is empty #7

Closed signe closed 9 years ago

signe commented 9 years ago

Linter: 1.1.0 Linter-Foodcritic: 0.3.10

foodcritic 4.0.0 (ChefDK 0.6.2-1)

Example:

foodcritic "" "recipes/apt-packages.rb"

stdout returns:

foodcritic [cookbook_paths]
    -t, --tags TAGS                  Check against (or exclude ~) rules with the specified tags.
    -f, --epic-fail TAGS             Fail the build based on tags. Use 'any' to fail on all warnings.
    -c, --chef-version VERSION       Only check against rules valid for this version of Chef.
    -B, --cookbook-path PATH         Cookbook path(s) to check.
    -C, --[no-]context               Show lines matched against rather than the default summary.
    -E, --environment-path PATH      Environment path(s) to check.
    -I, --include PATH               Additional rule file path(s) to load.
    -G, --search-gems                Search rubygems for rule files with the path foodcritic/rules/**/*.rb
    -R, --role-path PATH             Role path(s) to check.
    -S, --search-grammar PATH        Specify grammar to use when validating search syntax.
    -V, --version                    Display the foodcritic version.
    -X, --exclude PATH               Exclude path(s) from being linted.

Adding --no-context to the extra params field allows the linter to operate

e.g.

foodcritic "--no-context" "recipes/apt-packages.rb"