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

Updated sanity checks for statements #297

Merged
merged 4 commits into from
Dec 29, 2024

Conversation

franv314
Copy link
Contributor

@franv314 franv314 commented Dec 29, 2024

Closes #267.

@franv314 franv314 force-pushed the master branch 4 times, most recently from 2fcb856 to 785dc48 Compare December 29, 2024 15:43
@franv314 franv314 marked this pull request as draft December 29, 2024 15:44
@franv314 franv314 force-pushed the master branch 3 times, most recently from 3fc266f to 038c4d6 Compare December 29, 2024 17:52
@franv314 franv314 marked this pull request as ready for review December 29, 2024 18:01
@@ -12,6 +12,69 @@ use crate::ioi::{IOITask, SubtaskId};
use crate::sanity_checks::{make_sanity_check, SanityCheck, SanityCheckCategory};
use crate::EvaluationData;

const LANGUAGES: [&str; 60] = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment that the list is taken from cms?

@@ -405,6 +464,17 @@ fn extract_subtasks(path: &Path, tex: &str) -> Option<Vec<ExtractedSubtask>> {
.or_else(|| check_subtasks_ois(path, tex))
}

fn relatively_resolve_symlink(path: &Path) -> Result<PathBuf, Error> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just drop the "relatively_" here

while new_path.is_symlink() {
new_path = new_path.read_link()?;
if new_path == path {
bail!("Circular symbolic links detected");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work for...

luca@xps /tmp $ ls -l a b
lrwxrwxrwx 1 luca luca 1 Dec 29 19:19 a -> b
lrwxrwxrwx 1 luca luca 1 Dec 29 19:19 b -> a

I'd just put a depth limit.

@franv314 franv314 changed the title Removed warning for missing statement.pdf file Updated sanity checks for statements Dec 29, 2024
@veluca93 veluca93 merged commit 2f0eab0 into olimpiadi-informatica:master Dec 29, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

Remove warning about missing statement file
2 participants