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

Validate input-file during interactive configuration #3334 #3460

Merged
merged 4 commits into from Jan 10, 2024

Conversation

fritschldwg
Copy link
Collaborator

@fritschldwg fritschldwg commented Jan 5, 2024

Validate input-file during interactive configuration #3334

Closes: #3334

Description

Descriptive pull request text, answering:

  • Invalid files get detected immediately during interactive parsing

Definition of Done

A PR is only ready for merge once all the following acceptance criteria are fulfilled:

  • Changes have been manually tested
  • All TODOs related to this PR have been closed
  • There are automated tests for newly written code and bug fixes
  • All bugs discovered while working on this PR have been submitted as issues (if not already an open issue)
  • Documentation (GH-pages, analysis/visualization READMEs, parser READMEs, --help, etc.) has been updated (almost always necessary except for bug fixes)
  • CHANGELOG.md has been updated

Copy link
Collaborator

@Nereboss Nereboss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we only test if an input file exists or not, i think we should also check if it has the correct file type. E.g. currently ccsh modify accepts a kotlin file as input but produces an error later because it only handles cc.json files.

I also think we could refactor the collectInputFileName method (and all similar methods with a different name) as they are very similar and spread across all parsers. Maybe they could be put into the inputHelper class which is imported anyway

@fritschldwg fritschldwg force-pushed the feature/3334/detect-invalid-file-interactive-parsing branch from e947b16 to d2f3ac9 Compare January 9, 2024 16:39
@fritschldwg fritschldwg force-pushed the feature/3334/detect-invalid-file-interactive-parsing branch from ffd5450 to aedbee3 Compare January 10, 2024 08:55
Copy link

sonarcloud bot commented Jan 10, 2024

Quality Gate Passed Quality Gate passed for 'CodeCharta Analysis'

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
99.3% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jan 10, 2024

Quality Gate Passed Quality Gate passed for 'CodeCharta Visualization'

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Collaborator

@Nereboss Nereboss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@Nereboss Nereboss merged commit 99e360d into main Jan 10, 2024
7 checks passed
@Nereboss Nereboss deleted the feature/3334/detect-invalid-file-interactive-parsing branch January 10, 2024 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect invalid file input during interactive parsing
2 participants