Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions appsScript/execute/src/main/java/Execute.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ public static String getScriptError(Operation op) {
}

public static void main(String[] args) throws IOException {
// ID of the script to call. Acquire this from the Apps Script editor,
// under Publish > Deploy as API executable.
String scriptId = "ENTER_YOUR_SCRIPT_ID_HERE";
// Deployment ID of the script to call. Acquire this from
// the Apps Script editor, under Publish > Deploy as API executable.
Comment on lines +99 to +100

Choose a reason for hiding this comment

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

high

The line wrapping in this comment is awkward and there is a trailing space on line 99, which harms readability. The repository's style guide prefers the Google Java Style Guide, which emphasizes code readability. I suggest re-wrapping the comment for better clarity.

Suggested change
// Deployment ID of the script to call. Acquire this from
// the Apps Script editor, under Publish > Deploy as API executable.
// Deployment ID of the script to call. Acquire this from the Apps Script editor,
// under Publish > Deploy as API executable.
References
  1. The repository style guide (line 7) states a preference for Google's style guides, which prioritize code readability and consistent formatting. The current comment wrapping and trailing whitespace do not align with these best practices. (link)

String deploymentId = "ENTER_YOUR_DEPLOYMENT_ID_HERE";
Script service = getScriptService();

// Create an execution request object.
Expand All @@ -108,7 +108,7 @@ public static void main(String[] args) throws IOException {
try {
// Make the API request.
Operation op =
service.scripts().run(scriptId, request).execute();
service.scripts().run(deploymentId, request).execute();

// Print results of request.
if (op.getError() != null) {
Expand Down