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

Importing template/boilerplate code #1535

Open
rien opened this issue May 27, 2024 · 2 comments
Open

Importing template/boilerplate code #1535

rien opened this issue May 27, 2024 · 2 comments

Comments

@rien
Copy link
Member

rien commented May 27, 2024

Context

With PR #1524 we will introduce the ability to add a template file to the Dolos analysis. Any code fragments / fingerprints matching with this template file will be ignored. For example:

image

The class definition and constructor are ignored, but the actual implementation itself not. In this example, only a few lines in the hash function match, but since the other lines are template code, there is still 59% similarity.

In addition, the ability is added to automatically detect code to ignore if fingerprints occur in a high fraction (or absolute count) of the total analyzed files.

As of PR #1524 this will be passed through a command-line parameter --ignore <path>. However, there is no way to communicate this directly through the UI of the web view.

Changes needed

  • Lib:
    The most easy way to implement this, is to just add the template code through the info.csv. This would not require any other changes to make this work, but I think the additional changes below might be beneficial.

  • Web:

  • API: accept the extra advanced parameters and pass them to the Dolos container

@jorg-vr
Copy link

jorg-vr commented May 28, 2024

Personal preference from the three options would be template.{ext}

If there is a need to give it a specific nomenclature in the info.csv, we might as well use that as a file name.

From the Dodona perspective, there is no immediate need for the individual file uploads.

@mikaelGusse
Copy link
Collaborator

We would prefer the info.csv solution for our use case here at Aalto. In exercises that have multiple files this template.{ext} would possibly cause some issues and not be able to support having multiple template files as easily. Thus the info.csv would be more futureproof in this case even though multi-file submissions are not yet supported. Perhaps both solutions could coexist so that if the info.csv does not have it defined, then it would use the template.{ext} if it can find one.

@rien rien changed the title Importing template/boilerplate code - prefered way to communicate this to Dolos Importing template/boilerplate code Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

3 participants