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

Duplicate errors #230

Open
nimashariatian opened this issue Nov 27, 2019 · 0 comments
Open

Duplicate errors #230

nimashariatian opened this issue Nov 27, 2019 · 0 comments

Comments

@nimashariatian
Copy link

Please provide a general summary of the issue in the Issue Title above
fill out the headings below as applicable to the issue you are reporting,
deleting as appropriate but offering us as much detail as you can to help us resolve the issue

Expected Behaviour

What should happen?

calling .validate multiple times should not increase the error count

Desired Behaviour (for improvement suggestions only)

if relevant include images or hyperlinks to other resources that clarify the enhancement you're seeking

v = Csvlint::Validator.new(..)
v.validate
v.errors.count => 1 
v.validate
v.errors.count = > 1
v.validate
v.errors.count = > 1

Current Behaviour (for problems)

What currently happens that isn't expected behaviour?

v = Csvlint::Validator.new(..)
v.validate
v.errors.count => 1 
v.valid?
v.errors.count = > 2
v.validate
v.errors.count = > 3

Steps to Reproduce (for problems)

Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant

data = StringIO.new(%Q{"Foo","Bar","Baz"\r\n"1","2","3"\r\n"1","2","3"\r\n"3","2","1""})
validator = Csvlint::Validator.new(data)
validator.validate
puts "validator.errors.count => #{validator.errors.count}"
validator.validate
puts "validator.errors.count => #{validator.errors.count}"
validator.validate
puts "validator.errors.count => #{validator.errors.count}"

Your Environment

Include as many relevant details about the environment you experienced the bug in - this will help us resolve the bug more expediently

  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version (desktop or mobile):
    Ruby 2.5.0
    Rails 5.2.0
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

No branches or pull requests

1 participant