-
Notifications
You must be signed in to change notification settings - Fork 30
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
Feature/3307/detect-invalid-file-input #3325
Conversation
...src/test/kotlin/de/maibornwolff/codecharta/importer/sourcecodeparser/e2e/FileDoesNotExist.kt
Outdated
Show resolved
Hide resolved
...src/test/kotlin/de/maibornwolff/codecharta/filter/structuremodifier/StructureModifierTest.kt
Outdated
Show resolved
Hide resolved
...filter/EdgeFilter/src/main/kotlin/de/maibornwolff/codecharta/filter/edgefilter/EdgeFilter.kt
Show resolved
Hide resolved
Regarding the code smell from Sonar: I would ignore it. Moving the return out of a double nested if, is in my opinion, not good for the code's readability. |
Currently this feature is implemented in a way, that invalid resources can only be detected when running a command. That means when using the interactive parser or parser suggestions, the user first answers all questions to configure the parser, the parser/s start/s running and THEN the user gets warned if files/folders do not exist or are invalid. Is that okay for now or should this PR also implement a warning when configuring? |
c82ef07
to
53e9b36
Compare
53e9b36
to
2720f6b
Compare
Small thing that should get changed: |
[CodeCharta Analysis] Kudos, SonarCloud Quality Gate passed! |
[CodeCharta Visualization] Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Maybe after changing the action following invalid input from just printing a message and returning to throwing an exception we should also adapt the tests to check if an exception gets thrown? |
Detect invalid file input
Issue: #3307
Description
This PR adds validation for file input for all parsers, by checking a row of conditions (existence, non-emptiness, ..., for details look at the specification in the issue).