Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Handle crashing cppstats on invalid files. #22

Closed

Conversation

matthid
Copy link
Contributor

@matthid matthid commented Feb 12, 2015

Handle possible cppstats crashes:
Sometimes the repository can contain invalid .c or .cpp files (for example negative test-cases in llvm) we just ignore the file in this scenario.
A warning is triggered so users can recognize a scenario where all files are ignored. In the travis patch a new unit-test was added to check that cppstats is actually working. This means when all unit tests are successfully run a scenario where all files are ignored is very unlikely.

Because it touches the same files this patch is done on top of the travis CI changes.
Please either merge this and close the travis pull request or merge the travis pull request first (than this pull request should simplify itself and be easier to review).

Because it is on top of the travis CI branch, here is the (successful) build: https://travis-ci.org/matthid/codeface/builds/50475458

matthid and others added 3 commits February 9, 2015 11:32
This adds travis support to the repository. Some smaller changes in the source code to improve the build log in
travis to catch errors more easily.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
When we come over an invalid file it can happen that cppstats crashes.
This most likely means that the file is not a valid .c or .cpp file.
Example: https://gist.github.com/matthid/2c31a1abb3f8d42af703
A negative test-case within llvm.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Add comments to the cppstats unit tests and explain the situation in which it can fail.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants