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

Add interface for additional Dim checks #28

Open
aschaal opened this issue Oct 25, 2024 · 1 comment
Open

Add interface for additional Dim checks #28

aschaal opened this issue Oct 25, 2024 · 1 comment
Assignees
Labels
dim This issue is about the Dim tool enhancement New feature or request

Comments

@aschaal
Copy link
Collaborator

aschaal commented Oct 25, 2024

Checks can be done by extra scripts. But they need to load all Dim files which can take time if there are 100k of requirements.

Hook the checks into "dim check" dynamically.

From @JTiefnig:

Define a Ruby interface for doing additional checks.

Maybe adding an array in the config file with Ruby files, which contain these checks.
In consistency-check, these files could be loaded and executed, e.g.: (pseudo code):

check_files.each do |c|
  result = load(c).call(“check”, requirements, original_data)
  if result.value != 0
     log…
     exit…
  end
end

This will safe a lot of time and enables the projects to add checks without the need to change the verifier and all requirement engineers have that automatically on their local machines.

Example checks:

  • ASIL_A is not used
  • developer is not empty
@aschaal aschaal added enhancement New feature or request dim This issue is about the Dim tool labels Oct 25, 2024
@aschaal
Copy link
Collaborator Author

aschaal commented Oct 25, 2024

From @sudeeptarlekar:

I would be bit risky as user can write anything and using eval is security issue.

Add an option in the config file, something like scripts which will accept the list of Ruby files.
These scripts should be executed only when Dim file loading is (or when all the checks are) finished.

If checks fail, just exit with error, no rollback or cleanup.

Add a warning, that changes made to Dim file are not checked during script execution, user must re-load Dim file to validate.

@aschaal aschaal added in progress The issue is currently being implemented and removed in progress The issue is currently being implemented labels Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dim This issue is about the Dim tool enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants