-
-
Notifications
You must be signed in to change notification settings - Fork 80
Perltidy improvements #868
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drgrice1
added a commit
to drgrice1/webwork2
that referenced
this pull request
Jun 30, 2023
This adds a new tab to the PG problem editor (unless editing a course configuration file). The tab contains basic information about what it does, but if the "Tidy Code" button is pressed it perltidies the code in the CodeMirror editor window. The tidied code is also saved to the temprorary file. The actual tidying is done by a new webwork webservice action (not a form submission). If errors occur, they are shown in the renderer window. The webwork webwservice depends on a new PG module defined in a corresponding PG pull request (see openwebwork/pg#868).
The `bin/run-perltidy.pl` script is set up the same as the corresponding webwork2 script to autodetect the pg root directory and no longer depends on the PG_ROOT environment variable. A new perltidyrc file (`bin/perltidy-pg.rc`) is added. This is used for perl tidying pg code. The only differences are that spaces are used for indentation, and a line limit of 80 characters is used instead of 120. The `WeBWorK::PG::Tidy` module is added. This module is a wrapper around the `Perl::Tidy` module that basically does everything the `bin/perltidy-pg.pl` script did before. That script now just calls the exported `pgtidy` method. This module will also be used by the webwork2 PG problem editor to tidy PG problem code.
6c13642 to
651fa85
Compare
drgrice1
added a commit
to drgrice1/webwork2
that referenced
this pull request
Jun 30, 2023
This adds a new tab to the PG problem editor (unless editing a course configuration file). The tab contains basic information about what it does, but if the "Tidy Code" button is pressed it perltidies the code in the CodeMirror editor window. The tidied code is also saved to the temprorary file. The actual tidying is done by a new webwork webservice action (not a form submission). If errors occur, they are shown in the renderer window. The webwork webwservice depends on a new PG module defined in a corresponding PG pull request (see openwebwork/pg#868).
drgrice1
added a commit
to drgrice1/webwork2
that referenced
this pull request
Jun 30, 2023
This adds a new tab to the PG problem editor (unless editing a course configuration file). The tab contains basic information about what it does, but if the "Tidy Code" button is pressed it perltidies the code in the CodeMirror editor window. The tidied code is also saved to the temprorary file. The actual tidying is done by a new webwork webservice action (not a form submission). If errors occur, they are shown in the renderer window. The webwork webwservice depends on a new PG module defined in a corresponding PG pull request (see openwebwork/pg#868).
drgrice1
added a commit
to drgrice1/webwork2
that referenced
this pull request
Jun 30, 2023
This adds a new tab to the PG problem editor (unless editing a course configuration file). The tab contains basic information about what it does, but if the "Tidy Code" button is pressed it perltidies the code in the CodeMirror editor window. The tidied code is also saved to the temprorary file. The actual tidying is done by a new webwork webservice action (not a form submission). If errors occur, they are shown in the renderer window. The webwork webwservice depends on a new PG module defined in a corresponding PG pull request (see openwebwork/pg#868).
Alex-Jordan
approved these changes
Jun 30, 2023
Contributor
Alex-Jordan
left a comment
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 just tested by messing up some perl and running the script. And it is working as far as that test went.
drgrice1
added a commit
to drgrice1/webwork2
that referenced
this pull request
Jul 3, 2023
This adds a new tab to the PG problem editor (unless editing a course configuration file). The tab contains basic information about what it does, but if the "Tidy Code" button is pressed it perltidies the code in the CodeMirror editor window. The tidied code is also saved to the temprorary file. The actual tidying is done by a new webwork webservice action (not a form submission). If errors occur, they are shown in the renderer window. The webwork webwservice depends on a new PG module defined in a corresponding PG pull request (see openwebwork/pg#868).
pstaabp
approved these changes
Jul 6, 2023
Member
pstaabp
left a comment
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.
Looks good.
drgrice1
added a commit
to openwebwork/webwork2
that referenced
this pull request
Jul 6, 2023
This adds a new tab to the PG problem editor (unless editing a course configuration file). The tab contains basic information about what it does, but if the "Tidy Code" button is pressed it perltidies the code in the CodeMirror editor window. The tidied code is also saved to the temprorary file. The actual tidying is done by a new webwork webservice action (not a form submission). If errors occur, they are shown in the renderer window. The webwork webwservice depends on a new PG module defined in a corresponding PG pull request (see openwebwork/pg#868).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
bin/run-perltidy.plscript is set up the same as the corresponding webwork2 script to autodetect the pg root directory and no longer depends on the PG_ROOT environment variable.A new perltidyrc file (
bin/perltidy-pg.rc) is added. This is used for perl tidying pg code. The only differences are that spaces are used for indentation, and a line limit of 80 characters is used instead of 120.The
WeBWorK::PG::Tidymodule is added. This module is a wrapper around thePerl::Tidymodule that basically does everything thebin/perltidy-pg.plscript did before. That script now just calls the exportedpgtidymethod. This module will also be used by the webwork2 PG problem editor to tidy PG problem code.