-
Notifications
You must be signed in to change notification settings - Fork 11
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
Throw WARNING when encountering non-standard file extensions for common document encoding types #635
Conversation
src/main/java/gov/nasa/pds/tools/validate/rule/pds4/FileReferenceValidationRule.java
Outdated
Show resolved
Hide resolved
src/main/java/gov/nasa/pds/tools/validate/rule/pds4/FileReferenceValidationRule.java
Outdated
Show resolved
Hide resolved
🛠 Lift Auto-fixSome of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1 # Download the patch
curl https://lift.sonatype.com/api/patch/github.com/NASA-PDS/validate/635.diff -o lift-autofixes.diff
# Apply the patch with git
git apply lift-autofixes.diff
# Review the changes
git diff Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command: curl https://lift.sonatype.com/api/patch/github.com/NASA-PDS/validate/635.diff | git apply Once you're satisfied, commit and push your changes in your project. Footnotes |
src/main/java/gov/nasa/pds/tools/validate/rule/pds4/FileReferenceValidationRule.java
Show resolved
Hide resolved
src/main/java/gov/nasa/pds/tools/validate/rule/pds4/FileReferenceValidationRule.java
Show resolved
Hide resolved
Verify the file extension or suffix matches those expected for the given encoding type. An enumeration (table) is used to make the XML encoding type to a list of allowed extensions for the encoding type. The enumeration is the only thing that needs changed when new encoding types are added or list of the extensions is expanded.
@jordanpadams @nutjob4life @tloubrieu-jpl Ready for review. Can sonatype be run again? |
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.
👍
🗒️ Summary
Added a check that compares the file extension (suffix of filename from last .) to the those known or allowed for the given encoding type, When it fails it generates the following message:
⚙️ Test Data and/or Report
See unit testing below
♻️ Related Issues
Closes #617