-
Notifications
You must be signed in to change notification settings - Fork 12
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
Conversation
2fcb856
to
785dc48
Compare
3fc266f
to
038c4d6
Compare
@@ -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] = [ |
There was a problem hiding this comment.
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> { |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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.
Closes #267.