Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore files with a score of zero #261

Merged
merged 1 commit into from
Nov 13, 2020
Merged

Ignore files with a score of zero #261

merged 1 commit into from
Nov 13, 2020

Conversation

villfa
Copy link
Collaborator

@villfa villfa commented Nov 13, 2020

When running Churn on a folder containing only one non-versioned PHP file (while the folder is part of a versioned project) we got this error:

    ___  _   _  __  __  ____  _  _     ____  _   _  ____
   / __)( )_( )(  )(  )(  _ \( \( )___(  _ \( )_( )(  _ \
  ( (__  ) _ (  )(__)(  )   / )  ((___))___/ ) _ (  )___/
   \___)(_) (_)(______)(_)\_)(_)\_)   (__)  (_) (_)(__)

    1 [->--------------------------] < 1 sec 4.0 MiB


In Assert.php line 2042:

  [InvalidArgumentException]
  Expected a value greater than 0. Got: 0


Exception trace:
  at vendor/webmozart/assert/src/Assert.php:2042
 Webmozart\Assert\Assert::reportInvalidArgument() at vendor/webmozart/assert/src/Assert.php:838
 Webmozart\Assert\Assert::greaterThan() at src/Result/Result.php:115
 Churn\Result\Result->getScore() at src/Result/ResultAccumulator.php:95
 Churn\Result\ResultAccumulator->toArray() at src/Command/RunCommand.php:185
 Churn\Command\RunCommand->writeResult() at src/Command/RunCommand.php:101
 Churn\Command\RunCommand->execute() at vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at vendor/symfony/console/Application.php:1009
 Symfony\Component\Console\Application->doRunCommand() at vendor/symfony/console/Application.php:273
 Symfony\Component\Console\Application->doRun() at vendor/symfony/console/Application.php:149
 Symfony\Component\Console\Application->run() at bin/churn:18

run [-c|--configuration [CONFIGURATION]] [--format FORMAT] [-o|--output OUTPUT] [-p|--progress] [--] [<paths>...]

@codecov
Copy link

codecov bot commented Nov 13, 2020

Codecov Report

Merging #261 (4d23375) into master (4c1110e) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #261      +/-   ##
============================================
+ Coverage     95.92%   95.94%   +0.01%     
- Complexity      175      176       +1     
============================================
  Files            24       24              
  Lines           442      444       +2     
============================================
+ Hits            424      426       +2     
  Misses           18       18              
Impacted Files Coverage Δ Complexity Δ
src/Result/ResultAccumulator.php 100.00% <100.00%> (ø) 13.00 <0.00> (+1.00)

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 4c1110e...4d23375. Read the comment docs.

@villfa villfa merged commit a91e619 into bmitch:master Nov 13, 2020
@villfa villfa deleted the fix/ignore-zero branch November 13, 2020 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant