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

Invalid FILE_DESCRIPTION not detected #8

Open
thbeu opened this issue Mar 29, 2024 · 3 comments
Open

Invalid FILE_DESCRIPTION not detected #8

thbeu opened this issue Mar 29, 2024 · 3 comments

Comments

@thbeu
Copy link
Contributor

thbeu commented Mar 29, 2024

Despite the issue with the UTF-8 BOM I wonder why https://github.com/buildingSMART/IFC/blob/776c6d92a3674bc8a5b371061a40a09a4e6b8354/Examples/Building%20element%20elemented%20case/Examples/Wall%20elemented%20case/File.ifc containg an invalid FILE_DESCRIPTION is reported Valid.

@aothms
Copy link
Member

aothms commented Mar 31, 2024

This is only a syntax checker, the definition for header entities we have here in the grammar is fully untyped https://github.com/IfcOpenShell/step-file-parser/blob/master/main.py#L86

We have an item on the backlog to implement header entity validation in https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/validate.py

Although it could easily be implemented here as well, as actually the header is constant/independent for all schema versions. Are you interested in contributing this perhaps?

@thbeu
Copy link
Contributor Author

thbeu commented Apr 8, 2024

Are you interested in contributing this perhaps?

I have no background regarding lark.

@aothms
Copy link
Member

aothms commented Apr 9, 2024

Cool. no worries. I don't think it would be implemented in the actual grammar. There's some character length requirements on the header fields for example. I think it's easiest to just implement them as imperative checks as the ast is being built/streamed. But no worries. We'll get to it at some point.

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

No branches or pull requests

2 participants