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

include format file verification #54

Closed
elbraulio opened this issue Mar 25, 2019 · 1 comment · Fixed by #114
Closed

include format file verification #54

elbraulio opened this issue Mar 25, 2019 · 1 comment · Fixed by #114
Assignees
Labels
p: medium medium priority s: available ready to work on t: feature New feature or request
Milestone

Comments

@elbraulio
Copy link
Owner

elbraulio commented Mar 25, 2019

can be something like this

        this.logger.info("validating " + file.getAbsolutePath());
        int count = 0;
        try (
                BufferedReader br = new BufferedReader(
                        new InputStreamReader(
                                new FileInputStream(file),
                                StandardCharsets.UTF_8
                        )
                )
        ) {
            String line;
            while ((line = br.readLine()) != null) {
                count++;
                this.parser.parse(line);
            }
        } catch (EzParseException e) {
            this.logger.warn("parse error on line " + count + ": " + e.errors());
            return e.errors();
        }
        return new LinkedList<>();

this is already being done when the data is inserting and it will be useful to allow the user to use that in order to verify and test their file formats defined on Parser.

@elbraulio elbraulio added the s: triage on status triage process label Mar 25, 2019
@elbraulio
Copy link
Owner Author

#77 and #3 are features that works with parse. This validation is another one. So in that context this feature can be included.

@elbraulio elbraulio added p: medium medium priority s: accepted will be included into the project t: feature New feature or request and removed s: triage on status triage process labels Apr 8, 2019
@elbraulio elbraulio added this to the 1.0.0 milestone Apr 8, 2019
@elbraulio elbraulio added s: available ready to work on and removed s: accepted will be included into the project labels May 11, 2019
@elbraulio elbraulio self-assigned this Aug 13, 2019
elbraulio added a commit that referenced this issue Sep 5, 2020
elbraulio added a commit that referenced this issue Sep 5, 2020
@elbraulio elbraulio linked a pull request Sep 5, 2020 that will close this issue
elbraulio added a commit that referenced this issue Sep 5, 2020
elbraulio added a commit that referenced this issue Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: medium medium priority s: available ready to work on t: feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant