opened
jylee-git
username_0
For example, `author-config.csv` should contain 7 columns (especially the headers). However, the user provided 6 columns (fewer columns than requred).

When program is run, exception is caught but the program is terminated abruptly, without giving the user enough info as to where went wrong:
![image](https://user-images.githubusercontent.com/35756209/63599911-216d9580-c5f5-11e9-861c-c7930104eab5.png)


###To-do
Improve on the exception handling, by informing the user that the csv file does not contain the required number of columns
ConfigCsvFiles: Improve exception handling when 
issue
created
anubh-v
username_1
I think this issue can be broken into 2 related issues:

A) The user provides the correct number of columns in the header, but every record is malformed. This could happen because every record either has fewer / more columns than the header, or lacks data in mandatory columns.

In this case, RepoSense will not register any of the CSV records in the generated List of RepoConfigurations. It would be good to alert the user when this happens.

Note that when this issue occurs in the `repo-config.csv` file, then RepoSense will end abruptly just as mentioned in this issue, because RepoSense currently expects at least 1 repository to be specified in `repo-config.csv`.

B) The user provides fewer columns than required in the header, and the records are technically not malformed. In this case, RepoSense ends abruptly as shown by @username_0 . As mentioned by @username_0, it would be good to provide more helpful exception messages.
comment
created
anubh-v
username_1
Here are my proposed solutions for the 2 issues identified above:

To solve, issue A, we could use the logger to explicitly warn the user that **all** the records in the CSV have been considered malformed. In the case of `repo-config.csv`, we should throw an exception since the file is not optional.

To solve issue B, we could perform validation on the size of the header in the CSV to ensure the number of columns in the header are as expected.
comment
created
jylee-git
username_0
Yes I think we should do that.
comment
created
anubh-v
username_1
Thanks for your response @username_0.

I'll address this task by implementing 2 checks:

1. Check that the size of the header in the CSV config is correct.

2. Check that there is at least 1 valid record in the `repo-config.csv` file.
comment
created
anubh-v
username_1
I have created a separate issue for this. Please see issue #942
comment
closed
fzdy1914
username_2
issue