- Start with an empty Maven project, configured with source level 8, and following dependencies: logback-classic, junit, assertj and jsr305
- Copy the initial CSV file in src/test/resources
- Open a new BufferedFileReader in a try...catch => SonarLint report it should be closed and exception should be logged
- Fix the lost exception by using a logger
- Fix the unclosed resource using try...with
- Add one more nested if => SonarLint report too deep if and merge if statement
- Fix by extracting method + merge if statements
- Trim line to null then use startsWith => no issue
- Add @CheckForNull on trimToNull method => SonarLint reports potential NPE
- Add some entried in CSV file having an extra column in first position
- Modify code to detect format V1 or V2 and badly write a condition so that SonarLint detect always true/always false