-
Notifications
You must be signed in to change notification settings - Fork 166
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
Add support for yaml file format #88
Comments
Is someone working on this issue? |
As far as I know, no one is working on yaml. However, you should know writing an yaml scanner is quite a time consuming task. Good resources for how to identify these formats: |
Why don't we use standart golang library for yaml?
Jar-archives is already done. |
I want to write a matcher for the CorelDRAW file. But for checking it, I need also to send a filesize information to the matcher function. Matcher function accepts only one argument. How can we send filesize with byte array to matcher function? |
Unfortunately the size of the file is not available, main reason for it being that the library limits itself to reading just the header of files in order to save memory. I'm not familiar with Corel file format, but after reading the wikipedia info and how others detect it I think it can be detected without knowing the length. As far as I can see official Corel file format specification is not publicly available. |
https://www.ntfs.com/corel-draw-format.htm Second byte fragment is for checking the file size. I checked it with my custom .cdr file and it works. |
I guess you can exclude the check for file size and just check for the magic numbers. Don't forget to add all the aliases this MIME has. (tika) |
application/x-yaml
ortext/yaml
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/helloWorld/configMap.yaml
https://yaml.org
My approach to this would be similar to the JSON detection. A scanner can validate YAML text and return the index where a possible error occurred.
The text was updated successfully, but these errors were encountered: