infinitered / solidarity

Solidarity is an environment checker for project dependencies across multiple machines.
https://infinitered.github.io/solidarity/
MIT License
639 stars 48 forks source link

✨ Adds 'shell' rule for checking cli output via regexp #135

Closed skellock closed 6 years ago

skellock commented 6 years ago

This adds a new shell rule. For example:

{
  "git email": [{ 
    "rule": "shell",
    "command": "git config user.email", 
    "match": ".+@.+"
  }]
}

I opted out of the expression evaluation since bc can do some (or all?) of it.

I also left off the exit code stuff. I'm not sure if it's best in here or a new exit code rule? Either way, I don't have an immediate need for it. This matching stuff will probably fulfill most of the needs for now.

Closes #133

codecov[bot] commented 6 years ago

Codecov Report

Merging #135 into master will decrease coverage by 0.04%. The diff coverage is 85.18%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #135      +/-   ##
=========================================
- Coverage   77.44%   77.4%   -0.05%     
=========================================
  Files          24      25       +1     
  Lines         470     500      +30     
  Branches       80      86       +6     
=========================================
+ Hits          364     387      +23     
- Misses         77      82       +5     
- Partials       29      31       +2
Impacted Files Coverage Δ
src/types.ts 100% <ø> (ø) :arrow_up:
src/extensions/functions/printResults.ts 100% <ø> (ø) :arrow_up:
src/commands/report.ts 79.16% <ø> (ø) :arrow_up:
src/extensions/functions/reviewRule.ts 81.81% <100%> (+1.81%) :arrow_up:
src/extensions/functions/checkRequirement.ts 75.67% <71.42%> (-4.93%) :arrow_down:
src/extensions/functions/checkShell.ts 88.88% <88.88%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e0da558...32d240c. Read the comment docs.

skellock commented 6 years ago

AppVeyor is failing because of the upstream gluegun issue.

GantMan commented 6 years ago

Adding this new rule to the report functionality!

image