-
Notifications
You must be signed in to change notification settings - Fork 294
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
Programming exercises
: Add Rust and JavaScript to plagiarism detection
#9344
Programming exercises
: Add Rust and JavaScript to plagiarism detection
#9344
Conversation
WalkthroughThe pull request introduces support for Rust and JavaScript programming languages across various components of the project. It updates the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 1
Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Files selected for processing (5)
- build.gradle (1 hunks)
- src/main/java/de/tum/cit/aet/artemis/plagiarism/service/ProgrammingPlagiarismDetectionService.java (2 hunks)
- src/main/java/de/tum/cit/aet/artemis/programming/service/gitlabci/GitLabCIProgrammingLanguageFeatureService.java (1 hunks)
- src/main/java/de/tum/cit/aet/artemis/programming/service/jenkins/JenkinsProgrammingLanguageFeatureService.java (1 hunks)
- src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIProgrammingLanguageFeatureService.java (1 hunks)
Additional context used
Path-based instructions (4)
src/main/java/de/tum/cit/aet/artemis/plagiarism/service/ProgrammingPlagiarismDetectionService.java (1)
Pattern
src/main/java/**/*.java
: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_importssrc/main/java/de/tum/cit/aet/artemis/programming/service/gitlabci/GitLabCIProgrammingLanguageFeatureService.java (1)
Pattern
src/main/java/**/*.java
: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_importssrc/main/java/de/tum/cit/aet/artemis/programming/service/jenkins/JenkinsProgrammingLanguageFeatureService.java (1)
Pattern
src/main/java/**/*.java
: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_importssrc/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIProgrammingLanguageFeatureService.java (1)
Pattern
src/main/java/**/*.java
: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports
Learnings (3)
src/main/java/de/tum/cit/aet/artemis/programming/service/gitlabci/GitLabCIProgrammingLanguageFeatureService.java (1)
Learnt from: magaupp PR: ls1intum/Artemis#8802 File: src/main/java/de/tum/in/www1/artemis/service/connectors/gitlabci/GitLabCIProgrammingLanguageFeatureService.java:24-24 Timestamp: 2024-06-29T14:49:34.001Z Learning: Static code analysis for Rust in GitLab CI will be added in a follow-up PR.
src/main/java/de/tum/cit/aet/artemis/programming/service/jenkins/JenkinsProgrammingLanguageFeatureService.java (1)
Learnt from: magaupp PR: ls1intum/Artemis#8802 File: src/main/java/de/tum/in/www1/artemis/service/connectors/jenkins/JenkinsProgrammingLanguageFeatureService.java:43-43 Timestamp: 2024-06-29T14:47:20.796Z Learning: Jenkins support for Rust was added in commit d0fb7032e70c001dc8b2c4d0a391ca8bf7e7d586.
src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIProgrammingLanguageFeatureService.java (1)
Learnt from: magaupp PR: ls1intum/Artemis#8802 File: src/main/java/de/tum/in/www1/artemis/service/connectors/gitlabci/GitLabCIProgrammingLanguageFeatureService.java:24-24 Timestamp: 2024-06-29T14:49:34.001Z Learning: Static code analysis for Rust in GitLab CI will be added in a follow-up PR.
Additional comments not posted (8)
src/main/java/de/tum/cit/aet/artemis/programming/service/gitlabci/GitLabCIProgrammingLanguageFeatureService.java (2)
28-28
: LGTM!The change to enable a specific feature for the Rust programming language is consistent with the PR objective of enabling plagiarism detection for Rust. Based on the learning, it's likely that the feature being enabled is static code analysis, which is a positive change.
29-29
: LGTM!The change to enable a specific feature for the JavaScript programming language is consistent with the PR objective of enabling plagiarism detection for JavaScript. This is a positive change that is unlikely to have any negative impact on the functionality or performance of the system.
src/main/java/de/tum/cit/aet/artemis/programming/service/jenkins/JenkinsProgrammingLanguageFeatureService.java (2)
44-44
: LGTM!The change to enable plagiarism detection for Rust is consistent with the PR objective and is supported by Jenkins.
45-45
: LGTM!The change to enable plagiarism detection for JavaScript is consistent with the PR objective and is supported by JPlag.
src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIProgrammingLanguageFeatureService.java (2)
51-51
: Verify the new feature for RUST is thoroughly tested.The change looks good and enables a new feature for the RUST programming language. Please ensure that the new feature is thoroughly tested and does not introduce any regressions.
52-52
: Verify the new feature for JAVASCRIPT is thoroughly tested.The change looks good and enables a new feature for the JAVASCRIPT programming language. Please ensure that the new feature is thoroughly tested and does not introduce any regressions.
build.gradle (2)
255-255
: LGTM!The dependency for the Rust module of JPlag is correctly added, enabling plagiarism detection for Rust programming exercises.
256-256
: LGTM!The dependency for the JavaScript module of JPlag is correctly added, enabling plagiarism detection for JavaScript programming exercises.
...in/java/de/tum/cit/aet/artemis/plagiarism/service/ProgrammingPlagiarismDetectionService.java
Show resolved
Hide resolved
@b-fein is this a test or a code review? |
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.
Code
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.
Code
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.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
📒 Files selected for processing (2)
- build.gradle (1 hunks)
- src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIProgrammingLanguageFeatureService.java (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIProgrammingLanguageFeatureService.java (1)
Pattern
src/main/java/**/*.java
: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports
📓 Learnings (1)
src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIProgrammingLanguageFeatureService.java (1)
Learnt from: magaupp PR: ls1intum/Artemis#8802 File: src/main/java/de/tum/in/www1/artemis/service/connectors/gitlabci/GitLabCIProgrammingLanguageFeatureService.java:24-24 Timestamp: 2024-06-29T14:49:34.001Z Learning: Static code analysis for Rust in GitLab CI will be added in a follow-up PR.
🔇 Additional comments (2)
build.gradle (2)
255-256
: LGTM! New JPlag dependencies added as intended.The addition of Rust and JavaScript JPlag modules aligns perfectly with the PR objectives. These new dependencies will enable plagiarism detection for Rust and JavaScript programming exercises, as intended.
255-256
: Verify configuration for new JPlag languages.While the Rust and JavaScript JPlag dependencies have been added successfully, please verify if any additional configuration is needed to fully enable support for these languages in the plagiarism detection system.
✅ Verification successful
Configuration for new JPlag languages is verified.
The
ProgrammingPlagiarismDetectionService
correctly includes support for Rust and JavaScript languages in the JPlag configuration.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any JPlag configuration related to language support rg -i "jplag.*language|jplag.*rust|jplag.*javascript" --type javaLength of output: 2637
Script:
#!/bin/bash # Extract the implementation of getJPlagProgrammingLanguage method to verify language support ast-grep --lang java --pattern $'public Language getJPlagProgrammingLanguage($_) { $$$ }' src/main/java/de/tum/cit/aet/artemis/plagiarism/service/ProgrammingPlagiarismDetectionService.javaLength of output: 189
Script:
#!/bin/bash # Extract the implementation of getJPlagProgrammingLanguage method to verify language support ast-grep --lang java --pattern $'private Language getJPlagProgrammingLanguage($_) { $$$ }' src/main/java/de/tum/cit/aet/artemis/plagiarism/service/ProgrammingPlagiarismDetectionService.javaLength of output: 2524
...um/cit/aet/artemis/programming/service/localci/LocalCIProgrammingLanguageFeatureService.java
Show resolved
Hide resolved
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.
Tested on TS1 for rust and javascript. No errors encountered
Checklist
General
Server
Changes affecting Programming Exercises
Motivation and Context
JPlag supports Rust and JavaScript out of the box, but plagiarism detection was not enabled in #8802 and #8859.
Description
This PR adds the Rust and JavaScript JPlag modules as a dependency and enables the feature for these languages.
Steps for Testing
Prerequisites:
a. Go to the plagiarism screen
b. Click on
Detect plagiarism
c. Verify that the action finishes without errors
Note that Rust source files are detected as binary until #9350 is merged.
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.
Review Progress
Code Review
Manual Tests
Test Coverage
Screenshots
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
These updates enhance the platform's versatility and usability for users working with a broader range of programming languages.