Skip to content

Commit

Permalink
Plus handler (rstudio#92)
Browse files Browse the repository at this point in the history
* First pass at revised detect_mistakes - solves initial + inquiry.

* Debugs detect_mistake to pass all tests, adds test for + case, edits detect_mistakes to flagged unmatched named arguments passed to ... as surplus

* Adds tests for rstudio#84, rstudio#91, rstudio#94, rstudio#95.

* Cleans up tests in test_detect_mistakes.R. Tests no longer use name of first argument.

* Checks user code for bad syntax before standardising. Fixes rstudio#91, rstudio#94, rstudio#95.

* Adds message generators for new cases: wrong_call(), bad_argument_name(), too_many_arguments().

* Adds new message generators to detect_mistakes.

* Adds enclosing calls to student messages

* Adds sanity-check.Rmd for checking that messages are sensible (which is not easy to automate).

* Streamlines message generators.

* Fixes bug in detect_mistakes that failed to catch unused unnamed arguments before passing student code to call_standardise_formals.

* Improves the messages returned by the message generators.

* Completes suite of sanity_checks for reading whether or not gradethis provides intelligible messages to students.

* Corrects argument names in too_many_matches

* Adds checks in sanity_checks.Rmd to tests as test_sanity_checks.R

* Moves sanity-checks.Rmd to the tutorials as grade_code-messages

* Changes content of old sanity-checks.R to be a tutorial.

* Fixes awkward message returned by missing_argument when the missing argument does not have a name.

* Fixes hard-coded tests that incorrectly fail in the presence of improvements.

* Adds your_char variable to missing_argument() based on reviewer feedback

* Improves handling of comparisons in build_intro() based on reviewer feedback.

* Checks for case where user uses the same argument name twice. Adds duplicate_name() message generator.

* Small improvements based on reviewer feedback

* Fixes bug in how detect_mistakes handles partially matched formal names.

* Further refactoring with real_names() inside of detect_mistakes()

* Fixes bug that caused detect_mistakes to prematurely return  NULL (correct) is one set of non-identical arguments were none-the-less correct.
  • Loading branch information
garrettgman authored Mar 31, 2020
1 parent 6671cea commit 1684c0c
Show file tree
Hide file tree
Showing 7 changed files with 2,150 additions and 443 deletions.
Loading

0 comments on commit 1684c0c

Please sign in to comment.